LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 789|回复: 2

如何在ARCH中配置KVM桥接网络 ?

[复制链接]
发表于 2009-5-22 18:58:22 | 显示全部楼层 |阅读模式
下面是在UBUNTU中配置KVM桥接网络的方法:

安装桥接工具:
代码:
sudo apt-get install bridge-utils

安装创建TAP界面的工具:
代码:
sudo apt-get install uml-utilities

编辑网络界面配置文件(
代码:
sudo vi /etc/network/interfaces
),根据你的情况加入以下内容:
代码:
auto eth0
iface eth0 inet static     \\这里可以为DHCP
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1

auto tap0
iface tap0 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
tunctl_user lm      \\lm是我的用户名,在这里换为你的用户名

auto br0
iface br0 inet static       \\当然这里也可以使用DHCP分配
bridge_ports eth0 tap0
address 192.168.1.3
netmask 255.255.255.0
network 192.168.1.1
broadcast 192.168.1.255
gateway 192.168.1.1

激活tap0和br0:
sudo /sbin/ifup tap0
sudo /sbin/ifup br0

好了以后ifconfig看一下,多了一个tap0和br0, br0上的IP地址就是你本机的IP地址。

相应的arch中的步骤是什么呢?
发表于 2009-5-22 19:33:46 | 显示全部楼层
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-5-23 12:01:16 | 显示全部楼层
Post by xcxxb;1989989
这个可能有用:
http://www.imxxb.com/2008/11/bridge.html


谢谢! 不过桥我想用靜态IP!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表