关闭网络管理器
chkconfig NetworkManager off ##和桥接有冲突,要关闭
service NetworkManager stop
修改eth0为物理网口,br0为桥接网口配置文件:
[[email protected] network-scripts]# cat ifcfg-br0
DEVICE=br0
TYPE=Bridge
BOOTPROTO=static
IPV6INIT=no
ONBOOT=yes
IPADDR=192.168.6.70
NETMASK=255.255.255.0
GATEWAY=192.168.6.1
DNS1=8.8.8.8
DELAY=0
[[email protected] network-scripts]# cat ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
BRIDGE=br0
BOOTPROTO=none
IPV6INIT=no
ONBOOT=yes
重启网络,查看桥接网络
service network restart
brctl show
时间: 2024-10-07 20:23:18