Windows 7 with two network cards doesn't route traffic
Check that your router has a route to the 192.168.2.x network. Unless you can add one or it is able to discover it your out of luck. It needs a route to tell it to send traffic for 192.168.2.x through the Windows 7 machine acting as a router/gateway at 192.168.1.2.
Make sure routing is enabled on the WIndows 7 machine (do a ipconfig /all
at the command prompt and check for a line that says IP Routing Enabled . . . . . . . : Yes
.
If it is not enable you can change this by setting the value of the following registry key to 1: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\Tcpip\Parameters\IPEnableRouter
Related videos on Youtube
Tomek
Updated on September 18, 2022Comments
-
Tomek almost 2 years
I have simple task to do: I have wni7 with two nics.I want to connect another comp(osx) to win7 through second nic to connect it to internet.
- I already changed the registry.
- Win7 interface with 192.168.2.1 has no gateway set (no point to do that)
- OSX interface with 192.168.2.2 has gateway set to 192.168.2.1
- I do not add any routes on win7, every thing seems to be already there
- network on second nic is detected as "undefined network" (probably effect of no gateway)
- i can achieve any connectivity to internet from OSX only by enabling network connection sharing on nic with 192.168.2.1, but it enables NAT and I'm interested only in pure routing without nat(it's a setup for some research).
- firewall is off.
It seems to me that win7 refuses to forward packets for some reason. Perhaps "undefined network" and NLA service is to blame, although i couldn't find any info about that.
Below ascii schematics of my setup:
internet<-->router(192.168.1.1)<-->(192.168.1.2) WIN7 (192.168.2.1)<-->(192.168.2.2)OSX
Thanks
-
Tomek almost 12 years:D Yeah i made error in the the post. it's .2 in realty.
-
Biswapriyo about 7 yearsConnect two PC PC with crossover Ethernet cable. See this:: How to Connect Two Computers Together with an Ethernet Cable
-
Ramhound over 8 yearsCan you perhaps explain the reason, in detail with supporting documentation, that enabling IP forwarding to connected networks solves the author's problem?
-
TomS over 8 yearsI don't think that this is the right place for describing details of IP routing. If you need documentation on the registry key, I just found this page on Microsoft's site which describes this to some extent. Please understand that I am not fully sure that my answer can definitely solve the issue. Maybe it doesn't, but it's also not marked as the correct answer, yet. I think it's the purpose of this great site to propose solutions and the correct solution is then marked. I just want to help. And I think down-voting does not help here...
-
Ramhound over 8 yearsWell I don't find an incomplete answer to be helpful. Perhaps I am actually interested in the reason this key is the solution, understand the mechanics, that requires an explanation. This answer is for everyone in the community also.
-
Daniel B almost 8 yearsWhat’s there not to understand? It’s the equivalent to
net.ipv4.ip_forward
andnet.ipv6.conf.all.forwarding
. Routing is simply disabled by default on Windows. -
guest over 6 years@DanielB the point is he's not answering the question. OP had said "I already changed the registry" so reiterating
IPEnableRouter
is unhelpful. OP can connect to internet from OS X through ICS of Windows 7, so default route of router must be correct. All in all this shows a lack of understanding of the question. -
guest over 6 yearsThis should have been the accepted answer.