在Ubuntu上运行一个新的邮件服务器运行postfix。
我们在configuration子网和接口时遇到一些问题。
基本上2个子网(.253。&.254。)需要通过路由器所在的第三个子网(.252。)连接。
# 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.62.254.199 netmask 255.255.0.0 network 10.62.254.0 broadcast 10.62.255.255 #gateway 10.62.252.138 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 10.62.252.138 dns-search ***.com auto eth1 iface eth1 inet static address 10.62.253.199 netmask 255.255.0.0 network 10.62.253.0 broadcast 10.62.255.255 #gateway 10.62.252.138 #dns-nameservers 10.62.254.199 10.62.253.199 10.62.252.199 dns-nameservers 10.62.252.138 dns-search ***.com auto eth2 iface eth2 inet static address 10.62.252.199 netmask 255.255.0.0 network 10.62.252.0 broadcast 10.62.255.255 gateway 10.62.252.138 #dns-nameservers 10.62.254.199 10.62.253.199 10.62.252.199 dns-search ***.com
我有一个外部支持公司正在研究这个问题(他们构build和configuration了这个服务器),但是这个过程需要很长时间…所以我想着重指出这个错误!
networking图
这里最可能的情况是子网掩码不正确,应为24位掩码:255.255.255.0
由于现在的configuration,服务器相信有一个单一的networking – 10.62.0.0/16。 这意味着它可以使用任何接口与10.62.252,10.62.253或10.62.254中的任何一台机器进行通信,而不一定是与IP地址匹配的机器。 这是因为它认为它可以通过第一个被激活的接口(可以不同于每次启动)到达所有这些networking。
如果此服务器正在replace另一台充当三个子网网关的服务器,则需要:
net.ipv4.ip_forward=1 如果255.255.255.0子网是正确的,因为它们与其他设备上使用的子网掩码相匹配,那么我们也需要查看第2层。传统上,当您子网时,您也是VLAN,它将configuration端口集交换机只能相互通信。 这意味着您必须确保邮件服务器位于交换机的正确端口上,或者确认它所插入的端口位于正确的vlan中。