说明:服务器双口,分别为em1-2个口em1、em2
1、 开启 NetworkManager
systemctl start NetworkManager
yum install bridge-utils
2、备份配置文件
mkdir -p /data/bak/
cp -r /etc/sysconfig/network-scripts/ /data/bak/
nmcli connection add type bond ifname bond0 mode 4
nmcli connection add type bond-slave ifname em1 master bond0
nmcli connection add type bond-slave ifname em2 master bond0
3、配置
3.1、 ifcfg-em1
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
NAME=em1
DEVICE=em1
ONBOOT=yes
3.2 ifcfg-em1.101
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
IPV4_FAILURE_FATAL=no
DEVICE=em1.101
ONBOOT=yes
VLAN=yes
BRIDGE=br1.101
NM_CONTROLLED=no
3.3、 ifcfg-em1.201
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
IPV4_FAILURE_FATAL=no
DEVICE=em1.201
ONBOOT=yes
VLAN=yes
BRIDGE=br1.201
NM_CONTROLLED=no
3.4、 ifcfg-em2.101
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
IPV4_FAILURE_FATAL=no
DEVICE=em2.101
ONBOOT=yes
VLAN=yes
BRIDGE=br1.101
NM_CONTROLLED=no
3.5、 ifcfg-em2.201
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
IPV4_FAILURE_FATAL=no
DEVICE=em2.201
ONBOOT=yes
VLAN=yes
BRIDGE=br1.201
NM_CONTROLLED=no
3.6 ifcfg-em2
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
IPV4_FAILURE_FATAL=no
NAME=em2
DEVICE=em2
ONBOOT=yes
3.7、 ifcfg-br1.101
BOOTPROTO=static
DEVICE=br1.101
NAME=br1.101
TYPE=Bridge
NM_CONTROLLED=no
IPADDR=172.19.146.100
NETMASK=255.255.255.0
3.8 、ifcfg-br1.201
BOOTPROTO=static
DEVICE=br1.201
NAME=br1.201
TYPE=Bridge
NM_CONTROLLED=no
IPADDR=172.19.148.100
NETMASK=255.255.255.0
4、重启网卡
service network restart
标签:ifcfg,EthernetPROXY,noBOOTPROTO,网卡,CentOS7.9,ONLY,TYPE,METHOD,bond From: https://www.cnblogs.com/cheyunhua/p/17247050.html