基于Rocky9绑定bond0

一、环境准备

使用Vmware添加两个仅主机模式的网络适配器

image

二、配置网卡

1.查看刚才添加的两块网卡的名称,这里是ens224和ens256

ip a | grep mtu

image

2.添加一个bond0,设置为主备模式心跳间隔时间间隔1秒

nmcli connection add type bond con-name bond0 ifname bond0 bond.options "mode=active-backup,miimon=1000"

image

3.绑定第一块ens224网卡

nmcli connection add type ethernet slave-type bond con-name bond0-port1 ifname ens224 master bond0

image

4.绑定第二块网卡

nmcli connection add type ethernet slave-type bond con-name bond0-port2 ifname ens256 master bond0

image

三、测试效果

1.配置ip

nmcli connection modify bond0 ipv4.addresses '192.168.8.123/24' ipv4.gateway '192.168.8.2' ipv4.method manual connection.autoconnect yes

3.启动绑定的网卡与两个端口

nmcli con up bond0
nmcli con up bond0-port1
nmcli con up bond0-port2

image

4.检查效果

nmcli device

image

posted @ 2025-08-31 16:38  ITZhong  阅读(1)  评论(0)    收藏  举报