How to configure dual nics for redundancy

I have a Dell 1750 PowerEdge servers with two nics cards running on Linux Enterprise Server as a proxy server. How do I configure this two nics cards for redundany?
pk1008Asked:
Who is Participating?
 
jlevieConnect With a Mentor Commented:
That could be as simple as:

ping -c 2 some-local-ip >/dev/null
if [ $? -eq 1 ]; then
  ifconfig eth0 down
  ifconfig eth1 up
fi

assuming that eth1 has already been configured with the same IP as eth0 and left in a down state. You'd really want to use a fancier script that flip/flops between the active and standby interfaces and gracefully handles the case where neither is working.
0
 
jlevieCommented:
Do you really need to? A NIC is typically a very reliable device and hardly ever fails. So it isn't likely to cause an interruption in service by itself.

Does your network topology provide alternate switch/routing paths for each NIC? Unless the network infrastructure provides redundant paths for everything simply using two NIC's on the server only moves the sing point of failure out to the switch/router the NIC connects to. Typically switches and routers have much higher failure rates than a NIC.
0
 
Alf666Commented:
If you *really* want to do it and you know a good deal about networking (ans specially about IP), you could use Linux's bonding driver.

It's stable since kernel 2.4. You can find the doc in your kernel source tree :

/usr/src/linux/Documentation/networking/bonding.txt
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
pk1008Author Commented:
okay, this is what I have setup for redundancy. We have redundancy routers and switches. I assigned an ip to each NIC.
Registered both ips on a single hostname on DNS (ie.  HOSTA : 10.10.10.111  ;   HOSTA : 10.10.10.112). Referenced the
hostname by DNS on the application, in this case, if one NIC goes down, DNS should reference to the other ip. Is this config
will work properly ?
0
 
jlevieCommented:
With two A records having the same hostname, but different IP's, I believe the DNS server will round-robin between those IP's. That doesn't really provide the redundancy that you are after because with one network path down half of the requests will still go to the other IP.

Since you have redundant network paths, but apparently don't have a smart load balancer, say like an Alteon, it would make more sense to me to only have one NIC "up and running" and use a cron job or "watcher scipt" to switch the running NIC to the backup path if the primary NIC becomes unsable.
0
 
pk1008Author Commented:
I guess the caching function on the workstation still goes to the bad nic and it won't automatically switch then. Can you direct me to some sample script on some cron job that allows to switch nic if the primary goes down. Thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.