歡迎您光臨本站 註冊首頁

Ubuntu Linux下Virtualbox橋接網路配置

←手機掃碼閱讀     火星人 @ 2014-03-12 , reply:0
   

1 安裝必須軟體

sudo apt-get install uml-utilities bridge-utils

 

2 添加本人帳戶到軟體組

sudo gpasswd -a bruce uml-net

 

3 修改interface文件內容如下

sudo vi /etc/network/interfaces

 

auto lo

iface lo inet loopback

 

auto tap0

iface tap0 inet manual

up ifconfig $IFACE 0.0.0.0 up

down ifconfig $IFACE down

tunctl_user bruce

 

auto tap1

iface tap1 inet manual

up ifconfig $IFACE 0.0.0.0 up

down ifconfig $IFACE down

tunctl_user bruce

 

auto tap2

iface tap2 inet manual

up ifconfig $IFACE 0.0.0.0 up

down ifconfig $IFACE down

tunctl_user bruce

 

auto br0

iface br0 inet static

address 192.168.1.188

netmask 255.255.255.0

broadcast 192.168.1.255

gateway 192.168.1.1

bridge_maxwait 0

bridge_ports all tap0 tap1 tap2

 

auto eth0

allow-hotplug eth0

iface eth0 inet manual

up ifconfig eth0 0.0.0.0 promisc up

 

4 重啟機器配置生效!

 

以上配置是因為我的網路環境是靜態IP的環境,所以虛擬機的IP全都是靜態IP,如果網路環境中有DHCP伺服器配置可以簡化一下,不過我是用虛擬機做實驗的,喜歡IP是固定的,所以配置如上。

(責任編輯:A6)



[火星人 ] Ubuntu Linux下Virtualbox橋接網路配置已經有414次圍觀

http://coctec.com/docs/net/show-post-68257.html