Metric for the default route
Hello, I'm using a laptop with Windows 7 and have several network adapters installed (two physical adapters and several virtual adapters). Now, I played with the interface metric of the physical interfaces so I could have both plugged in, and with different "priorities" for the two corresponding default gateways. All seemed to work fine, but now I disconnected one of the two physical interfaces and changed the metric of the other physical interface back to "Automatic metric". Once I did that, I checked the metric of the default route corresponding to the now only physical interface present, and I get this: =========================================================================== Interface List 64...00 21 6a 46 10 ef ......Microsoft Virtual WiFi Miniport Adapter #5 27...00 05 9a 3c 78 00 ......Cisco Systems VPN Adapter 14...00 ff 3b a2 00 3e ......TAP-Win32 Adapter V9 13...00 21 6a 46 10 ee ......Intel(R) WiFi Link 5300 AGN 11...00 24 7e 68 45 48 ......Intel(R) 82567LM Gigabit Network Connection 18...08 00 27 00 54 1a ......VirtualBox Host-Only Ethernet Adapter 1...........................Software Loopback Interface 1 12...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter 73...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #2 74...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface 75...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #3 97...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #5 77...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #4 63...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter #8 =========================================================================== IPv4 Route Table =========================================================================== Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 My_Def_Gw_IP_Addeess My_Interf_IP_Address 276 127.0.0.0 255.0.0.0 On-link 127.0.0.1 306 127.0.0.1 255.255.255.255 On-link 127.0.0.1 306 127.255.255.255 255.255.255.255 On-link 127.0.0.1 306 144.254.221.39 255.255.255.255 My_Def_Gw_IP_Addeess My_Interf_IP_Address 100 My_Network_IP_Subnet 255.255.255.0 On-link My_Interf_IP_Address 276 My_Interf_IP_Address 255.255.255.255 On-link My_Interf_IP_Address 276 My_Network_Broadcast 255.255.255.255 On-link My_Interf_IP_Address 276 192.168.56.0 255.255.255.0 On-link 192.168.56.1 276 192.168.56.1 255.255.255.255 On-link 192.168.56.1 276 192.168.56.255 255.255.255.255 On-link 192.168.56.1 276 224.0.0.0 240.0.0.0 On-link 127.0.0.1 306 224.0.0.0 240.0.0.0 On-link 192.168.56.1 276 224.0.0.0 240.0.0.0 On-link My_Interf_IP_Address 276 255.255.255.255 255.255.255.255 On-link 127.0.0.1 306 255.255.255.255 255.255.255.255 On-link 192.168.56.1 276 255.255.255.255 255.255.255.255 On-link My_Interf_IP_Address 276 =========================================================================== Persistent Routes: Network Address Netmask Gateway Address Metric 0.0.0.0 0.0.0.0 My_Def_Gw_IP_Addeess Default =========================================================================== Apologies for making the above output harder to read by removing the actual IP addresses, but it's for confidentiality reasons. Also, the above values remain the same even after rebooting the PC. Does anyone have any idea why the metric of the default route is so high in absolute value (as a number) and so low in priority (as a network route priority level)? Also, how can I make it go back to 20 or something, as I remember it used to be before playing with the interface metric? Thanks in advance! Regards, George Iosif
March 3rd, 2010 12:47pm
Hi,
That is based on your network devices. Whether they are higher or lower, it does not affect anything. You may read the following articles to better understand routing table.
Routing Tables
Making Sense of Windows Routing Tables
Important Note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.Arthur Xie - MSFT
Free Windows Admin Tool Kit Click here and download it now
March 4th, 2010 9:16am
Hi Arthur, Thanks for the quick response! I agree with you that, as long as I have a single default route entry, it doesn't matter what metric value is displayed. However, when I will connect a 2nd physical adapter (which will get its own default route/gateway), the metrics will matter. Actually, my initial post had two purposes: 1. to find out why the metric of the default route of my current physical adapter is now 276, instead of the 20 I remember I used to have (for the same adapter); 2. to solve the problem that will arise when I will attach a 2nd physical adapter (which is likely to add its own default route with a metric of 20, thus, making it the preferred route). I also read the articles you mentioned, but they do not provide an answer to any of my two points above. Any other toughts? Thanks, George Iosif
March 4th, 2010 10:33pm
Hi George,
In multi-homed system, it will check and compare the metrics and select the most proper one. We can manually choose the default route in IPv4 setting and routing table. After selecting a default gateway you will find that the metric of the default route may be changed.Arthur Xie - MSFT
Free Windows Admin Tool Kit Click here and download it now
March 8th, 2010 8:37am
Hi Arthur,
Maybe it's my poor English skills, but I don't really understand your last post and, more exactly, how it relates to the 2 points I raised (please see my 2nd post).
Can you be a little bit more explicit please?
Thanks,
George Iosif
March 22nd, 2010 12:22am
Anyone?
Thanks,
George Iosif
Free Windows Admin Tool Kit Click here and download it now
March 27th, 2010 12:38pm
George is right, you're not making sense in your reply. Are you taking your reply from a book or something? Even the links you provided does not help in explaining why the metric number changed.
What is sought is not the value rather the number. I remember one can specify "10" as the number for a metric and get a "10" number but in this case wtf did the number "276" came from??
October 30th, 2010 8:38am
It seems to be related to the "'automatic metric' feature (see http://support.microsoft.com/kb/299540). But I'm still not able to set the metric of the default route to 1 (if I set 1 in the IPV4 properties of the network adapter, I get 20).
Free Windows Admin Tool Kit Click here and download it now
February 5th, 2011 6:56am
I have the same issue. I cannot enforce Windows 7 64-bit to use my preferred default route unless I disable my wireless. I don't have this problem on my XP. On my windows 7, IPv6 is completely disabled from the registry and the adapters.
At the IPv4 property of the adapters, I have unchecked "Automatic metric" and assigned a lower number to my wired and a higher number to my wireless. Unfortunately, the metric numbers for both remain unchanged (even after reboot). Reading my route
table, I still get 266 for my wired and 50 for my wireless. But it did fix the "Limited Connection" problem on my wireless with this manual metric number assignment.
To me, Windows 7 doesn't obey this rule anymore.
May 28th, 2011 11:56am
@ kankank
I am having exactly the same issue ...
Did you manage to find a solution for the problem?
If so please helpp
--
V
Free Windows Admin Tool Kit Click here and download it now
June 27th, 2011 6:25pm
No, I wish I could find a solution.
June 27th, 2011 8:40pm
I got the reason , but I am not able to find a solution , so if someone could help here
The final metric that we get on " Route print " is actually an addition of the GATEWAY METRIC + INTERFACE METRIC
type "netsh interface ip show address" ==> we get 2 metrics for each adapter i, e gateway metric and interface metric
Then type "route print" and verify
Now unless we set a preferred Gateway it is not possible to have manual setting of a gateway metric .
Does someone know of a way that gateway metric can be manipulated without setting a default gateway ??
Thanks
V
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2011 1:38pm
Last night, I found this
http://blog-rat.blogspot.com/2011/06/forcing-windows-7-to-use-wired-when.html and it works for me.
June 30th, 2011 3:38pm