總網頁檢視次數

星期六, 8月 15, 2009

CENTOS 5.3 bonding ( my own script )

#vi /etc/modprobe.conf

Add following two lines

alias bond0 bonding
options bond0 miimon=80 mode=6

*** backup configuration files for rollback
#cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0.bak
#cp /etc/sysconfig/network-scripts/ifcfg-eth1 /etc/sysconfig/network-scripts/ifcfg-eth1.bak

#vi /etc/sysconfig/network-scripts/ifcfg-eth0

Del all except the hardware mac address (HWADDR=xx:xx.... )
Add the following lines

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

#vi /etc/sysconfig/network-scripts/ifcfg-eth0

Del all except the hardware mac address (HWADDR=xx:xx.... )
Add the following lines

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

*** Add new bond0 configuration file
#vi /etc/sysconfig/network-scripts/ifcfg-bond0

Add the following lines

DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=x.x.x.x
GATEWAY=x.x.x.1
USERCTL=no
MTU=9000


That's all ... restart network to test

#service network restart

Remember to test reboot and see if all configuration will be up automatically ..

#shutdown -r now

沒有留言: