Re: [LARTC] further than dead gateway detection

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



when interface goes down you must flush the cache to generate a new
routing table.
this perl script cheks and fix this.

have you done masquerading from an internal network? 
cause that does not work for mi..you may help me :)



On Mon, 2003-03-03 at 10:43, Никита Винокуров wrote:
> Hi all!
> 
> I have  a set up of router with two ISP providers. Each on ADSL modem and with public IP address. I've the patch from Julian Anastasov applied (routed-2.4.20-9.diff).
> External interfaces are: eth1 and eth2, internal is: eth0. The modems serve as gateways to my router, so, I simply set them as gateways on correspondent interfaces.
> 
> Multipath routing is  implemented as two nexthop's:
> 
> ip route add default table 222 proto static \
>  nexthop via $GATEWAY1 dev eth1 weight 1 \
>  nexthop via $GATEWAY2 dev eth2 weight 10
> 
> so when I plug-off the eth1 link to first modem, all the traffic moves to go through the eth2 and vice-versa. It works successfully.
> 
> The problem is that the most probably situation is not when one of my gateways is down (because it's really a modem and I have full access to it), but when the modem link to one of providers is down. So almost always I have the routes to be present in the system (I think because of the gateways are really up) and cached while one of my provider is down. The point is that the packets passed through the eth2 keep the same route even after my second provider fails (but gateway remains reachable) and they dont want to switch to the eth1. So any connection seems not working.
> 
> Please, help. How to detect that the link _behind_ a gateway is break? All the time gateways are reachable. _______________________
> 
> --
> Nikita________________
> _______________________________________________
> LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> 
-- 
Esteban Ribicic
Network Operation Center
UOL-Sinectis S.A.

Florida 537 Piso 6, Buenos Aires, Argentina 
+54-11-4321-9110 Ext 2503
+54-11-4321-9107 Directo 
eribicic@xxxxxxxxxxxxxxx
www.uolsinectis.com
#!/usr/bin/perl
#
# Limpia el routing cache de ser necesario
#

$PATH_IP="/bin/ip";

my @routels=`$PATH_IP route ls`;

for (@routels) {
	chop($_);
	if ( $_=~/dead/ ) {
		system("$PATH_IP route flush cache");
		print "done\n";
	}
}

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux