- 拷贝ifcfg-etc0 命名成br0
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-br0
- /etc/sysconfig/network-scripts/ifcfg-eth0 配置
DEVICE=eth0
HWADDR=xx:xx:xx:xxx
TYPE=Ethernet //E 一定要大写
UUID=xxxx-xx-xxx-xx-xxx
ONBOOT=yes
BOOTPROTO=DHCP
BRIDGE=br0 - /etc/sysconfig/network-scripts/ifcfg-br0 配置
DEVICE=br0 #自己起名
TYPE=Bridge # B 一定要大写
BOOTPROTO=none
IPADDR=192.168.8.223
NETMASK=255.255.255.0
GATEWAY=192.168.8.1
ONBOOT=yes