CentOS
1.创建用以桥接的虚拟网卡
# cd /etc/sysconfig/network-scripts
# cp ifcfg-eth0 ifcfg-br0
2. 编辑 ifcfg-br0
# vi ifcfg-br0
DELAY=0
3.编辑ifcfg-eth0
# vi ifcfg-eth0
HWADDR=00:1E:67:07:EC:30
4.重新启动网络
# service network restart
ubuntu
1.编辑interfaces,设置网桥
# vi /etc/network/interfaces
auto lo
iface lo inet loopback
auto br0
iface br0 inet static
address 192.168.88.3
netmask 255.255.255.0
gateway 192.168.88.1
bridge_ports eth0
bridge_fd 0
bridge_hello 2
bridge_maxage 12
bridge_stp off
2.重启网络
# /etc/init.d/networking restart
3. 查看新的网络配置
#brctl show