Step
1> /etc/modprobe.conf add:
alias bond0 bonding
options bond0 mode=1 miimon=100 arp_interval=60 arp_ip_target=192.168.0.254
alias bond0 bonding
options bond0 mode=1 miimon=100 arp_interval=60 arp_ip_target=192.168.0.254
Note:mode 0 is Round-robin,mode 1 is Active-backup,more message see /usr/share/doc/kernel/networking/bonding.txt
2> /etc/rc.d/rc.local add:
ifenslave bond0 eth0 eth1
ifenslave bond0 eth0 eth1
3> create /etc/sysconfig/network-scripts/ifcfg-bond0 :
DEVICE=bond0
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.168.0.11
NETMASK=255.255.255.0
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
USERCTL=no
DEVICE=bond0
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.168.0.11
NETMASK=255.255.255.0
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
USERCTL=no
4> modify /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
USERCTL=no
ONBOOT=yes
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
DEVICE=eth0
USERCTL=no
ONBOOT=yes
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
5> modify /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
USERCTL=no
ONBOOT=yes
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
DEVICE=eth1
USERCTL=no
ONBOOT=yes
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
6> modify/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=dns.test.cn
GATEWAY=192.168.0.254
NETWORKING=yes
HOSTNAME=dns.test.cn
GATEWAY=192.168.0.254
7> see bonding stat ,cat /proc/net/bonding/bond0
没有评论:
发表评论