centos6多網絡卡bonding
繫結bond步驟:
1.進入/etc/sysconfig/network-scripts/目錄;
2.建立(或複製重新命名)bond0配置檔案:
#cp ifcfg-eth1 ifcfg-bond0
3.修改ifcfg-bond0:
#vi ifcfg-bond0
DEVICE=bond0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
BONDING_OPTS="miimon=100 mode=0"
IPADDR=192.168.1.100
NETMASK=255.255.255.0
4.修改需要繫結的其他網絡卡配置檔案:
#vi ifcfg-eth0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
5.重啟network service:
#service network restart
至此,繫結完畢。
檢視狀態:
#cat /proc/net/bonding/bond0
7種bond模型:
mode=0,(balance-rr) Round-robin policy(平衡掄迴圈策略)
mode=1,(active-backup) Active -backup policy(主-備份策略)
mode=2,(balance-xor) XOR policy(平衡策略)
mode=3,broadcast(廣播策略)
mode=4,(802.3ad) IEEE 802.3ad Dynamic link aggregation(IEEE 802.3ad 動態連結聚合)
mode=5,(balance-tlb) Adaptive transmit load balancing(介面卡傳輸負載均衡)
mode=6,(balance-alb) Adaptive load balancing(介面卡適應性負載均衡)