Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How does windows treat interface metric (which you can set at interface ip settings) and route settings? Which one does it prefer? What if I have interface with metric 1 but for this address there is other interface route with higher metric?

share|improve this question
    
Additional information to the interface metric can be found in Microsoft's explanation of the Automatic Metric feature for Internet Protocol routes. Unfortunately no complete answer to the question. –  Thomas Sep 24 '12 at 16:07
add comment

1 Answer

From Microsoft's route article on Technet:

The route with the lowest metric is chosen.

Q: What if I have interface with metric 1 but for this address there is other interface route with higher metric?

If you have similar routes with different metrics, the lowest metric route for the destination is chosen.

In case of overlapping routes, keep in mind that route matches with longer netmasks are always better than route matches matches with shorter netmasks (so route match length is more important than lower metric). If you ever have a question about which route windows chose for a destination, use route print <destination> from the cmd prompt

Trivial example:

[Mike_Pennington@Win7 ~]$ route print 127.0.0.1
===========================================================================
Interface List
 15...5c 26 0a 39 ac 9d ......Intel(R) 82577LM Gigabit Network Connection
 12...58 94 6b e4 c8 28 ......Intel(R) Centrino(R) Advanced-N 6200 AGN
  1...........................Software Loopback Interface 1
 24...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
 11...00 00 00 00 00 00 00 e0 Microsoft Teredo Tunneling Adapter
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306 <---
===========================================================================
Persistent Routes:
  None

IPv6 Route Table
===========================================================================
Active Routes:
  None
Persistent Routes:
  None
[Mike_Pennington@Win7 ~]$
share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.