关闭相关服务
systemctl stop NetworkManager
systemctl disable NetworkManager
添加聚合网口配置 此处配置原单网卡的ip相关信息即可.
DEVICE=bond0
ONBOOT=yes
BONDING_OPTS="mode=6 miimon=100"
BOOTPROTO=static
TYPE=Ethernet
USERCTL=no
IPADDR=192.168.11.226
NETMASK=255.255.255.0
GATEWAY=192.168.11.1
NM_CONTROLLED=no
修改网卡1配置
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_FAILURE_FATAL=no
NAME=ens160
DEVICE=ens160
ONBOOT=yes
MASTER=bond0
SLAVE=yes
修改网卡2配置
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_FAILURE_FATAL=no
NAME=ens192
DEVICE=ens192
ONBOOT=yes
MASTER=bond0
SLAVE=yes
##加载模块并重启
modprobe bonding
systemctl restart network