0.测试环境
>>Debian (testing)
>>VirtualBox 2.0
1.安装软件:
>>apt-get install uml-utilities bridge-utils
2.修改/etc/network/interfaces
auto lo eth0 tap0 br0
iface lo inet loopback
iface br0 inet dhcp
bridge_ports eth0 tap0
bridge_maxwait 0
bridge_fd 0
iface eth0 inet manual
iface tap0 inet manual
pre-up tunctl -b -u
-t tap0 #your_user是你的用户名
pre-up ifconfig tap0 up
post-down tunctl -d tap0
3.如果网址是静态,修改br0为:
iface br0 inet static
address xxx.xxx.xxx.xxx
network xxx.xxx.xxx.xxx
.
.
.
bridge_ports eth0 tap0
bridge_maxwait 0
4.重启网络
>>ifdown -a
>>ifup -a
5.启动VirtalBox
>>网络设置中选择连接至host interface
>>主机网络界面填入tap0
>>其它留空
阅读(2064) | 评论(2) | 转发(0) |