Last chance failover

Kevin plug-discuss at firstpacket.com
Sun Nov 20 00:27:20 MST 2005


On Fri, 2005-11-18 at 22:11 -0700, Kurt Granroth wrote:
> I read up a bit on NIC bonding or teaming and I like the fact that it  
> presents a unified front-end to the sockets so if one NIC goes down,  
> no socket connections need to be broken.  However, bonding treats  
> both NICs as equals and sends packets round-robin.  I don't want the  
> wireless eth1 to be used at all unless it absolutely has to.  So  
> bonding/teaming is out.

Hi Kurt,
Give this another look.  Bonding and Teaming are slightly different.
Teaming is exactly what you are asking for.  Basically, you configure
them the same way, but use "mode=1" for "Active/Standby" instead of the
default "mode=0" which is "Round-Robin".



Check out /usr/src/linux/Documentation/networking/bonding.txt which
says:

mode
  active-backup or 1
  Active-backup policy: Only one slave in the bond is active.  A
different slave becomes active if, and only if, the active slave fails.
The bond's MAC address is externally visible on only one port (network
adapter) to avoid confusing the switch.  This mode provides fault
tolerance.



So, basically the config looks like this:

[root at real-server root]# modprobe bonding mode=1 miimon=100
downdelay=200 updelay=200
[root at real-server root]# ip link set dev bond0 addr 00:80:c8:e7:ab:5c
[root at real-server root]# ip addr add 192.168.100.33/24 brd + dev bond0
[root at real-server root]# ip link set dev bond0 up
[root at real-server root]# ifenslave  bond0 eth2 eth3
The interface eth2 is up, shutting it down it to enslave it.
The interface eth3 is up, shutting it down it to enslave it.
[root at real-server root]# ip link show eth2 ; ip link show eth3 ; ip link show bond0
4: eth2: <BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 100
  link/ether 00:80:c8:e7:ab:5c brd ff:ff:ff:ff:ff:ff
5: eth3: <BROADCAST,MULTICAST,NOARP,SLAVE,DEBUG,AUTOMEDIA,PORTSEL,NOTRAILERS,UP> mtu 1500 qdisc pfifo_fast master bond0 qlen 100
  link/ether 00:80:c8:e7:ab:5c brd ff:ff:ff:ff:ff:ff
58: bond0: <BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue
  link/ether 00:80:c8:e7:ab:5c brd ff:ff:ff:ff:ff:ff
        

See Section 2.3.2 here:
http://linux-ip.net/html/ether-bonding.html



Hope that helps,
...Kevin






More information about the PLUG-discuss mailing list