john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

Linux redundant network card nic bonding

linux-redundant-network-card-nic-bonding

The Linux bonding driver provides a method for aggregating multiple network interfaces into a single logical "bonded" interface. The behavior of the bonded interfaces depends upon the mode; generally speaking, modes provide either hot standby or load balancing services. Additionally, link integrity monitoring may be performed.

prerequisite: kernel support for bonding


ubu lts 8.04

/etc/network/interfaces

The secondary network interface

auto eth1 iface eth1 inet dhcp

ethtool //diagnose eth card status

sudo apt-get update && apt-get install ifenslave-2.6 modprobe bonding

/etc/network/interfaces

auto eth0

iface eth0 inet dhcp

auto eth1

iface eth1 inet dhcp

auto bond0 iface bond0 inet static address 192.168.3.201 gateway 192.168.3.1 netmask 255.255.255.0 dns-nameservers 192.168.3.1 pre-up modprobe bonding up ifenslave bond0 eth0 eth1

Notice also that the MAC addresses (HWaddr) for bond0, eth0, and eth1 are the same. The ifenslave function takes the MAC of the first physical card and applies it to all the interfaces, with only an IP address assigned to the bond0 interface.


Red Hat Linux stores network configuration in /etc/sysconfig/network-scripts/ directory, create the bond0 config file and then modify the eth0 and eth1 files...

vi /etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0 IPADDR=192.168.1.20 NETWORK=192.168.1.0 NETMASK=255.255.255.0 USERCTL=no BOOTPROTO=none ONBOOT=yes

vi /etc/sysconfig/network-scripts/ifcfg-eth0 (on eth1 replace eth0 with 1)

DEVICE=eth0 USERCTL=no ONBOOT=yes MASTER=bond0 SLAVE=yes BOOTPROTO=none

vi /etc/modprobe.conf

alias bond0 bonding options bond0 mode=balance-alb miimon=100

modprobe bonding

service network restart

less /proc/net/bonding/bond0 //check that it's working

ifconfig


testbox:/# modprobe --list | grep bonding/lib/modules/2.6.12.4-vs2.0/kernel/drivers/net/bonding/bonding.ko testbox:/# cat /boot/config-2.6.12.4-vs2.0 | grep -i bonding CONFIG_BONDING=m


http://www.cyberciti.biz/tips/linux-bond-or-team-multiple-network-interfaces-nic-into-single-interface.html

NOTES: (windows uses NIC teaming software)

Intel and Broadcom have drivers that would allow their NIC's to be teamed

You need to download the latest full INTEL driver set, then you use device manager ( which will then have extra property tabs ) and you can set up teaming, You MUST do this from the console or a VNC session, if you do it from an RDP session it will mess up, it's a well known bug.

also may be interesting: high availability (heartbeat daemon)

http://www.linux-ha.org/


  • « Linux on usb
  • Linux red hat ubuntu basic differences »

Published

Feb 6, 2010

Category

linux

~320 words

Tags

  • bonding 1
  • card 3
  • linux 249
  • network 20
  • nic 2
  • redundant 1