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.

site 1 router
site 2 router
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dhiraj MuthaLevel DCommented:
Hope the attached screenshot helps.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lowest metric will be used first, dont use the same for both
Neal58Author 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.
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Dhiraj MuthaLevel DCommented:
No, metric is used to define which gateway will have priority.
Neal58Author Commented:
so the lower the metric the higher the priority? or are there defined amounts to use?
Ernie BeekExpertCommented:
Make sure that the secondary DG has a higher metric than the primary DG (for example, primary=1 and secondary =2).
Ernie BeekExpertCommented:
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.
Neal58Author 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 BeekExpertCommented:
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.
Neal58Author 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 BeekExpertCommented:
You might want to look at a hardware solution otherwise, like:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Networking

From novice to tech pro — start learning today.