虛擬機器軟體-VirtualBox Bridge模式 For Linux / Unix

版主: DarkSkyline

虛擬機器軟體-VirtualBox Bridge模式 For Linux / Unix

文章DarkSkyline » 週四 11月 1日, 2007年 6:21 pm

VirtualBox 有兩種模式 NAT 以及 Bridge 。

Bridge 設定方式如下。

要先安裝 bridge-utils uml-utilities 兩個套件

sudo apt-get install bridge-utils uml-utilities設定方式

tunctl -t tap0 -u #這裡填上你的使用者名稱
dhclient br0 #這是在br0用DHCP模式, #若要用固定實體主機IP: ifconfig br0 192.168.?.?

tunctl -t tap0 -u
brctl addbr br0
ifconfig eth0 0.0.0.0 promisc
brctl addif br0 eth0
dhclient br0
brctl addif br0 tap0
ifconfig tap0 up
chmod 666 /dev/net/tun上面可以寫成shell script 存檔,記得用 root 身份執行這些指令,完成後 ifconfig 會多 br0 , tap0 。

而在 VirtualBox 網路設定為 “Host Interface” 而 Interface Name 為 tap0。而 guest os 就可以互連 host os 。

若要關掉 bridge 模式

brctl delif br0 eth0
brctl delif br0 tap0
brctl delbr br0
ifconfig tap0 down
ifconfig br0 down
ifconfig eth0 down
ifconfig eth0 up不過 bridge 模式適合用在有線網卡,無線網卡部份還無法適用。

資料來源:
http://blog.3funs.com/index.php/2007/10 ... idge-mode/
http://www.ublink.org
Tel:04-22605121
E-Mail:eric@ublink.org
Skype:ublink-eric
LineID:0937720133
頭像
DarkSkyline
Site Admin
 
文章: 1860
註冊時間: 週五 12月 8日, 2006年 11:41 am
來自: 台中
送出感謝: 0 次
擁有感謝: 2

回到 Windows 應用軟體

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 25 位訪客