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.

We have been using Microsoft's DHCP server on our domain for years with success. One of the options we are pushing to the client is the default gateway. In the Scope Options dialog it reads:

003 Router   Array of router addresses ordered by preference

Currently we have 2 routers assigned, our primary and a backup which uses a different (slower) internet connection. All has been fine with Windows XP running under this setup.

We recently began testing Windows 7 (RTM) clients as there is pressure to begin deploying the new OS when it is available. The problem is that it does not respect the "preferred order" pushed in DHCP. While the routing table shows that it is set up just like the routing table on the XP clients, it uses the second gateway instead of the first. So far the only way to make it use the first is to manually run the route CHANGE command to set the metric for the first gateway to a lower value. Since this has to be done as an elevated user, this will be problematic.

Is this just a bug in Windows 7, or is there some other DHCP option that we are unable to find that will also let us push a metric out with each gateway?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

Not sure if this is Windows XP/2003 specific, but i'd bet this may help you out..

If this doesn't help out you, id recommend creating a script that runs on boot and sets a persistent route (route -p...)

anyways, here's what microsoft says...

http://technet.microsoft.com/en-us/library/bb878104.aspx

Default route metric

TCP/IP for Windows XP and Windows Server 2003 by default automatically calculates a metric for the default route that is based on the speed of the adapter to which the default gateway is configured. For example, for a 100 megabit per second (Mbps) Ethernet adapter, the default route metric is set to 20. For a 10 Mbps Ethernet adapter, the default route metric is set to 30.

To override this behavior for DHCP-assigned default gateways, use the Default Router Metric Base Microsoft-specific DHCP option. To override this behavior for manually configured default gateways, clear the Automatic metric check box on the TCP/IP Gateway Address dialog box for the configured default gateways on the IP Settings tab in the advanced properties of the Internet Protocol (TCP/IP). The TCP/IP Gateway Address dialog box is shown in the following figure.

share|improve this answer
    
That did it! I'd seen that setting; however the documentation wasn't really clear on how it works since you can only enter 1 number. Apparently it uses that for the first gateway, then increments each by 1 after that. I entered a value of 1 and on XP machines my metric is now 1 for the first router and 2 for the second. On Windows 7 it's 31 and 32 which is still fine. –  palehorse Aug 21 '09 at 14:16

Using the Default Router Metric Base option has worked for us in the past but recently our workstations started reverting to the previous behavior.

Has anyone had recent issues with this? Despite having the 003 Default Router Metric Base option included in the DHCP scope our windows 7 machines are using a metric of 266 for the first gateway, and then 11 for the 2nd gateway.

Regardless of what we do with the DHCP scope, this issue persists unless the "automatic metric" checkbox is unchecked and a metric is set. Note that with this setup, the Default Router Metric Base option isn't needed anyways. The only thing I can think of is that a recent update changes how a windows 7 machine behaves when encountering this option.

So basically you need to specify an interface metric if the Default Router Metric Base does not work for you...

share|improve this answer

The solution is using the Default Router Metric Base option in DHCP but I found that picking the windows 2000 003 option instead of the Microsoft 003 Router Metric Base made the difference. Using the windows 2000 option it is working with XP Win7 and Win8 on my network.

share|improve this answer

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.