LARTC
[Top] [All Lists]

Re: [LARTC] Redundant internet connections.

To: lartc@mailman.ds9a.nl
Subject: Re: [LARTC] Redundant internet connections.
From: Alex Samad <alex@samad.com.au>
Date: Fri, 22 Jun 2007 07:01:01 +1000
Delivered-to: sp-com-lists@consult.net
Delivered-to: lartc-list@securepoint.com
Delivered-to: lartc@outpost.ds9a.nl
In-reply-to: <467A9AB1.4090902@rabbit.us>
List-archive: <http://mailman.ds9a.nl/pipermail/lartc>
List-help: <mailto:lartc-request@mailman.ds9a.nl?subject=help>
List-id: "Mailinglist of the Linux Advanced Routing &amp; Traffic Control project" <lartc.mailman.ds9a.nl>
List-post: <mailto:lartc@mailman.ds9a.nl>
List-subscribe: <http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc>, <mailto:lartc-request@mailman.ds9a.nl?subject=subscribe>
List-unsubscribe: <http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc>, <mailto:lartc-request@mailman.ds9a.nl?subject=unsubscribe>
Mail-followup-to: lartc@mailman.ds9a.nl
References: <467A2354.1070805@riverviewtech.net> <467A9AB1.4090902@rabbit.us>
Sender: lartc-bounces@mailman.ds9a.nl
User-agent: Mutt/1.5.13 (2006-08-11)
On Thu, Jun 21, 2007 at 05:35:13PM +0200, Peter Rabbitson wrote:
> Grant Taylor wrote:
> 
> >I need a way for the Linux kernel to try to use a default gateway and 
> >switch to another one if it does not see any traffic.

should something like this work 

default  proto static  metric 5 nexthop via 58.173.108.1  dev vlan2 weight 10
                nexthop via 10.20.20.106  dev ppp0 weight 20

and then let the dgd detect dead gateways and drop the relevant route about.

> 
> I don't know about any working in-kernel solutions, but you can do it 
> trivially with netfilter and a cronjob:
> 
> * In netfilter do this:
>       -t mangle -N ispA
>       -t mangle -A ispA -j RETURN
>       -t mangle -N ispB
>       -t mangle -A ispB -j RETURN
>       -t mangle -A PREROUTING -i $ifA -s ! a.a.a.a/aa -j ispA
>       -t mangle -A PREROUTING -i $ifB -s ! b.b.b.b/bb -j ispB
> 
> where a.a.a.a and b.b.b.b are subnets describing your first 1 - 2 hops, 
> so traffic from your upstream router will not count.
> 
> * Then make a cron job that run this every minute:
>       iptables -t mangle -vnxZL isp[AB]
> and will look for the first number on the third line. If it is not 0 - 
> the link is alive, otherwise change the routing tables accordingly.
> 
> Of course you can have up to 1 minute of downtime, but it does not look 
> so bad IMO.
> 
> HTH
> 
> Peter
> _______________________________________________
> LARTC mailing list
> LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
> 

Attachment: signature.asc
Description: Digital signature

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
<Prev in Thread] Current Thread [Next in Thread>