gateway metric cost

quick explanation of the situation.
2003 server 1 Nic.
2 internet feeds
what i want to do is have the server attempt network traffic over the first feed and if it is unable to reach the destination then it will try across the 2nd feed.
My thinking on this is that if i add two gateways to the NIC with a lower metric on the first then that should work as per and

My understanding is that the metric is basically a cost on the connection, so do i simply set them as 1 and 2 or do i need to set them as say 1 and 10000 as i am not sure if the cost is simply added to the total cost of the route.

Eg if browse to google
gateway 1
  cost of metric = 1
  cost of route = 50
  Total cost = 51

Gateway 2
  cost of metric = 2
  cost of route = 30
  Total cost = 32

So in this instance as gateway 2 can get to the site quicker it will have a lower total cost and therefore will allways get used in preferance to gateway 1. But if i set the gateway 2 metric to 1000 then the total cost on the route for gateway2 would be 1030 which is higher.

Can anyone shed some light on this for me.
LVL 19
Andrew DavisManagerAsked:
Who is Participating?
lanboyoConnect With a Mentor Commented:
You can tweak which interface is used in a multi nic situation by pointing the routes at an interface. Like almost any routing device, windows boxes will go to the more specific route before a less specific route. So if you have a route to the remote handset subnet pointing at the gateway on nic 2, it will use this in preference to a static route pointing to nic 1.

If the interface drops, it will use the less specific route. Of course in a dual nic windows box this is changing what th ip of the host appears to be..
In 2003 you can use automatic metric, but that may do strange things.

Metric only comes into effect when you have two routes to the same location. So in your gateway, or default route, scenario you'd have two entries to network mask via the same interface but different 'next hop' or gateway so the metric you set doesn't really matter, can be 100/200 or 1/2 but to keep it safe you may want to use values above 20.

Further more, an issue you have here is that the 2k3 box will only swap the route if the next-hop goes down, which is unlikely if it is a router. You're better off doing path selection on a router level, or if you really must use the 2k3 box use one of the dynamic routing protocols that 2k3 supports - providing your routers support said protocol also.
Andrew DavisManagerAuthor Commented:
thats all fine. the issue that i have is that i have a VOIP service on one subnet with its own router, and then an existing data network, and the data network needs to see the voip network and i cannot adjust either router, so the simple answer was to put the server onto the voip network via a second ip on the nic and then create a second connection to the voip router (for access to remote VPN handsets). the same time try to keep the data network off of the voip cloud.
QlemoBatchelor and DeveloperCommented:
That's more easily done with a specific route on the VoIP network.

NIC1 - data network:
  • default gateway set to the data network router
  • normal network and host routes for the data network internal IP addresses with NIC1 as gateway
NIC2 - VoIP network:
  • No default gateway (!)
  • normal network and host routes for the VoIP network internal IP addresses with NIC2 as gateway
  • optional network routes for remote VoIP addresses, using VoIP gateway.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.