我们有一台服务器通过两个网卡连接到两个独立的networking。
networkingA和networkingB
服务器获得两个IP – 但这些IP位于完全不同的networking中。 到目前为止,一切都很好 – 而且服务器可以从两个networking访问没有任何问题。
现在,在networkingA中,我们还向服务器提供公共IP(由防火墙处理 – 无需在服务器上configuration公共IP),以便从外部看到服务器。 在networkingB中不会发生这种情况。最初这也是有效的 – 所以我们的服务器可以从外部和两个内部networking中看到,而且一切正常。
我们的内部DNS服务器确保我们在内部浏览 – 但是我们也可以通过互联网从所有networking访问networking。
过了一段时间,公共IP停止工作 – 没有任何事情。 然后 – 如果我把networkingB的NIC重新连接起来,它就可以工作。
可能是什么问题呢?
接口configuration:
## 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 allow-hotplug eth0 iface eth0 inet static address xxx.xxx.7.41 netmask 255.255.255.0 broadcast xxx.xxx.7.255 gateway xxx.xxx.7.254 dns-nameservers xxx.xxx.7.17 213.55.96.148 4.2.2.2 8.8.4.4 # The secondary network interface allow-hotplug eth1 iface eth1 inet static address xxx.xxx.20.9 netmask 255.255.255.0 broadcast xxx.xxx.20.255 gateway xxx.xxx.20.1 dns-nameservers xxx.xxx.10.12 4.2.2.2 8.8.4.4`
确保路由表上的0.0.0.0条目静态设置为使用公共接口。 最重要的是,确保所有本地子网都设置为使用接口B.