当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 2 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 终于解决8.04下virtualbox无线网快速桥连的问题
帖子发表于 : 2008-04-27 18:10 

注册: 2007-03-21 18:45
帖子: 11
送出感谢: 0 次
接收感谢: 0 次
按手册和坛里的帖子的说明,设置N次都失败,经参考WIKI,终于得以解决

Wireless Networking

Setting up a normal bridged network generally doesn't work if you're bridging from a wireless card to VirtualBox. A simple script that utilises the parprouted tool will allow your VM full access to the wireless network.

You will require parprouted to do this:

sudo apt-get install parprouted

Next, using your favourite text editor, create and edit the script, for example:

sudo nano /etc/network/if-up.d/vbox_network

Then, enter the script (replacing $USER with your username (or whoever you intend to run virtualbox as)). Replace wlan0 with the name of your wireless interface. Use an available IP address on your network for tap0 (I have used 192.168.1.100 in this case):

#!/bin/bash
sysctl net.ipv4.ip_forward=1
VBoxTunctl -b -u $USER
ip link set tap0 up
ip addr add 192.168.1.100/24 dev tap0
parprouted wlan0 tap0

Finally, make sure the new file is executable by root:

sudo chmod 700 /etc/network/if-up.d/vbox_network

Now your networking script is installed, the virtual interface tap0 will be available on boot for VirtualBox. Rather than reboot, let's just run the script now:

sudo /etc/network/if-up.d/vbox_network

The final thing to do is tell VirtualBox to use the new virtual device tap0. Open VirtualBox, highlight a VM and click settings. Now choose the network option and select Host Interface on the 'attached to' drop down menu. In the Interface Name text box, enter: tap0

Click ok and start your VM. The VM should now behave as though it was another physical machine on your network!!

Unfortunately, at the time of writing I don't think DHCP auto configuration will work in the VM, so make sure you set a static IP in the virtual machine.

For more information, please visit [WWW] Bridged Networking with VirtualBox on Linux Hosts http://home.nyc.rr.com/computertaijutsu/vboxbridge.html


页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2008-04-27 18:34 

注册: 2008-04-08 9:27
帖子: 167
送出感谢: 0 次
接收感谢: 0 次
kvm下试过,是否不行,最后还是用nat了


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 2 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译