作者: 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<
xen中用ubuntu连接两个网桥
最新推荐文章于 2023-02-02 16:48:40 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)