Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-22-2012, 06:32 AM   #1
LQ Newbie
Registered: Feb 2012
Posts: 5

Rep: Reputation: Disabled
How to failover two ethernet cards?

Hi geeks,

Do we have any option to failover two ethernet cards on centos 5.5?
well actually m badly stuck on a situation. I have two ISP lines and both can be inserted on two wan(external) ethernet ports. but only the line works whose route to gateway is at top of routing table.
say if we have route of ISP1 at top of routing table only that works and if that line is down, the other doesn't work at all
Please suggest something!!!
i tried ethernet bonding algorithm by googling, but that requires creation of a virtual interface and the IP of that virtual interface is assigned to WAN ethernet... so cant assign the static IPs provided by ISPs at all.....

Thanks in advance
Old 02-22-2012, 06:42 AM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977
bonding isn't appropriate here, as the two connections go to different destinations. You can easily script something to manually update routes based on simple diagnostic tests if you want, just a handful of bash lines really. But you may also be interested in reading through chapter 4 or which deals with multiple ISP uplinking.

In terms of what a simple script could do, you can pick two IP addresses and statically route one IP to each link. Pick, for example, google's main name servers and if you can ping ip 1 then link 1 is fine, so you ensure the routes to pass traffic along that link are in the routing table. If you can't ping it a few times, you take the route out. Pretty simple stuff if you're not looking at aggregating bandwidth etc.


failover, loadbalancing

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ethernet bonding -- link layer detection failover isn't enough, smarter detection? pwn Linux - Networking 1 07-10-2011 10:42 PM
How to configure two network cards in failover configuration rajesh.bahl Linux - Networking 3 11-06-2009 12:01 AM
What are some failover NIC cards that work with Linux? abefroman Linux - Hardware 2 10-11-2008 01:56 AM
Redhat 8.0 2 NIC Cards, trying to failover jweiss Linux - Networking 1 06-03-2003 04:08 PM
Ethernet Cards and Sound Cards SchizoIV Linux - Newbie 2 07-05-2002 09:10 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:50 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration