tti*_*awi 9 rhel ethernet bonding
我正在尝试了解绑定模式 = 0(负载平衡循环)。使用 eth0 和 eth1,我创建了 bond0 接口,如下配置:
root@test-env1:~# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
ONBOOT=yes
NM_CONTROLLED=no
USERCTL=no
BOOTPROTO=static
IPADDR=192.168.57.91
NETMASK=255.255.255.0
GATEWAY=192.168.57.1
BONDING_OPTS="mode=0 miimon=100"
root@test-env1:~#
root@test-env1:~# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
NM_CONTROLLED=no
MASTER=bond0
SLAVE=yes
USERCTL=no
root@test-env1:~# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
NM_CONTROLLED=no
MASTER=bond0
SLAVE=yes
USERCTL=no
root@test-env1:~#
Run Code Online (Sandbox Code Playgroud)
绑定接口建立成功:
root@test-env1:~# 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): 100
Down Delay (ms): 100
Slave Interface: eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 08:00:27:30:0d:9e
Slave queue ID: 0
Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 08:00:27:a0:fc:9e
Slave queue ID: 0
root@test-env1:~#
Run Code Online (Sandbox Code Playgroud)
然后我尝试断开eth0的电缆,ping测试报告IP变得不可达。我知道这种故障转移场景肯定适用于 mode=1(主动备份)。
**更新:eth0 插入后的绑定状态
root@test-env1:~# 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: down
Speed: Unknown
Duplex: Unknown
Link Failure Count: 1
Permanent HW addr: 08:00:27:30:0d:9e
Slave queue ID: 0
Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 08:00:27:a0:fc:9e
Slave queue ID: 0
root@test-env1:~#
Run Code Online (Sandbox Code Playgroud)
同样奇怪的是,当我在 eth0 未插电的情况下重新启动服务器时,bond 接口根本没有 UP。虽然配置仍然有 eth1 作为活动/连接的接口。
绑定文档说 balance-rr 或 mode 0 提供负载平衡和容错。我只是想知道绑定模式 = 0 提供了什么样的容错。
mode
Specifies one of the bonding policies. The default is
balance-rr (round robin). Possible values are:
balance-rr or 0
Round-robin policy: Transmit packets in sequential
order from the first available slave through the
last. This mode provides load balancing and fault
tolerance.
Run Code Online (Sandbox Code Playgroud)
有人可以帮我弄清楚bond mode=0 是否需要两个接口都处于活动状态?如果是,那么 mode=0 如何提供容错?
你如何配置你的交换机?
\n在粘合文档中:
\n“balance-rr、balance-xor 和广播模式通常要求交换机将适当的端口分组在一起。此类组的命名法因交换机而异,可能称为 \xe2\x80\x9cetherchannel\xe2\x80\ x9d(如上面的思科示例)、\xe2\x80\x9ctrunk 组\xe2\x80\x9d 或其他类似的变体。”
\n| 归档时间: |
|
| 查看次数: |
2013 次 |
| 最近记录: |