internet with two nics

  • Thread starter Thread starter cdoc
  • Start date Start date
C

cdoc

Hello
I have a question for learning purposes and just plain curiosity.
Hope that is appropriate for this forum.
Let's say that I have a pc with two network cards which are each
connected to routers that have internet access on them.
How does windows, browsers, etc decide which nic that it will use to
access the internet. Does it assign a metric # for each interface and
use that.
Thanks in advance
 
Normally with two NICs, you would specify a default gateway on one or the
other, but not both. If both are getting their IP settings from a DHCP
server which includes a gateway, you'll have two default gateways listed. If
no metric is assigned, the gateway listed first (below the other) in a
"route print" form the command line will be the one used. If these are just
Internet routers, or if both routers can get to all the same places this is
not a problem. If you have routes to different places via each router, this
will cause problems.

...kurt
 
One last question on that.
Assuming the following were true:

"If both are getting their IP settings from a DHCP server which
includes a gateway, you'll have two default gateways listed. If no
metric is assigned, the gateway listed first (below the other) in a
"route print" form the command line will be the one used."

Is there a way to change that order?
 
Yes. You can manually delete the default routes and add one or the other
back in. From the command line:

route delete 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 <gateway address> [options]

try route /? for a full list of syntax and options.

....kurt
 
Back
Top