Blog |Follow Nick on Twitter| About
 

Maybe it's just me, but I found it incredibly hard to find how to NIC Teaming in linux similar to compaq network card teaming.

Now I'm fully aware that hp provide an official "pack" (Google Search Results Here), but what if you don't have a supported server ? - Like me ! I've actually got an old hp netserver lp1000r.

Well after an age of searching, I found redhat's page on the issue. , it was the usual scenario, if you don't know the right word, how can the search engine find it ?

For those that just want to get it working, below are the 3 config files you need ( Save them in /etc/sysconfig/network-scripts/) once you've created them add

alias bond0 bonding

to /etc/modules.conf

ifcfg-bon0

DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETWORK=192.168.2.0
NETMASK=255.255.255.0
IPADDR=192.168.1.1
USERCTL=no

ifcfg-eth0

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

ifcfg-eth1

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

Once I'd updated modules.conf & created the above files I did a reboot (to ensure bond0 get loaded into the kernel) . When the box finishes rebooting you'll have a load balanced team. In my case a 200mb Ethernet connection :cool:

[nick@WhiteBox nick]$ ifconfig -a
bond0     Link encap:Ethernet  HWaddr 00:30:6E:05:64:D7
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:373134 errors:0 dropped:0 overruns:0 frame:0
          TX packets:274144 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:38984323 (37.1 Mb)  TX bytes:37004178 (35.2 Mb)

eth0      Link encap:Ethernet  HWaddr 00:30:6E:05:64:D7
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:186460 errors:0 dropped:0 overruns:0 frame:0
          TX packets:137072 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:19476584 (18.5 Mb)  TX bytes:18475825 (17.6 Mb)
          Interrupt:11 Base address:0x1800 Memory:fb001000-fb001038

eth1      Link encap:Ethernet  HWaddr 00:30:6E:05:64:D7
          inet addr:192.168.2.101  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:186674 errors:0 dropped:0 overruns:0 frame:0
          TX packets:137072 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:19508259 (18.6 Mb)  TX bytes:18530361 (17.6 Mb)
          Interrupt:11 Base address:0x1840 Memory:fb003000-fb003038

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:698888 errors:0 dropped:0 overruns:0 frame:0
          TX packets:698888 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:80164429 (76.4 Mb)  TX bytes:80164429 (76.4 Mb)

 

 
Nick Bettison ©