# ifconfig bond0: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST> mtu 1500 inet 172.16.0.183 netmask 255.255.255.0 broadcast 172.16.0.255 inet6 fe80::862b:2bff:fe6a:76d4 prefixlen 64 scopeid 0x20<link> ether 84:2b:2b:6a:76:d4 txqueuelen 0 (Ethernet) RX packets 11183 bytes 1050708 (1.0 MiB) RX errors 0 dropped 5152 overruns 0 frame 0 TX packets 5329 bytes 452979 (442.3 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 em1: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1500 ether 84:2b:2b:6a:76:d4 txqueuelen 1000 (Ethernet) RX packets 3505 bytes 335210 (327.3 KiB) RX errors 0 dropped 1 overruns 0 frame 0 TX packets 2852 bytes 259910 (253.8 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 em2: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1500 ether 84:2b:2b:6a:76:d5 txqueuelen 1000 (Ethernet) RX packets 5356 bytes 495583 (483.9 KiB) RX errors 0 dropped 4390 overruns 0 frame 0 TX packets 1546 bytes 110385 (107.7 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 0 (Local Loopback) RX packets 17 bytes 2196 (2.1 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 17 bytes 2196 (2.1 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
测试网络高可用, 我们拔掉其中一根网线进行测试, 结论是:
在本次mode=6模式下丢包1个, 恢复网络时( 网络插回去 ) 丢包在5-6个左右,说明高可用功能正常但恢复的时候丢包会比较多
测试mode=1模式下丢包1个,恢复网络时( 网线插回去 ) 基本上没有丢包,说明高可用功能和恢复的时候都正常
mode6这种负载模式除了故障恢复的时候有丢包之外其它都挺好的,如果能够忽略这点的话可以这种模式;而mode1故障的切换和恢复都很快,基本没丢包和延时。但端口利用率比较低,因为这种主备的模式只有一张网卡在工作.