Share via


Windows 10 with two default route with same metric

Question

Sunday, June 23, 2019 7:54 AM

Recently I faced a scenario where the routing table had two entries for default route and that too with same metric. After doing some research, I found that if we configure same adapter metric manually for WiFi and Ethernet then we will have two default route with the same metric in the routing table.

IPv4 Route Table

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    10.38.145.254     10.38.144.34     25
          0.0.0.0          0.0.0.0    10.38.151.254     10.38.150.78     25

Which interface will be used to forward traffic?

All replies (8)

Monday, June 24, 2019 2:27 AM

Hi,

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.

For your reference:

/en-us/previous-versions/windows/it-pro/windows-server-2003/cc779696(v=ws.10)  

Best regards,

Travis

Please remember to mark the replies as an answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected]


Tuesday, June 25, 2019 12:29 PM

The Network Adapter Binding is for older version of windows. This setting has already been removed in Windows 10.

My question is Windows 10 specific.


Wednesday, June 26, 2019 2:39 AM

Hi,

*This setting has already been removed in Windows 10. *

I have not found a related article saying that the feature has been removed. Can you provide relevant links?



However, whenever multiple default gateways are configured on multiple interfaces, the fastest interface will be used to forward traffic to its default gateway. 

Bitwise AND of the IP address and netmask, and choose the route with the most number of 1.

Best regards,

Travis

Please remember to mark the replies as an answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected]


Wednesday, June 26, 2019 4:45 AM

The screenshot you attached shows Provider Order and not the network adapter order.

Here is the link that tells that Adapter Binding order settings are removed: https://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_web/cannot-change-network-binding-order-in-windows-10/08d775da-24d6-4b26-96fe-355920e879a0?auth=1

I know how to navigate a routing table. But, my question is if I have two default routes(0.0.0.0/0) and that too with the same metric(25) then which route will windows use for traffic forwarding? (Check my original question is has a part of routing table I am concerned with)


Wednesday, June 26, 2019 6:32 AM

While researching futher, I found that GetAdaptersAddresses had a flag GAA_FLAG_INCLUDE_TUNNEL_BINDINGORDER that can be used to get the binding order. But, it does not seem to work. Then on further research, I found that the flag was deprecated in Server 2012R2

Ref: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn303411(v=ws.11)

Since the flag was deprecated, there must be an alternative way of determining the default interface.


Thursday, June 27, 2019 10:00 AM

Hi,

Thanks for your details.

We don't suggest you configure multiple default gateways because it can cause connectivity problems.

Maybe you can disable Automatic Metric feature for IPv4 routes:

https://support.microsoft.com/en-us/help/299540/an-explanation-of-the-automatic-metric-feature-for-ipv4-routes

Best regards,

Travis

Please remember to mark the replies as an answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected]


Sunday, June 30, 2019 5:50 PM

Thanks Travis for the suggestion. The problem gets resolved if we use Automatic Metric. But, my original question was what if there are two default routes and that too with same metric. Then which adapter will be used for traffic forwarding? So far I have no proper answer for this for Windows 10 since the binding order does seems to be deprecated.


Monday, July 1, 2019 9:55 AM

Hi,

Sorry, I misunderstood the provider order and binding order.

After doing some research, I came to the conclusion that the default gateway is chosen according to the provider order.

Best regards,

Travis 

Please remember to mark the replies as an answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected]