Solved

# gateway metric cost

Posted on 2009-05-18
578 Views
Last Modified: 2012-05-07
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 http://wiki.answers.com/Q/What_is_Gateway_and_Metric and http://support.microsoft.com/kb/299540

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.
0
Question by:Andrew Davis
4 Comments

LVL 13

Expert Comment

ID: 24418210
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 0.0.0.0 mask 0.0.0.0 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.
0

LVL 18

Author Comment

ID: 24419071
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.
0

LVL 10

Accepted Solution

lanboyo earned 500 total points
ID: 24420499
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..
0

LVL 69

Expert Comment

ID: 24420684
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.
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

### Suggested Solutions

Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

#### 770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.