Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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.