3
I have a machine with 2 network interfaces. The network itself looks like this
| access point | wi-fi | my machine | | 2-nd machine |
| 192.168.1.1 | --------- | 192.168.1.37 | Ethernet | |
Internet ---- | 76.77.15.87 | | 192.168.0.1 | --------- | 192.168.0.2 |
I found, how to setup routing on a Windows machine:
http://www.home-network-help.com/ip-forwarding.html
I did exactly as it said there. On my machine
1. Set HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters/IPEnableRouter to 1
2. Setup the blank default gateway on my machine for 192.168.0.1 interface
3. Rebooted the machine
4. Turned off the firewall (just in case)
On the 2-nd machine set 192.168.0.1 as a default gateway.
But it still doesn't work:
from the 2-nd machine ping 192.168.0.1
works. ping 192.168.1.1
doesn't work.
On my machine ping 192.168.1.1
works.
What could be wrong here? How to debug?
How does the access point know to send packets bound to 192.168.0.1 to this machine? And if it has no way to know, how can the ping reply ever get back to the source? – David Schwartz – 2014-07-07T09:38:43.353
@DavidSchwartz Ahh, my machine must get a reply and redirect it back. How to do it? – user4035 – 2014-07-07T09:39:45.927
With a route, of course. Every machine has to know how to reach every subnet you're expecting it to be able to reach. (If the default router will do it, then there's nothing else you need to do. But if not, you need to add a subnet route.) – David Schwartz – 2014-07-07T09:40:33.037
@DavidSchwartz Can you give a route command? I tried about 2 times, but failed. – user4035 – 2014-07-07T09:41:38.707
It has to go on the access point, telling it to route 192.168.0.0/24 to 192.168.1.37 – David Schwartz – 2014-07-07T09:42:32.233
@DavidSchwartz Ahha, will try – user4035 – 2014-07-07T09:43:00.157
@DavidSchwartz Hurray, it worked. Many thanks. – user4035 – 2014-07-07T09:45:18.423