为什么Linux不列出我想要的IP?

我有一个基于Linux的群集(使用openMosix)。 打算用作服务器的机器有2个网卡。 群集正在工作,并且所有机器在群集(内部networking)内相互ping通。

但是,我将服务器的公共IP设置为静态,为XXX.XXX.198.247。 如果我在控制台中做了一个ifconfig,它显示我的机器确实是xxx.xxx.198.247。 Ping“自己”确实有效。 但是,如果我使用外部网站来检查我的IP(即ping.eu),它显示为xxx.xxx.198.231。 试图ping从syte或从其他机器连接到互联网xxx.xxx.198.247和xxx.xxx.198.231结果没有响应(总包丢失)。

这是我的etc / network / interfaces文件:

# 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 auto eth0 iface eth0 inet static address 192.168.1.105 netmask 255.255.255.0 gateway 192.168.1.1 # The secondary network interface allow-hotplug eth1 iface eth1 inet static address xxx.xxx.198.247/24 netmask 255.255.255.224 network xxx.xxx.198.0 broadcast xxx.xxx.198.255 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers xxx.xxx.195.14 dns-search laborator[/code] 

我会apreciate任何帮助。

什么是198.231 ? 据推测,这是一个通过您的192.168.1networking发送到互联网的NAT地址?

你的默认网关位于内部界面,所以这是获取互联网的path。 你需要从路由的angular度来确定你想要这个服务器的networkingconfiguration。 也许eth1上的默认网关和eth0上的192.168.0.0/16静态路由?