Solved

dynamic gateway switching

Posted on 2004-09-13
3
360 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
  • 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

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

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

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. …
I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

830 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