Bonding refers to the process to binding an IP Address interface to one or more interface for redundancy purpose.
Here I have posted how to creating a bonded interface by binding eth0 and eth1 together.
Steps to create IP Address Bonding in Linux :
1) # cd /etc/sysconfig/network-scripts/
2) # touch ifcfg-bond0 /* Creating a IP address configuration file for Bonding inteface */
3) # vi ifcfg-bond0 and add the following information:
DEVICE = bond0
IPADDR = IP address of your interface
NETMASK = Corresponding netmask
GATEWAY = Gateway address
BOOTPROTO = none
ONBOOT = Yes
If you find difficult in typing this information, these informations could be copies from one of the configuration files like "ifcfg-eth#" and it can be edited.
4) Similarly edit, # vi ifcfg-eth0 and ifcfg-eth1
Ensure you have only the below informations on both the files.
DEVICE = eth#
BOOTPROTO = yes
ONBOOT = yes
MASTER = bond0
SLAVE = yes
This ensures that the bond0 is used as a primary interface and eth0 and 1 act as a secondary interface.
5) Edit /etc/modprobe.conf
alias bond0 bonding
alias bond0 mode=balance_alb miimon=100
6) # modprobe bonding
7) # service network restart
8) # chkconfig network on
9) Restart the machine.
10) Finally verify the bonded interface in # ifconfig -a
11) Can also be verified in /proc/net/bonding/bond0.
Here I have posted how to creating a bonded interface by binding eth0 and eth1 together.
Steps to create IP Address Bonding in Linux :
1) # cd /etc/sysconfig/network-scripts/
2) # touch ifcfg-bond0 /* Creating a IP address configuration file for Bonding inteface */
3) # vi ifcfg-bond0 and add the following information:
DEVICE = bond0
IPADDR = IP address of your interface
NETMASK = Corresponding netmask
GATEWAY = Gateway address
BOOTPROTO = none
ONBOOT = Yes
If you find difficult in typing this information, these informations could be copies from one of the configuration files like "ifcfg-eth#" and it can be edited.
4) Similarly edit, # vi ifcfg-eth0 and ifcfg-eth1
Ensure you have only the below informations on both the files.
DEVICE = eth#
BOOTPROTO = yes
ONBOOT = yes
MASTER = bond0
SLAVE = yes
This ensures that the bond0 is used as a primary interface and eth0 and 1 act as a secondary interface.
5) Edit /etc/modprobe.conf
alias bond0 bonding
alias bond0 mode=balance_alb miimon=100
6) # modprobe bonding
7) # service network restart
8) # chkconfig network on
9) Restart the machine.
10) Finally verify the bonded interface in # ifconfig -a
11) Can also be verified in /proc/net/bonding/bond0.
No comments:
Post a Comment