LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   bonding problems (http://www.linuxquestions.org/questions/linux-networking-3/bonding-problems-438843/)

jtshaw 04-25-2006 10:03 PM

bonding problems
 
I am currently using the bonding driver from the Linux kernel to provide an active backup ethernet interface on my server.

My setup is consistent with how the Linux Ethernet Bonding Driver Howto suggests one does HA bonding. In other words, I have two switches on the same VLAN, one slave plugs into each switch.

Looking at the output of the bonding driver (cat /proc/net/bonding/bond0) I see the following:

Code:

[root@tcpcrossbar1 root]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v2.6.0 (January 14, 2004)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth3
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth2
MII Status: up
Link Failure Count: 1
Permanent HW addr: 00:14:c2:3f:0a:63

Slave Interface: eth3
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:14:c2:3f:0a:50

Now, according to the driver documentation the inactive interface should be just that, inactive. The problem I am seeing is there is a steady stream of traffic coming into the primary interface but I am also seeing a consistent and steady stream of traffic (though a lot less traffic) coming into the inactive interface. Only the active interface ever sends data. Now, where this really becomes a problem is that my core switches are complaining of duplicate mac addresses on the inactive interface port.

Has anyone experienced these problems and if so do you have any suggestions?

John

williamwbishop 04-26-2006 08:38 PM

Can you post your configuration?

jtshaw 04-28-2006 10:21 AM

Well.. what we do is a bit of a kluge... for various application reasons we use RHEL3 which does not support bonding with DHCP... However, we need DHCP in conjunction with our blades because we have far too many machines and we want a central place to configure IPs (it is DHCP but each server has a static address assigned to its MAC).

So what I've done is put the configuration for eth0 to boot like a standard DHCP network card (eth1 is not configured by the OS). I then have an init script that runs directly after the networking script that does the following:

Code:

#!/bin/bash
ETH0_MAC=$( ifconfig eth0 |awk '/HWaddr/{print $5}' )
ETH0_IP=$( ifconfig eth0 |awk -F: '/inet addr/{print $2}' |awk '{print $1}')
ETH0_NETMASK=$( ifconfig eth0 |awk -F: '/Mask/{print $4}' )

case "$1" in
  start)
  echo "Bonding eth0 and eth1"
  /sbin/ifdown eth0
  /sbin/ifdown eth1
  /sbin/modprobe bonding mode=1 miimon=100 primary=eth0
  /sbin/ifconfig bond0 $ETH0_IP netmask $ETH0_NETMASK hw ether $ETH0_MAC
  /sbin/ifenslave bond0 eth0
  /sbin/ifenslave bond0 eth1
  /sbin/route add default gw XXX.XXX.XXX.XXX bond0
  ;;
  stop)
  /sbin/ifdown eth0
  /sbin/ifdown eth1
  /sbin/ifconfig bond0 down
  /sbin/rmmod bonding
  ;;
  restart|reload)
  $0 stop
  $0 start
  ;;
  status)
  cat /proc/net/bonding/bond0
  ;;
  *)
  echo $"Usage: $0 {start|stop|status|restart|reload}"
  exit 1
esac

Again, this is somewhat of a hack but RedHat didn't support DHCP w/ bonding until RHEL4 and our application server didn't support RHEL4 until recently.

I did install a new version of the nic card and bonding drivers from HP (the devices in question are HP BL25p's) and I'll give that a shot.

If you have any other suggestions I'm all ears.

John


All times are GMT -5. The time now is 09:55 AM.