We help IT Professionals succeed at work.

How to set an alternate Default Gateway

One of our clients has 2 sites linked via leased line. Each site also has a router and gateway.

How can i set it so that if one gateway fails to try the other?

both gateways are on the same IP range.

eg.
site 1 router 192.168.60.5
site 2 router 192.168.60.6
Comment
Watch Question

Level D
Commented:
Hope the attached screenshot helps.
Gateways.png
lowest metric will be used first, dont use the same for both

Author

Commented:
can i set any amount as the metric? so set site 1 as metric of 1, and site 2 as metric of 2 to have preferred site 1?

if this is the case then will probably do it in multiples of 10 or 100.
Dhiraj MuthaLevel D

Commented:
No, metric is used to define which gateway will have priority.

Author

Commented:
so the lower the metric the higher the priority? or are there defined amounts to use?
Ernie BeekSenior infrastructure engineer
BRONZE EXPERT
Top Expert 2012
Commented:
Make sure that the secondary DG has a higher metric than the primary DG (for example, primary=1 and secondary =2).
Ernie BeekSenior infrastructure engineer
BRONZE EXPERT
Top Expert 2012

Commented:
Hm, should have refreshed the page before commenting........

But indeed, the lower the metric the higher the priority. You can see the metric as an administrative distance.

Author

Commented:
one last check, this will over-ride any setting set on the previous IP settings page? so for example .5 is set as the static default gateway, but this will be over-ridden by the higher cost option if it needs to be?

also would the router need to be physically disconnected for the higher cost gateway to take effect?
Ernie BeekSenior infrastructure engineer
BRONZE EXPERT
Top Expert 2012

Commented:
It shouldn't over ride/write it, just add. If I remember correct, the address must be unreachable. So if the internet connection is gone but the router (and the internal ip) is still up you must disconnect it or shutdown the interface.

Author

Commented:
OK, I had assumed as much. I guess it's too much to ask that there is a way for it to check that the gateway connection is active!
Ernie BeekSenior infrastructure engineer
BRONZE EXPERT
Top Expert 2012

Commented:
You might want to look at a hardware solution otherwise, like: http://www.cisco.com/en/US/products/ps9925/index.html