Bonding netwerk-kaarten met Linux Redhat

Now we need to edit the existing configuration files for the two NIC that will conform the combined interface.

Content of /etc/sysconfig/network-scripts/ifcfg-eth0 file

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

Content of /etc/sysconfig/network-scripts/ifcfg-eth1 file

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

Here we are using the MASTER and SLAVE and directive to configuring channel bonding. For both interfaces we will use bond0 as the master & each interface will act as slave for bond0 interface. After this point we are done with network configuration file modification. Now we have to add the following line to /etc/modprobe.conf file:

alias bond0 bonding

Then execute the following two commands:

modprobe bond0
service network restart

If network interface bond0 starts without any problem then you have configured channel bonding successfully. To test whether bonding is working or not you can disconnect one interface and observer the change in /var/log/message file. When you will disconnect the interface one or more packet loss my occur but thats is negligible. For this particular example I have used Redhat Enterprise Linux 5.4. The procedure should be same for other version.

Now we need to edit the existing configuration files for the two NIC that will conform the combined interface.

Content of /etc/sysconfig/network-scripts/ifcfg-eth0 file

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

Content of /etc/sysconfig/network-scripts/ifcfg-eth1 file

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

Here we are using the MASTER and SLAVE and directive to configuring channel bonding. For both interfaces we will use bond0 as the master & each interface will act as slave for bond0 interface. After this point we are done with network configuration file modification. Now we have to add the following line to /etc/modprobe.conf file:

alias bond0 bonding

Then execute the following two commands:

modprobe bond0
service network restart

If network interface bond0 starts without any problem then you have configured channel bonding successfully. To test whether bonding is working or not you can disconnect one interface and observer the change in /var/log/message file. When you will disconnect the interface one or more packet loss my occur but thats is negligible. For this particular example I have used Redhat Enterprise Linux 5.4. The procedure should be same for other version.

Comments are closed.