Configure on host for network bridge

0 preface

  Disable the eth0 on graphical interfaces if it exist

  

1 Acknowledge

sudo /etc/init.d/networking restart # configure network based on /etc/network/interfaces
sudo ifdown net_card_name           # setdown the net_card
sudo ifup net_card_name             # setup the net_card

2 Refrence

http://wiki.ubuntu.org.cn/Kvm_%E7%BD%91%E7%BB%9C%E6%A1%A5%E6%8E%A5%E6%96%B9%E6%A1%88


3 The content of /etc/network/interfaces in my host

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto tap0
iface tap0 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
tunctl_user xzl


auto tap1
iface tap1 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
tunctl_user xzl

auto tap2
iface tap2 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
tunctl_user xzl

auto br0
iface br0 inet static       
bridge_ports eth0 tap0 tap1 tap2
address 192.168.3.8
netmask 255.255.255.0
network 192.168.3.0
broadcast 192.168.3.255
gateway 192.168.3.215
dns-nameservers 202.114.0.242



4 File /etc/network/interfaces in guest

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.3.160
netmask 255.255.255.0
gateway 192.168.3.215
dns-nameservers 202.114.0.242




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值