xen中用ubuntu连接两个网桥

本文介绍了如何在Ubuntu系统下配置双网卡连接两个不同网段,通过设置静态IP、开启包转发以及调整xen虚拟机的网络连接,实现10.2.1.*/16和10.4.1.*/16网段间的通信。关键步骤包括修改interfaces文件、开启ipv4转发以及使用libvirt或XML配置xen虚拟机的网桥连接。
摘要由CSDN通过智能技术生成

作者: Automatic  出自: http://www.linuxdiyf.com
因为公司的需要,目前又追加了一个网段A:10.4.1.*/16,而公司原有域为B:10.2.1.*/16,为了使两个网段能够通信,本文的目的就在Ubuntu下设置路由
使两个网段能互相通信。
1、ubuntu机器设置为双网卡,分别连接两个网段。
#router@proxy:/etc/network$ sudo vi interfaces
dd
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 10.2.1.216
netmask 255.255.0.0
network 10.2.0.0
broadcast 10.2.255.255
gateway 10.2.1.218
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 211.93.80.129 211.94.65.97 211.98.4.1
auto eth1
iface eth1 inet static
address 10.4.1.216
netmask 255.255.0.0
network 10.4.0.0
broadcast 10.4.255.255<

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值