|
1 安裝必須軟件
sudo apt-get install uml-utilities bridge-utils
2 添加本人帳戶到軟件組
sudo gpasswd -a bruce uml-net
3 修改interface文件內(nèi)容如下
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 重啟機(jī)器配置生效!
以上配置是因?yàn)槲业木W(wǎng)絡(luò)環(huán)境是靜態(tài)IP的環(huán)境,所以虛擬機(jī)的IP全都是靜態(tài)IP,如果網(wǎng)絡(luò)環(huán)境中有DHCP服務(wù)器配置可以簡(jiǎn)化一下,不過(guò)我是用虛擬機(jī)做實(shí)驗(yàn)的,喜歡IP是固定的,所以配置如上。
|
|
【收藏】【打印】【進(jìn)入論壇】 |
|
|
|
|
|
|
|