Windows 7 does not respect the prefered router order from DHCP

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?


Solution 1:

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.