如何在缺少ifenslave命令的救援模式下,配置网卡绑定呢?
解决方案
在不选择“设置网络”的情况下以救援模式启动系统。
加载绑定模块
[root@shizhanxia.com ]# modprobe bonding mode=1 miimon=500 (The bonding mode used is "active-backup")
在RHEL8/RHEL9中添加绑定设备:
[root@shizhanxia.com ]# ip link add bond0 type bond
启动绑定设备:
[root@shizhanxia.com ]# ip link set dev bond0 up
在绑定设备中设置 IP 地址。
[root@shizhanxia.com ]# ip addr add 192.168.1.11/24 brd 192.168.1.255 dev bond0 label bond0
将接口添加到绑定。
[root@shizhanxia.com ]# ip link set dev eth1 down [root@shizhanxia.com ]# ip link set dev eth2 down [root@shizhanxia.com ]# echo "+eth1" > /sys/class/net/bond0/bonding/slaves [root@shizhanxia.com ]# echo "+eth2" > /sys/class/net/bond0/bonding/slaves [root@shizhanxia.com ]# ip link set dev eth1 up [root@shizhanxia.com ]# ip link set dev eth2 up
更新同一子网中的mac表。
[root@shizhanxia.com ]# arping -q -U -c 2 -I bond0 192.168.1.11
原创文章,作者:保哥,如若转载,请注明出处:https://www.shizhanxia.com/1813.html