论坛首页 综合技术论坛

linux 绑定模式分别为冗余和均衡负载时信息显示

浏览 2406 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2009-08-19   最后修改:2009-08-19
linux绑定网卡在《linux as 4 bond网卡绑定》中提到过了,下面观察一下不同绑定方式显示情况(注:以下信息摘自网络)
主要讨论mode分别为0,1时的情况
mode=1工作在主备模式下,这时eth1作为备份网卡是no arp的
引用
[root@rhas-13 network-scripts]# ifconfig 验证网卡的配置信息
bond0 Link encap:Ethernet HWaddr 00:0E:7F:25:D9:8B
inet addr:172.31.0.13 Bcast:172.31.3.255 Mask:255.255.252.0
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:18495 errors:0 dropped:0 overruns:0 frame:0
TX packets:480 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1587253 (1.5 Mb) TX bytes:89642 (87.5 Kb)
eth0 Link encap:Ethernet HWaddr 00:0E:7F:25:D9:8B
inet addr:172.31.0.13 Bcast:172.31.3.255 Mask:255.255.252.0
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:9572 errors:0 dropped:0 overruns:0 frame:0
TX packets:480 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:833514 (813.9 Kb) TX bytes:89642 (87.5 Kb)
Interrupt:11
eth1 Link encap:Ethernet HWaddr 00:0E:7F:25:D9:8B
inet addr:172.31.0.13 Bcast:172.31.3.255 Mask:255.255.252.0
UP BROADCAST RUNNING NOARP SLAVE MULTICAST MTU:1500 Metric:1
RX packets:8923 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:753739 (736.0 Kb) TX bytes:0 (0.0 b)
Interrupt:15

那也就是说在主备模式下,当一个网络接口失效时(例如主交换机掉电等),不回出现网络中断,系统会按照cat /etc/rc.d/rc.local里指定网卡的顺序工作,机器仍能对外服务,起到了失效保护的功能.
在mode=0 负载均衡工作模式,他能提供两倍的带宽,下我们来看一下网卡的配置信息
引用
[root@rhas-13 root]# ifconfig
bond0 Link encap:Ethernet HWaddr 00:0E:7F:25:D9:8B
inet addr:172.31.0.13 Bcast:172.31.3.255 Mask:255.255.252.0
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:2817 errors:0 dropped:0 overruns:0 frame:0
TX packets:95 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:226957 (221.6 Kb) TX bytes:15266 (14.9 Kb)
eth0 Link encap:Ethernet HWaddr 00:0E:7F:25:D9:8B
inet addr:172.31.0.13 Bcast:172.31.3.255 Mask:255.255.252.0
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:1406 errors:0 dropped:0 overruns:0 frame:0
TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:113967 (111.2 Kb) TX bytes:7268 (7.0 Kb)
Interrupt:11
eth1 Link encap:Ethernet HWaddr 00:0E:7F:25:D9:8B
inet addr:172.31.0.13 Bcast:172.31.3.255 Mask:255.255.252.0
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:1411 errors:0 dropped:0 overruns:0 frame:0
TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:112990 (110.3 Kb) TX bytes:7998 (7.8 Kb)
Interrupt:15

在这种情况下出现一块网卡失效,仅仅会是服务器出口带宽下降,也不会影响网络使用
论坛首页 综合技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics