Solved

dynamic gateway switching

Posted on 2004-09-13
3
374 Views
Last Modified: 2013-12-19
Hey, I have 2 subnets 10.0.1.0/24 10.0.2.0/24. Id like to have the ability of switching the gateways (dynamicly) without having to go to the network connections( yes I know all the connections will be dropped and thats fine ) Let me know if anyone is aware of such a utility.

Regards,
Tom
0
Comment
Question by:T0masz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 37

Accepted Solution

by:
bbao earned 500 total points
ID: 12050812
just run the following batch files to dynamically switch your gateway:

1.bat:
route add 0.0.0.0 mask 0.0.0.0 10.0.1.1 metric 1
route add 0.0.0.0 mask 0.0.0.0 10.0.2.1 metric 10

2.bat:
route add 0.0.0.0 mask 0.0.0.0 10.0.2.1 metric 1
route add 0.0.0.0 mask 0.0.0.0 10.0.1.1 metric 10

assume 10.0.1.1 and 10.0.2.1 are the gateways, then 1.bat is for switching to 10.0.1.0/24, 2.bat is for switching to 10.0.2.0/24.

hope it helps,
bbao
0
 

Author Comment

by:T0masz
ID: 12056686
Thats almost exacly what I did, except I had to delete the old routes and add the new ones.

One more question, does setting the metric mean that if the first one is down it will go to the second one?

Thanks
Tom
0
 
LVL 37

Expert Comment

by:bbao
ID: 12060504
> does setting the metric mean that if the first one is down it will go to the second one?
YES. so you may even have more than two gateways.

glad to help,
bbao
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need a cheap RFID setup 10 124
BGP routing on Windows 2016 7 163
Accessing SQL Server Instance from outside the network 29 182
Where is the second IP address? 8 47
Sometimes you might need to configure routing based not only on destination IP address, but also on a combination of destination IP address (or hostname) and destination port number. I will describe a method how to accomplish this with free tools. …
This is the first one of a series of articles I’ll be writing to address technical issues that are always referred to as network problems. The network boundaries have changed, therefore having an understanding of how each piece in the network  puzzl…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

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

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

Join & Ask a Question