双网卡绑定配置
openEuler需要通过NetworkManager的命令行工具 使用nmcli命令进行bond0网卡配置文件的创建(注:手动创建bond0文件配置不生效亲测):
nmcli创建绑定接口:
nmcli con add type bond con-name bond0 ifname bond0 mode active-backup
可生成一个bond0网卡配置文件 :
网卡添加:
(如果网卡配置文件已存在不需要添加,直接修改 ens33和ens34网卡配置即可):
nmcli con add type ens33 ifname ens33 master bond0
nmcli con add type ens34 ifname ens34 master bond0
修改 ens33和ens36网卡配置:
[root@localhost network-scripts]# cat ifcfg-ens34
TYPE=Ethernet
NAME=ens34
DEVICE=ens34
ONBOOT=yes
MASTER=bond0
SLAVE=yes
[root@localhost network-scripts]#
[root@localhost network-scripts]#
[root@localhost network-scripts]# cat ifcfg-ens33
TYPE=Ethernet
NAME=ens33
DEVICE=ens33
ONBOOT=yes
MASTER=bond0
SLAVE=yes