Solved

dynamic gateway switching

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

A brief overview to explain gateways, default gateways and static routes OR NO - you CANNOT have two default gateways on the same server, PC or other Windows-based network device. In simple terms a gateway is formed when a computer such as a serv…
FIPS stands for the Federal Information Processing Standardisation and FIPS 140-2 is a collection of standards that are generically associated with hardware and software cryptography. In most cases, people can refer to this as the method of encrypti…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

813 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now