Linux中链路聚合之bond5类型聚合实例
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux中链路聚合之bond5类型聚合实例相关的知识,希望对你有一定的参考价值。
查看网卡状态:
[[email protected] ~]# nmcli device
DEVICE TYPE STATE CONNECTION
eth0 ethernet connected eth0
eth1 ethernet connected Wired connection 1
eth2 ethernet connected Wired connection 2
lo loopback unmanaged --
创建bond5.模式为balance-tlb
[[email protected] ~]# nmcli connection add type bond > mode balance-tlb con-name bond5 ifname bond5 > ipv4.method manual > ipv4.addresses 192.168.24.250/24 > ipv4.gateway 192.168.24.1 > ipv4.dns 8.8.8.8
Connection ‘bond5‘ (933aff7a-9501-45fb-ab15-3039840e273e) successfully added.
添加物理网卡链接到bond5
[[email protected] ~]# nmcli connection add type bond-slave con-name bond-slave1 ifname eth1 master bond5
Connection ‘bond-slave1‘ (99d54040-948c-4a32-8934-527962c0fa72) successfully added.
[[email protected] ~]# nmcli connection add type bond-slave con-name bond-slave2 ifname eth2 master bond5
Connection ‘bond-slave2‘ (ad2bf7c6-e4fc-4268-aaa0-fc96e5c7525f) successfully added.
查看bond配置信息
[[email protected] ~]# cat /proc/net/bonding/bond5
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: transmit load balancing
Primary Slave: None
Currently Active Slave: eth1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:2e:e0:a9
Slave queue ID: 0
Slave Interface: eth2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:2e:e0:b3
Slave queue ID: 0
关闭eth1网卡 测试bond5是否正常
[[email protected] ~]# nmcli device disconnect eth1
Device ‘eth2‘ successfully disconnected.
[[email protected] ~]# cat /proc/net/bonding/bond5
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Bonding Mode: transmit load balancing
Primary Slave: None
Currently Active Slave: eth2
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:0c:29:2e:e0:a9
Slave queue ID: 0
以上是关于Linux中链路聚合之bond5类型聚合实例的主要内容,如果未能解决你的问题,请参考以下文章