标签:roo fas dns link 地址 lower sysconfig type 6.4
如:eth2为新添加网卡
cd /etc/sysconfig/network-scripts
cp ifcfg-eth1 ifcfg-eth2
vi ifcfg-eth2
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eth2 ###此处修改为eth2
#UUID=ea571b82-4ad0-4a1b-b831-a90fe5a682f5 注销此行
DEVICE=eth2 ###修改为eth2
ONBOOT=yes
BRIDGE=br1 ###网桥设置为br1
vi ifcfg-br1
TYPE=Bridge
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=br1
DEVICE=br1
ONBOOT=yes
IPADDR=172.16.4.8
NETMASK=255.255.255.0
GATEWAY=172.16.4.254
###根据需要设置ip或者不设置
yum -y install bridge-utils
ifup eth2
ifup br1
ip addr
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:56:83:ff:cb brd ff:ff:ff:ff:ff:ff
11: br1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
link/ether 00:50:56:83:ff:cb brd ff:ff:ff:ff:ff:ff
inet 172.16.4.8/24 brd 172.16.4.255 scope global br1
###发现两者mac地址相同,并且ip能够ping通
[root@***]# brctl show
bridge name bridge id STP enabled interfaces
br1 8000.00505683ffcb no eth2
标签:roo fas dns link 地址 lower sysconfig type 6.4
原文地址:http://www.cnblogs.com/flyback/p/6367499.html