版权声明:本博客为博主原创博文,可以任意转载。转载请附上博客链接: http://blog.csdn.net/qiqishuang https://blog.csdn.net/qiqishuang/article/details/51554139
1. 安装brctl-utils
# apt-get install bridge-utils //安装配置brctl命令包
2. 配置网卡桥接模式
# brctl addbr br-test
# brctl addif br-test eth1
# brctl addif br-test eth2
# ifconfig eth1 up
# Ifconfig eth2 up
配置完毕:brctl show
ubuntu@ubuntu:~$ brctl show
bridge name bridge id STP enabled interfaces
br-test 8000.524b151222cd no eth1
eth2
3. 重启网络
sudo /etc/init.d/networking restart