Never Restart Network on Multi-ADSL Connection Machine…从不重新启动网络对多的ADSL连线机…
I learned it the hard way.我知道它的努力方式。 Our gateway machine with firewall (shorewall) has我们的网关机器与防火墙( shorewall ) multiple ADSL connections configured with load balancing多重的ADSL连接,配置与负载平衡 for为了 more bandwidth and transparent fail-over更多的带宽和透明的故障排除 . 。 Today I faced an unenviable problem where one or other of the ADSL connections were going down sometime after a network restart.今天,我面对的一个吃力不讨好的问题,其中一人或其他的ADSL的连接去一段时间后,网络重新启动。 It was unique because the ADSL modems (configured as router) were accessible via telnet or ping and displayed perfect connectivity.它是独一无二的,因为ADSL调制解调器(配置为路由器)都可以通过Telnet或平,显示出完美的连接。 However I was unable to use them as gateway to connect to a server on the internet.不过,我无法使用他们作为网关连接到Internet上的伺服器。 They were working fine before.他们工作的优良之前。 With our non-trivial setup there were many suspects including the shorewall firewall and iptables (dropping certain packets?), network adapter, routing issue etc.与我们的非平凡安装有很多嫌疑人包括shorewall防火墙和iptables的(下降,某些数据包? ) ,网络适配器,路由问题等。
The solution was interesting.解决的办法是有趣。 We need to make some changes to the routing table to allow simultaneous access through multiple network adapters.我们有需要作出一些改变,路由表允许同时访问,通过多个网络适配器。 In our case they were these:在我们的情况下,他们被这些:
ip route add 192.168.1.0/24 dev eth1 src 192.168.1.10 table bsnl ip route add default via 192.168.1.1 table bsnl ip route add 192.168.0.0/24 dev eth2 src 192.168.0.10 table tata ip route add default via 192.168.0.1 table tata ip rule add from 192.168.1.10 table bsnl ip rule add from 192.168.0.10 table tata ip route replace default scope global nexthop via 192.168.1.1 dev eth1 weight 1 nexthop via 192.168.0.1 dev eth2 weight 4 IP路由添加192.168.1.0/24开发eth1钢骨混凝土192.168.1.10表BSNL公司的IP路由添加默认通过192.168.1.1表BSNL公司的IP路由添加192.168.0.0/24开发eth2钢骨混凝土192.168.0.10表塔塔IP路由添加默认通过192.168.0.1表塔塔的IP规则添加从192.168.1.10表BSNL公司的IP规则添加从192.168.0.10表塔塔IP路由取代预设的范围,全球nexthop通过192.168.1.1开发eth1重量1 nexthop通过192.168.0.1开发eth2重量4 When the network is restarted all these entries are lost.当网络重新启动所有这些项目都将丢失。 So when eth2 comes up later, eth1 goes down and vice versa.因此,当eth2来了之后, eth1下降,反之亦然。 The solution is to use a script to restart the network which does the following:解决的办法是使用脚本来重新启动网络,其中是否如下:
1. 1 。 Restart network重新启动网络
2. 2 。 Add entries to routing table similar to example above新增项目,以路由表类似上面的例子中
3. 3 。 Restart shorewall firewall (required after network restart)重新启动shorewall防火墙(网络后,需要重新启动)
Now I can safely restart the network without any issues at all.现在我可以放心地重新启动网络时不出现任何问题,在所有。
Filed under提起下 Fedora 7 Fedora的7 , , Fedora Core 6是Fedora Core 6 , , Headline News头条新闻 , , How To如何 , , Linux Linux的 , , Tech Note技术说明 , , Web网页 | |
| |
RSS 2.0 2.0 | |
Trackback Trackback跟踪 this Article |此文章|
Email this Article电子邮件此文章
You may also like to read您也可以想读 |





January 28th, 2008 at 12:46 am 2008年1月28日在上午12时46分
Quite an interesting article.相当有趣的文章。 Would it be possible for you to share all related scripts?是否可以为你分享所有相关的脚本? Thanks.谢谢。
January 28th, 2008 at 11:35 am 2008年1月28日在上午11时35分
Check this请在此 article文章 for more details.了解更多详情。