创建bonding设备的配置文件
centos8
/etc/sysconfig/network-scripts/ifcfg-bond0
NAME=bond0
TYPE=bond
DEVICE=bond0
BOOTPROTO=none
IPADDR=10.0.0.100
PREFIX=8
BONDING_OPTS="mode=1 miimon=100 fail_over_mac=1" #生产中不用添加fail_over_mac=1
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
NAME=eth0
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
ONBOOT=yes
/etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
NAME=eth1
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
ONBOOT=yes
nmcli connection delete eth0 eth1
nmcli connection reload
nmcli connection bond0 up
nmcli connection eth0 up
nmcli connection eth1 up
查看bond0状态:
/proc/net/bonding/bond0
删除bond0
ifconfig bond0 down
rmmod bonding
手机扫一扫
移动阅读更方便
你可能感兴趣的文章