Question How does windows 10 handle multiple networks?

apeg

Distinguished
May 14, 2011
22
0
18,510
0
I have a windows 10 computer with 2x network ports.

the first port is connected to a router with IP (192.168.1.x) and the second is connected to a router with IP (192.168.2.x)

Both routers have a static client connected to them. (10.10.0.1) and the second router has a static client with IP (10.11.0.1)

How does windows know which port/network to search for the specific static IP when i attempt to connect?
 

apeg

Distinguished
May 14, 2011
22
0
18,510
0
The route table doesn't have any entries for the static ip's... how could it, they are made up and differ from the gateway.

So when i attempt to connect to 10.10.0.1, what logic does window use to decide which network to search?

I simplified my example, in reality both static IP's reside on the 1st network (192.168.1.x ). I AM able to connect to (10.10.0.1) but not (10.11.0.1) . When i run tracert on the second IP its because windows is trying over the second nic (192.168.2.x) .

why would it do this? is it random round robin logic? is there a better static IP i could use that differs from the gateway that would still "tell" windows the correct network to look under.

I was hoping to avoid manually adding routes.

**when i disconnect the second network, i am able to connect to both static machines.
 

kanewolf

Titan
Moderator
Windows by default doesn't know any routes other than the default route. So it would depend on what the default route is if there is no explicit route.
It still depends on the route table on the windows box. Either there is an explicit route or the default is used. You should only have one default route.
 
It is not round robin. There is always a BEST route. If there are mulitple default gateways it selects the best one based on metric. How the metric values are assigned varies a bit by OS so I can't say. You generally do not want to rely on tie breakers, it is recommended that only 1 gateway exist. The OS does not know anything about other machines unless you tell it via static routes.

This is why in complex installation routing protocols are used, but it is rare to run a routing protocol on a end device.
 

apeg

Distinguished
May 14, 2011
22
0
18,510
0
It is not round robin. There is always a BEST route. If there are mulitple default gateways it selects the best one based on metric. How the metric values are assigned varies a bit by OS so I can't say. You generally do not want to rely on tie breakers, it is recommended that only 1 gateway exist. The OS does not know anything about other machines unless you tell it via static routes.

This is why in complex installation routing protocols are used, but it is rare to run a routing protocol on a end device.
If that's the case the second static IP should be checked on both networks, no? when i run a tracert on the static machines it cant reach, its seems to only try on the second network:

--------------------------------------------------------------------------------------------------------------
NOT WORKING
C:\>tracert 10.11.0.1

Tracing route to [10.11.0.1] over a maximum of 30 hops:

1 <1 ms <1 ms <1 ms Router2 [192.168.2.1]
2 <1 ms <1 ms <1 ms [MY PUIBLIC IP]
3 * * * Request timed out.
4 * * * Request timed out.

--------------------------------------------------------------------------------------------------------------
WORKING
C:\>tracert 10.10.0.1

Tracing route to 10.10.0.1 over a maximum of 30 hops

1 <1 ms <1 ms <1 ms Router1 [192.168.1.1]
2 9 ms 4 ms 7 ms 10.10.0.1

Trace complete.

--------------------------------------------------------------------------------------------------------------

any idea what could be causing my problem? im out of guesses if its not the default handling. If i unplug my second connection, i am able to connect to both static machines without issue.
 

apeg

Distinguished
May 14, 2011
22
0
18,510
0
Windows by default doesn't know any routes other than the default route. So it would depend on what the default route is if there is no explicit route.
It still depends on the route table on the windows box. Either there is an explicit route or the default is used. You should only have one default route.
I've set no custom routes, what could possibly cause windows to check network1 for one of the static IP's and network2 for the other? any ideas?
 
The latency is very high in the so called "working" example. Are you sure that really is your machine. What happens if you power it off does it then not respond.

Not sure the second case should not work.

There are all kinds of strangeness that can make things like this work like proxy arp.

You are best off doing it correctly so you get consistent results.
 

apeg

Distinguished
May 14, 2011
22
0
18,510
0
The latency is very high in the so called "working" example. Are you sure that really is your machine. What happens if you power it off does it then not respond.

Not sure the second case should not work.

There are all kinds of strangeness that can make things like this work like proxy arp.

You are best off doing it correctly so you get consistent results.
not sure what i could do differently? im using two identical out of the box routers, i've only changed the ip range on the second router to avoid conflicts. I've made no changes to the windows route table and when i disconnect the second router i am able to connect to both static machines without issue.
 

ASK THE COMMUNITY

TRENDING THREADS