CentOS Linux 7.4 网卡绑定mode4

mode=4(802.3ad)(IEEE 802.3ad 动态链接聚合)

表示支持802.3ad协议,和交换机的聚合LACP方式配合(需要xmit_hash_policy).标准要求所有设备在聚合操作时,要在同样的速率和双工模式,而且,和除了balance-rr模式外的其它bonding负载均衡模式一样,任何连接都不能使用多于一个接口的带宽。

1.网卡1配置

[root@01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp175s0f1
TYPE=Ethernet
BOOTPROTO=none
NAME=enp175s0f1
DEVICE=enp175s0f1
ONBOOT=yes
MASTER=bond4
SLAVE=yes

2.网卡2配置

[root@01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp176s0f1
TYPE=Ethernet
BOOTPROTO=none
NAME=enp176s0f1
DEVICE=enp176s0f1
ONBOOT=yes
MASTER=bond4
SLAVE=yes

3.bond网卡配置

[root@01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond4
DEVICE=bond4
NAME=bond4
TYPE=bond
BONDING_MASTER=yes
IPADDR=192.168.1.100
PREFIX=24
GATEWAY=192.168.1.1
PEERDNS=yes
ONBOOT=yes
BOOTPROTO=static
BONDING_OPTS="mode=802.3ad miimon=100 lacp_rate=fast"

4.查看bond配置信息

[root@01 ~]# ethtool bond4
Settings for bond4:
Supported ports: [ ]
Supported link modes:  Not reported
Supported pause frame use: No
Supports auto-negotiation: No
Advertised link modes:  Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Speed: 20000Mb/s
Duplex: Full
Port: Other
PHYAD: 0
Transceiver: internal
Auto-negotiation: off
Link detected: yes

作者:喵了个咪的266
链接:https://www.jianshu.com/p/6f48c3a34a98
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

Logo

更多推荐