Home > Tip, ubuntu > Ethernet bonding howto in Ubuntu 10.10

Ethernet bonding howto in Ubuntu 10.10

Tested in 64bit environment.

1) echo “alias bond0 bonding” > /etc/modprobe.d/bonding.conf
2) apt-get install ifenslave
3) edit /etc/network/interfaces as follows
# The loopback network interface
auto lo
iface lo inet loopback

auto bond0
iface bond0 inet static
# change the next three lines according to actual network settings
address 192.168.1.200
gateway 192.168.1.1
netmask 255.255.255.0

slaves eth0 eth1
bond-mode balance-rr
bond-miimon 100
bond-primary eth0 eth1
up /sbin/ifenslave bond0 eth0 eth1
down /sbin/ifenslave -d bond0 eth0 eth1

4) either do a complete system reboot or the following:
a) /etc/inti.d/networking restart
b) ifconfig eth0 0 (and ignore the error, this [ and the next ] command will delete what ever ip address that eth0 has been originally set to)
c) ifconfig eth1 0
d) adjust the routes if necessary, mostly the default route needs to be replaced (change to via bond0 instead of eth0 or eth1, for example:
route del default dev eth0
or
route del default dev eth1
)

Regardless which method is chosen in step 4, it’s usually safer to change the network setting through a local console instead of a remote ssh session.

Source: https://help.ubuntu.com/community/UbuntuBonding

Advertisements
Categories: Tip, ubuntu
  1. steve bacon
    March 18, 2011 at 12:19 am

    will this work on 10.04 64 bit as well?

  2. Musa
    May 27, 2011 at 11:23 am

    could you kindly let me know what is the function of the following line:
    “down /sbin/ifenslave -d bond0 eth0 eth1”

    • ricoch3n
      May 29, 2011 at 3:54 am

      @Musa,
      down: run the command right after it when interface is being shutdown
      option -d in command ifenslave is to detach the slave interfaces (eth0, eth1) from the bonding device (bond0), details can be found here: http://linux.die.net/man/8/ifenslave
      Hope that helps.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: