{{parent page="Linux"}} ===NIC Bonding=== Modern servers comes with more than 1 ethernet inferface, and is perfect for use with NIC bonding. Basically, load are distributed among interfaces, and in case one of the NIC or link becomes unavailable, the IP address is still served by the remaining interface. Advanced binding (such as load balancing with cisco switch) http://www.cyberciti.biz/howto/question/static/linux-ethernet-bonding-driver-howto.php ==Setup for ES5== Create the bond0 if script %%(text;ifcfg-bond0) DEVICE=bond0 IPADDR=192.168.1.2 NETMASK=255.255.255.0 BOOTPROTO=static ONBOOT=yes BONDING_OPTS="mode=1 miimon=100" MTU=9000 %% Probe the module and bring it up %% modprobe bonding mode=1 miimon=100 ifup bond0 %% ==Setup for RHEL== Go into /etc/sysconfig/network-scripts, and reference the following config files: %%(text;ifcfg-bond0) # bonded interface DEVICE=bond0 BOOTPROTO=static BROADCAST=1.2.3.255 IPADDR=1.2.3.4 NETMASK=255.255.255.0 NETWORK=1.2.3.0 ONBOOT=yes USERCTL=no %% %%(text;ifcfg-eth0) # Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet DEVICE=eth0 USERCTL=no ONBOOT=yes MASTER=bond0 SLAVE=yes BOOTPROTO=none %% %%(text;ifcfg-eth1) # Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet DEVICE=eth1 USERCTL=no ONBOOT=yes MASTER=bond0 SLAVE=yes BOOTPROTO=none %% Then edit modules.conf so that the OS recognized /dev/bond0 %%(text;modules.conf) alias eth0 tg3 alias eth1 tg3 alias bond0 bonding options bond0 mode=balance-alb miimon=100 # # For multiple nic bonding # # This will give you the same option on all bondings alias bond0 bonding alias bond1 bonding options bonding miimon=100 mode=6 max_bonds=2 # This give you different options on each bonding alias bond3 bonding options bond1 -o bonding3 miimon=100 mode=1 %% Restart networking %% # modprobe bonding # service network restart %% ==Testing== %%(bash) less /proc/net/bonding/bond0 ifconfig -a %% ==LACP== Sample output of LACP enabled link aggregation %% Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) Bonding Mode: IEEE 802.3ad Dynamic link aggregation Transmit Hash Policy: layer2 (0) MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 802.3ad info LACP rate: slow Aggregator selection policy (ad_select): stable Active Aggregator Info: Aggregator ID: 1 Number of ports: 2 Actor Key: 17 Partner Key: 1000 Partner Mac Address: 00:25:84:04:e2:34 Slave Interface: eth1 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:0a:e4:14:c7:72 Aggregator ID: 1 Slave queue ID: 0 Slave Interface: eth2 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:0a:e4:14:c7:73 Aggregator ID: 1 Slave queue ID: 0 %%