如果活动默认值closures,则不同的networking接口将成为默认路由

我有两个networking接口eth0和eth1,我只是想知道如何“eth1”作为默认路由自动如果“eth0”宕机?

你想要的就是所谓的interface bonding – 设置这个有很多的方法, 这个对于简单的“键入这个”信息是有好处的 ,而且这个有更多的信息 。

ifcfg-bonding manpage(&references)也可能有帮助,并且可能比您通过Googlesearchfind的任何教程都更新。

您可以使用度量参数进行route 。 度量标准被视为目标networking或主机的额外跃点。

 route add default gw eth1defaultroute metric 10 dev eth1 

这是“老派”做事的方式。

您可能也有兴趣了解iproute2:

 ip route add default via eth1defaultroute metric 10 dev eth1 

有关更多详情,请参阅:

http://lartc.org/howto/lartc.rpdb.multiple-links.html

http://www.policyrouting.org/iproute2.doc.html#ss9.5.1

还有第三种select是使用BGP。