yum install bridge-utils
brctl addbr br0
brctl addif br0 eth0
ifconfig eth0 0.0.0.0
修改配置文件
[root@node ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens160 TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=none DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=ens160 UUID=53e847a8-3437-49a9-ae54-50b79623155c DEVICE=ens160 ONBOOT=yes IPADDR=192.168.33.75 NETMASK=255.255.255.0 GATEWAY=192.168.33.1 DNS1=192.168.51.51 DNS2=114.114.114.114 [root@node ~]#
ifconfig br0 192.168.1.1
brctl delif br0 eth0 eth1
brctl delif br0
echo "modprobe bridge">>/etc/rc.local
原文:https://www.cnblogs.com/Raphel/p/15095949.html