Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have three Windows Web Server 2008 SP2 machines on a 10.100.20/24 subnet. I need to setup a persistent routing rule so that outgoing traffic to the same subnet goes through a hardware load balancing device.

In Server 2003 it is as simple as adding a persistent route using the command:

route add -p mask

In server 2008 that same command does add a similar persistent route, but the system basically ignores it even though it has a lower metric than the default record.

Here is the Server 2008 output from route print:

IPv4 Route Table

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric

    276         On-link    276     21         On-link    276         On-link    276         On-link    276         On-link    306         On-link    306        On-link    306         On-link    306         On-link    276        On-link    306        On-link    276

Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric       1

To illustrate the problem, here is the output from a trace-route in Server 2008:

Tracing route to over a maximum of 30 hops

  1)    <1 ms    <1 ms    <1 ms

Trace complete.

As you can see, the rule with the lower metric of 21 is ignored and the route goes directly to the machine on the 10.100.20/24 subnet. The routing should have gone through before going on to In Server 2003 this works correctly, but Server 2008 seems to ignore the rule with the lower metric. If I manually remove the default route so that my custom routing record is the only one for, then it is properly routed through the load balancing machine.

I've worked with Microsoft tech support and their proposed solution is to set the NIC to ignore all the default routing records and add every routing rule as a persistent route. I'm having trouble manually setting up all the rules to work properly, but I can work that out with Microsoft.

If there is a way to actually get Server 2008 to adhere to the metric rules, or script something to handle an event every time the TCP stack is initialized to remove the default route, or edit the registry to remove the default route when TCP initializes, any one of those solutions would be better in my opinion.

share|improve this question

migrated from May 3 '11 at 15:36

This question came from our site for professional and enthusiast programmers.

3 Answers 3

I think if the network is directly connected, the server is going to ignore the route table and just use that link regardless of the metric.

share|improve this answer

If the destination IP is on a directly connected network, Windows will never lookup potential routes.

It's that simple.

Related, some VPN software overrides this so the VPN will work when both the VPN and the local network have the same subnet.

share|improve this answer

I just ran into a similar (identical?) issue with a VPN routing problem. The VPN connection has the subnet on the other side, so I added a persistent route with a low metric to hit that network. This route was consistently ignored. I solved the problem by added all 4 class C subnets as persistent routes, which did work as expected, even without ignoring default routes.

share|improve this answer
There haven't been "classes" for 18 years. Additionally, your routes were probably ignored because they were less specific than existing routes. Metric is only used as a tie breaker for routes with the same network mask. –  Chris S May 25 '12 at 2:41
The routes were not less specific than existing routes. They were significantly more specific, in fact. I empirically proved that routes added using "route add" were ignored after some period of time, but that routes added using netsh did, in fact persist. –  Harper Shelby May 25 '12 at 18:32

Your Answer


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