Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
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 Jul 7 at 9:38
    
@DavidSchwartz Ahh, my machine must get a reply and redirect it back. How to do it? –  user4035 Jul 7 at 9:39
    
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 Jul 7 at 9:40
    
@DavidSchwartz Can you give a route command? I tried about 2 times, but failed. –  user4035 Jul 7 at 9:41
    
It has to go on the access point, telling it to route 192.168.0.0/24 to 192.168.1.37 –  David Schwartz Jul 7 at 9:42

1 Answer 1

up vote 2 down vote accepted

Machines can reach other machines in their same local subnet thanks to a subnet route. And machines can reach anything their gateway can reach thanks to their default route. But neither of these applies to the access point trying to reach the machine pinging it. So the ping reply has no way to get back to the source machine. You need to add a subnet route.

As a general rule of thumb, every device that is some other device's default gateway should have a route to every local subnet unless its default gateway is another local device. I assume that your access point is some other device's default gateway and its default gateway is not local, so it should have a route to every local subnet. If I'm reading your question correctly, the access point needs to know that packets bound for 192.168.0.0/24 should be sent to 192.168.1.37.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.