***br0********
DEVICE="br0"
TYPE="Bridge"
ONBOOT="yes"
BOOTPRO=static
BROADCAST=192.168.0.255
IPADDR=192.168.0.8
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
NETWORK=192.168.0.0
PREFIX=24
DNS1=218.85.152.99
DNS2=218.85.157.99
DOMAIN=8.8.8.8
DELAY=0
***ifcfg-em1********
DEVICE="em1"
HWADDR="90:B1:1C:0B:20:B7"
NM_CONTROLLED="yes"
ONBOOT="yes"
BOOTPROTO=static
BROADCAST=192.168.0.255
TYPE=Ethernet
BOOTPROTO=none
IPADDR=192.168.0.8
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
PREFIX=24
NETWORK=192.168.0.0
DNS1=218.85.152.99
DNS2=218.85.157.99
DOMAIN=8.8.8.8
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System em1"
BRIDGE="br0"
***rc.local********
brctl add br0
brctl addif br0 em1
ifconfig em1 down
ifconfig em1 0.0.0.0 up
ifconfig br0 192.168.0.8 netmask 255.255.255.0 up
server network restart
route add default gw 192.168.0.1
2 个解决方案
#1
没人回复吗?
#2
你em1的配置不需要指定IP了,只配置下面的就行了
==============================
DEVICE="em1"
HWADDR="90:B1:1C:0B:20:B7"
ONBOOT="yes"
BRIDGE="br0"
===============================
另外可以用brctl show看看em1是不是接到br0上了
==============================
DEVICE="em1"
HWADDR="90:B1:1C:0B:20:B7"
ONBOOT="yes"
BRIDGE="br0"
===============================
另外可以用brctl show看看em1是不是接到br0上了
#1
没人回复吗?
#2
你em1的配置不需要指定IP了,只配置下面的就行了
==============================
DEVICE="em1"
HWADDR="90:B1:1C:0B:20:B7"
ONBOOT="yes"
BRIDGE="br0"
===============================
另外可以用brctl show看看em1是不是接到br0上了
==============================
DEVICE="em1"
HWADDR="90:B1:1C:0B:20:B7"
ONBOOT="yes"
BRIDGE="br0"
===============================
另外可以用brctl show看看em1是不是接到br0上了