BONDING_OPTS是配置bonding的一个必要参数,其中:miimon=系统每100ms监测一次链路连接状态,如果有一条线路不通就转入另一条线路;
mode表示模式,分为七种:
(1)mode=0 轮询策略(默认):
(2)mode=1 主-备策略(常用):
(3)mode=2 平衡策略(不常用);
(4)mode=3 广播策略(不常用);
(5)mode=4 IEEE802.3ad动态链路聚合(不常用);
(6)mode=5 适配器传输负载均衡(不常用);
(7)mode=6 适配器适应性负载均衡(不常用)
BONDING_OPTS is a necessary parameter for the configuration of binding, in which: miimon=Systems monitor the state of the link every 100ms and move to another line if one line is not connected;
mode indicates a pattern divided into seven types:
(1)mode=0 & nbsp; rounding strategy (default):
(2)mode=1 & nbsp; master-preparation strategy (used):
(3)mode=2 & nbsp; balancing strategy (not commonly used);
(4)mode=3 & nbsp; broadcast strategy (not commonly used);
(5)mode=4 & nbsp; IEE802rd dynamic chain convergence (not commonly used);
(6)mode=5 & nbsp; fit machine transfer load balance (not commonly used);
(7)mode=6 & nbsp; adapter load balance (not commonly used)
3、添加bonding模块到配置文件,目的是开机自动加载bonding模块到内核(centos7.7下可不用配置
Linux主机bonding的配置--采用主备模式
mode=0平衡负载模式:平时两块网卡均工作,且自动备援,采用Switch支援。
mode=1自动备援模式:平时只有一块网卡工作,故障后自动替换为另外的网卡。
mode=2平衡策略模式:此模式提供负载平衡和容错能力
mode=6:平衡负载模式:平时两块网卡均工作,且自动备援,无须设置Switch支援。
3. Adding the Bonding module to the configuration file with the aim of automatically loading the Bonding module to the kernel (centos 7.7) without having to configure the configuration of the
>br> Linux mainframe binding -- using master mode
>br'mode=0 load balance mode: both webcards work in normal times, and automatically assist with Switch support.
mode=2 balanced strategy mode: this mode provides load balance and tolerance error
mode=6: Balance load mode: both webcards work in normal times and automatically provide support, without the need to install Switch support.
1.添加2块网卡
1. Add 2 net cards
2.确认网卡正常工作
2. Confirmation of the normal operation of the netcard
3.添加新网卡配置文件
现在新添加的两块网卡均无配置文件需手动添加
Add a new network card configuration file
. Neither of the two new cards now added has a profile to add manually
ifcfg-eth1
ifcfg-eth2
#可以采用命令模式创建: nmcli connection add type bond ifname bond0 con-name bond0
ifcfg-bond0
# Created using command mode: nmcli connection add type Bond ifname bond0 con-name bond0
ifcfg-bond0
4.bond配置,修改modprobe相关设定文件
需要关闭NetworkManager服务
4. Bond configuration, modify the modprobe-related setting file
to close NetworkManager service
5.查看内核是否加载bonding
重启网络服务
Check whether the kernel is loaded into the binding
reboot network service
1.
查看内核是否加载
1.
See whether the kernel is loaded
6.查看是否成功(eth1与eth2 MAC地址已同步说明绑定成功)
6. Check for success (eth1 and eth2 MAC addresses are synchronized to indicate successful binding)
在另一台同网段虚拟机也可以ping通
It's also possible to use a virtual combinator on another part of the network.
7.多网卡也只需添加一块网卡写入配置文件即可
7. Multi-net cards only need to be added to the configuration file
创建完查看相关配置
Create View Related Configuration
断开一个网卡在测试依旧无影响
& nbsp; disconnection of a webcard remains intact at the test
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论