标签:
物理网卡eth0 eth1绑定为bond0
ifcfg-eth0
DEVICE=eth0 ONBOOT=yes BOOTPROTO=none MASTER=bond0 SLAVE=yes
ifcfg-eth1
DEVICE=eth1 ONBOOT=yes BOOTPROTO=none MASTER=bond0 SLAVE=yes
ifcfg-bond0
DEVICE=bond0 ONBOOT=yes BOOTPROTO=none IPADDR=xx.xx.xx.xx NETMASK=xx.xx.xx.xx GATEWAY=xx.xx.xx.xx DNS1=xx.xx.xx.xx BONDING_OPTS="mode=0 miimon=100"
service network restart
[root@test ~]# cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009) Bonding Mode: load balancing (round-robin) MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Slave Interface: eth0 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:0c:29:56:a4:92 Slave queue ID: 0 Slave Interface: eth1 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:0c:29:56:a4:9c Slave queue ID: 0
拔掉eth1网线并查看日志
[root@test ~]# tail -f /var/log/messages Jan 15 15:36:24 test kernel: e1000: eth1 NIC Link is Down Jan 15 15:36:24 test kernel: bonding: bond0: link status definitely down for interface eth1, disabling it
插上eht1网线并查看日志
Jan 15 15:43:56 test kernel: e1000: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None Jan 15 15:43:56 test kernel: bond0: link status definitely up for interface eth1, 1000 Mbps full duplex.
标签:
原文地址:http://my.oschina.net/firxiao/blog/377711