Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 333
  • Last Modified:

Need network failover script

I need a script to change the network connection during network down. This is my configuration.
Having three NIC, eth0 connected to local network and eth1 & eth2 are connected to internet using two seprate DSL connection.

This is my requirement:

If one DSL connection is down means automatically script to change the internet connection to another working DSL.

Any script is there for my requirement?
0
rajasekarramasamy
Asked:
rajasekarramasamy
  • 4
  • 2
1 Solution
 
deimarkCommented:
Writing a script should be straightforward bud,all you should need is an "ifdown ethx", "ifup ethy" as long as the IPs etc have been assigned already.

The issue will be how to efficiently monitor the network connection to trigger the switch.

Perhaps a cron to access some form of net resource, ie web site, FTP etc, and if the access fails, trigger the network switch.
0
 
RowleyCommented:
0
 
deimarkCommented:
Is keepalived not just related to the LVS project and removing LVS systems?

Pardon my ignorance here, just to understand a wee bit.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
RowleyCommented:
Afaik, you can use it for pretty much any IP service. I previously used keepalived to have a single entry point for a couple of vpn's to a partner, worked like a charm, admittedly this was a few years back before we got vpn concentrators, but hey it worked, and its free.

http://www.linux.com/feature/114005
0
 
deimarkCommented:
Ahh, I see now.

Looks quite neat.

Thanks for clarifying.
0
 
rajasekarramasamyAuthor Commented:
Any shell script is there for my requirement.
0
 
deimarkCommented:
I thought that Rowley answered the question quite well with keepalived.

Not sure what ele he is looking fo rhere.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now