# Create a tap device with permission for the user running vbox # 建立一個使用者(user)有權限的設備檔 tap0 tunctl -t tap0 -u {user} chmod 666 /dev/net/tun
# Bring up ethX and tapX in promiscuous mode # 將ethx和tapx網卡界面設為混雜模式(Promiscuous) ifconfig eth0 0.0.0.0 promisc ifconfig tap0 0.0.0.0 promisc
# Create a new bridge and add the interfaces to the bridge. # 建立新的橋接界面(bridge),並把 eth0, tap0加入bridge brctl addbr br0 brctl addif br0 eth0 brctl addif br0 tap0
# Give the bridge a dhcp address. # 將bridge設成動態取得IP(譯註:若為ADSL撥接環境,則可設為 # ifconfig br0 0.0.0.0 up 則Host OS 和Guest OS各自可以不同的撥接帳號來連網 ) dhclient br0
現在可以在VirtualBox的Guest OS網路設定畫面中,將attached to的選項中選擇host interface,interface name選項中設為tap0。 這樣就完成Guest OS橋接網路模式的設定了,馬上啟動Guest OS 吧 ! Guest OS 的網路設定和Host OS是獨立平行的。