重启后丢失的默认路由

升级到11.10后,我的系统每次重启机器时都“忘记”到互联网的默认路由。 它“记住”到办公室的路线(在第二个NIC上)。 在我的/ etc / network / interfaces文件中,我将两个NIC配置为静态,并为每个NIC指定IP,网络掩码和网关。 但是外部NIC的网关不再在启动时设置(尽管它在11.04中完美运行)。

我想知道它是否与我和其他人看到的“等待网络配置”问题有关。 无论哪种方式,我需要一个解决方案或至少一个解决方案。

根据要求… route -v (当我手动添加eth1默认网关之后 – 当然要看之前,想象一下eth1网关线丢失):

Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 216.199.48.57.n 0.0.0.0 UG 0 0 0 eth1 default 192.168.42.1 0.0.0.0 UG 100 0 0 eth0 192.168.42.0 * 255.255.255.0 U 0 0 0 eth0 216.199.48.56 * 255.255.255.248 U 0 0 0 eth1 

/ etc / network / interfaces

 # The loopback network interface auto lo iface lo inet loopback # Office network auto eth0 iface eth0 inet static address 192.168.42.4 netmask 255.255.255.0 gateway 192.168.42.1 # Internet auto eth1 iface eth1 inet static address 216.199.48.58 netmask 255.255.255.248 gateway 216.199.48.57 

根据定义,“默认”是一个独特的实体。 “gateway”语句设置默认网关,因此在文件中必须是唯一的。 此方案要求您设置到您的专用网络的静态路由。 将eth0网关线路替换为up route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.42.1

 # Office network auto eth0 iface eth0 inet static address 192.168.42.4 netmask 255.255.255.0 up route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.42.1