linux 5.5端口聚合,Linux中链路聚合之bond5类型聚合实例

查看网卡状态:

[root@linfan ~]# 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

[root@linfan ~]# 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

[root@linfan ~]# nmcli connection add type bond-slave con-name bond-slave1 ifname eth1 master bond5

Connection 'bond-slave1' (99d54040-948c-4a32-8934-527962c0fa72) successfully added.

[root@linfan ~]# 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配置信息

[root@linfan ~]# 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是否正常

[root@linfan ~]# nmcli device disconnect eth1

Device 'eth2' successfully disconnected.

[root@linfan ~]# 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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值