Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My windows machine has two network cards, both have default gateways. How does windows determine which gateway should it access when sending a packet to a remote endpoint?

More precisely, here's my routing table:

    Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
       20       10       10       10       1       20       20       20       10       20       1       1
Default Gateway:

When I send a ping to it sends an arp through the network card associated with, while when I ping it goes through How does it decide?

share|improve this question
up vote 4 down vote accepted

Your ping to goes out to based on the 3rd rule

share|improve this answer
Damn, I missed it. – rouli Aug 27 '09 at 9:40

Have a look at this:

Using multiple gateways

If you have multiple interfaces and you configure a default gateway for each interface, TCP/IP by default automatically calculates an interface metric that is based on the speed of the interface. The interface metric becomes the metric of the default route in the routing table for the configured default gateway. The interface with the highest speed has the lowest metric for its default route. The result is that whenever multiple default gateways are configured on multiple interfaces, the fastest interface will be used to forward traffic to its default gateway.

If multiple interfaces of the same speed have the same lowest interface metric, then, based upon the binding order, the default gateway of the first network adapter is used. The default gateway for the second network adapter is used when the first is unavailable.

In previous versions of TCP/IP, multiple default gateways all had a default route metric set to 1, and the default gateway used depended on the order of the interfaces. This sometimes caused difficulty in determining which default gateway the TCP/IP protocol was using.

share|improve this answer

Your Answer


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