1. 修改配置文件:/etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0 ONBOOT=yes TYPE=Bridge IPADDR=10.18.254.234 NETMASK=255.255.254.0 GATEWAY=10.18.254.254 BOOTPROTO=static NAME=br0
2. 修改配置文件:/etc/sysconfig/network-scripts/ifcfg-eno1
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=eno1 UUID=5dbb88d7-9d31-4696-821c-ab227991d7f1 DEVICE=eno1 ONBOOT=yes BRIDGE=br0
3. 重启网络:systemctl restart network
4. 查看网桥:brctl show
5. 打开stp协议:brctl stp br0 on