* [LARTC] Backup Route
2000-11-16 21:10 [LARTC] Backup Route Michel
@ 2000-11-16 22:49 ` Andrew
2000-11-17 1:34 ` bert
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Andrew @ 2000-11-16 22:49 UTC (permalink / raw)
To: lartc
<PRE>"Michel A. S. Pereira - KIDMumU[InLove]" wrote:
><i>
</I>><i> Hi there.
</I>><i>
</I>><i> I've two Internet connections at the same box, one connection is
</I>><i> made through ADSL, and another is made with a Radio-Link (WaveLAN
</I>><i> IE822).
</I>><i> I wan't to do a backup connection with the ADSL link.
</I>><i> With what tools I can do this?
</I>><i> ipchains, iptables, a third party tool?
</I>><i>
</I>I'm in the middle of doing something very similar. I don't know how often they
update the archives on this list but the subject on the thread for what I'm
working on
is [a complicated routing scenario (for me at least)]
Basically you'll have to compile the advanced routing options into the kernel
allong with ipchains, then install the iproute2 tools. Then you'll have to
configure your box properly using the advanced routing tools and ipchains for
the redundant routes. It's way too complicated to explain it all in one email,
so your best bet is to look in the archives on this list.
Probably your single best source of information in the way of docs is the
command reference doc for the "ip" command (comes in the iproute2 package). If
you read and understand this doc, you'll be well on your way to doing what you
want to do. You can also read the ipchains howto, the advanced routing howto,
and the ip-masquerading howto.
When I get it all done, I'm thinking of writing a howto on the subject, we'll
see...
-Andrew
</PRE>
^ permalink raw reply [flat|nested] 8+ messages in thread* [LARTC] Backup Route
2000-11-16 21:10 [LARTC] Backup Route Michel
2000-11-16 22:49 ` Andrew
@ 2000-11-17 1:34 ` bert
2000-11-17 4:33 ` Guy
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bert @ 2000-11-17 1:34 UTC (permalink / raw)
To: lartc
<PRE>On Thu, Nov 16, 2000 at 02:49:33PM -0800, Andrew wrote:
><i> > I wan't to do a backup connection with the ADSL link.
</I>><i> > With what tools I can do this?
</I>><i> > ipchains, iptables, a third party tool?
</I>><i> >
</I>><i> I'm in the middle of doing something very similar. I don't know how often they
</I>><i> update the archives on this list but the subject on the thread for what I'm
</I>><i> working on
</I>
Linux has a thing called 'dead gateway detection', which might work for you.
Just make two routes with a different metric, should work I think.
Existing sessions will die however because their source IP address is
unroutable.
Regards,
bert hubert
--
PowerDNS Versatile DNS Services
Trilab The Technology People
'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet
</PRE>
^ permalink raw reply [flat|nested] 8+ messages in thread* [LARTC] Backup Route
2000-11-16 21:10 [LARTC] Backup Route Michel
2000-11-16 22:49 ` Andrew
2000-11-17 1:34 ` bert
@ 2000-11-17 4:33 ` Guy
2000-11-17 10:41 ` Mike
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Guy @ 2000-11-17 4:33 UTC (permalink / raw)
To: lartc
<PRE>For configuring a backup route, it shouldn't be that difficult.
You should configure the preferred route (the radio link) statically,
with the default metric,
and for the backup route (ADSL link), configure it (also statically)
with a higher metric.
This way traffic will go along the preferred route, as long as the link
is up.
When the link fails, the route with the higher metric should take over.
The routing algorithm will always take a (valid) route with the lowest
metric.
But indeed, you should read the iproute2 docs,
and test the configuration you've chosen.
If you want to do load balancing and traffic filtering, all the others
(iptables/ipchains and
the advanced routing howto )come into the picture. But for mere backup
routes, playing with metrics will do.
Regards, Guy
Andrew wrote:
><i>
</I>><i> "Michel A. S. Pereira - KIDMumU[InLove]" wrote:
</I>><i> >
</I>><i> > Hi there.
</I>><i> >
</I>><i> > I've two Internet connections at the same box, one connection is
</I>><i> > made through ADSL, and another is made with a Radio-Link (WaveLAN
</I>><i> > IE822).
</I>><i> > I wan't to do a backup connection with the ADSL link.
</I>><i> > With what tools I can do this?
</I>><i> > ipchains, iptables, a third party tool?
</I>><i> >
</I>><i> I'm in the middle of doing something very similar. I don't know how often they
</I>><i> update the archives on this list but the subject on the thread for what I'm
</I>><i> working on
</I>><i> is [a complicated routing scenario (for me at least)]
</I>><i>
</I>><i> Basically you'll have to compile the advanced routing options into the kernel
</I>><i> allong with ipchains, then install the iproute2 tools. Then you'll have to
</I>><i> configure your box properly using the advanced routing tools and ipchains for
</I>><i> the redundant routes. It's way too complicated to explain it all in one email,
</I>><i> so your best bet is to look in the archives on this list.
</I>><i>
</I>><i> Probably your single best source of information in the way of docs is the
</I>><i> command reference doc for the "ip" command (comes in the iproute2 package). If
</I>><i> you read and understand this doc, you'll be well on your way to doing what you
</I>><i> want to do. You can also read the ipchains howto, the advanced routing howto,
</I>><i> and the ip-masquerading howto.
</I>><i>
</I>><i> When I get it all done, I'm thinking of writing a howto on the subject, we'll
</I>><i> see...
</I>><i>
</I>><i> -Andrew
</I>><i>
</I>><i> _______________________________________________
</I>><i> LARTC mailing list / <A HREF="mailto:LARTC@mailman.ds9a.nl">LARTC@mailman.ds9a.nl</A>
</I>><i> <A HREF="http://mailman.ds9a.nl/mailman/listinfo/lartc">http://mailman.ds9a.nl/mailman/listinfo/lartc</A> HOWTO: <A HREF="http://ds9a.nl/2.4Routing/">http://ds9a.nl/2.4Routing/</A>
</I>
</PRE>
^ permalink raw reply [flat|nested] 8+ messages in thread* [LARTC] Backup Route
2000-11-16 21:10 [LARTC] Backup Route Michel
` (2 preceding siblings ...)
2000-11-17 4:33 ` Guy
@ 2000-11-17 10:41 ` Mike
2000-11-17 11:03 ` Emmanuel
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Mike @ 2000-11-17 10:41 UTC (permalink / raw)
To: lartc
<PRE>bert hubert wrote:
><i>
</I>><i> On Thu, Nov 16, 2000 at 02:49:33PM -0800, Andrew wrote:
</I>><i>
</I>><i> > > I wan't to do a backup connection with the ADSL link.
</I>><i> > > With what tools I can do this?
</I>><i> > > ipchains, iptables, a third party tool?
</I>><i> > >
</I>><i> > I'm in the middle of doing something very similar. I don't know how often they
</I>><i> > update the archives on this list but the subject on the thread for what I'm
</I>><i> > working on
</I>><i>
</I>><i> Linux has a thing called 'dead gateway detection', which might work for you.
</I>><i> Just make two routes with a different metric, should work I think.
</I>><i>
</I>><i> Existing sessions will die however because their source IP address is
</I>><i> unroutable.
</I>
I'm not sure that is working correctly. I have two DSLs to the internet with
different IP addresses, speeds and ISPs.
DSL1: 63.194.. 384Kb/sec X 1.5-6Mb/sec ADSL on eth1 via pacbell
DSL2: 64.63.. is 768Kb/sec SDSL on eth2 via lmki
Test:
ping yahoo site through DSL1
unplug phone line from bridge on DSL1
ip route flush table cache
ping yahoo site --- No response
tracepath yahoo site --- Still trying to use DSL1
That isn't working.
Here's my setup:
$ ip route
10.1.1.1 dev eth2 scope link src 10.1.1.2
10.0.0.0/24 dev eth0 scope link src 10.0.0.1
127.0.0.0/8 dev lo scope link
default
nexthop via 63.194.239.201 dev eth1 weight 99
nexthop via 10.1.1.1 dev eth2 weight 1
10.1.1.1 is the internal ip of the dsl2 router. Pretty nice, Pacbell should
start using these.
Note: the higher the weight, the more traffic sent through that route.
I want most of my local traffic to go through DSL1. Anything requesting traffic
on DSL2 will get a response from DSL2, but very little traffic initiated by the
router machine will go through DSL2.
$ ip rule
0: from all lookup local
32763: from 10.0.0.0/24 lookup 10
32764: from 63.194.239.202 lookup 10
32765: from 10.1.1.2 lookup 20
32766: from all lookup main
32767: from all lookup default
$ ip route show table 10
63.194.239.201 dev eth1 scope link src 63.194.239.202
10.0.0.0/24 dev eth0 scope link
default via 63.194.239.201 dev eth1
$ ip route show table 20
10.1.1.1 dev eth2 scope link src 10.1.1.2
default via 10.1.1.1 dev eth2
I could write a script that would monitor the interfaces with ping and change
the default route after several failed attempts. With the way ping works, to
account for several failed responses, you would have to wait about 60 seconds
for about three attempts. I think 5 would be good, but that can be
configurable.
Does this sound good or is this already done better in another tool? I wonder
if a routing daemon would do something like this. Monitor with ping, but not
expect any routing messages from the monitored routers. Anyone know?
</PRE>
^ permalink raw reply [flat|nested] 8+ messages in thread* [LARTC] Backup Route
2000-11-16 21:10 [LARTC] Backup Route Michel
` (3 preceding siblings ...)
2000-11-17 10:41 ` Mike
@ 2000-11-17 11:03 ` Emmanuel
2000-11-17 11:56 ` Mike
2003-03-19 15:19 ` [LARTC] backup route Marijus Spakovskis
6 siblings, 0 replies; 8+ messages in thread
From: Emmanuel @ 2000-11-17 11:03 UTC (permalink / raw)
To: lartc
<PRE>Mike Fedyk wrote:
><i>
</I>><i> bert hubert wrote:
</I>><i> >
</I>><i> > On Thu, Nov 16, 2000 at 02:49:33PM -0800, Andrew wrote:
</I>><i> >
</I>><i> > > > I wan't to do a backup connection with the ADSL link.
</I>><i> > > > With what tools I can do this?
</I>><i> > > > ipchains, iptables, a third party tool?
</I>><i> > > >
</I>><i> > > I'm in the middle of doing something very similar. I don't know how often they
</I>><i> > > update the archives on this list but the subject on the thread for what I'm
</I>><i> > > working on
</I>><i> >
</I>><i> > Linux has a thing called 'dead gateway detection', which might work for you.
</I>><i> > Just make two routes with a different metric, should work I think.
</I>><i> >
</I>><i> > Existing sessions will die however because their source IP address is
</I>><i> > unroutable.
</I>><i>
</I>><i> I'm not sure that is working correctly. I have two DSLs to the internet with
</I>><i> different IP addresses, speeds and ISPs.
</I>><i>
</I>><i> DSL1: 63.194.. 384Kb/sec X 1.5-6Mb/sec ADSL on eth1 via pacbell
</I>><i> DSL2: 64.63.. is 768Kb/sec SDSL on eth2 via lmki
</I>><i>
</I>><i> Test:
</I>><i> ping yahoo site through DSL1
</I>><i> unplug phone line from bridge on DSL1
</I>><i> ip route flush table cache
</I>><i> ping yahoo site --- No response
</I>><i> tracepath yahoo site --- Still trying to use DSL1
</I>><i>
</I>><i> That isn't working.
</I>><i>
</I>><i> Here's my setup:
</I>><i> $ ip route
</I>><i> 10.1.1.1 dev eth2 scope link src 10.1.1.2
</I>><i> 10.0.0.0/24 dev eth0 scope link src 10.0.0.1
</I>><i> 127.0.0.0/8 dev lo scope link
</I>><i> default
</I>><i> nexthop via 63.194.239.201 dev eth1 weight 99
</I>><i> nexthop via 10.1.1.1 dev eth2 weight 1
</I>><i>
</I>For the default route, try:
ip route add default via 63.194.239.201 dev eth1
ip route add default via 10.1.1.1 dev eth2 metric 10
But you will loose the load balancing behaviour.
Emmanuel.
</PRE>
^ permalink raw reply [flat|nested] 8+ messages in thread* [LARTC] Backup Route
2000-11-16 21:10 [LARTC] Backup Route Michel
` (4 preceding siblings ...)
2000-11-17 11:03 ` Emmanuel
@ 2000-11-17 11:56 ` Mike
2003-03-19 15:19 ` [LARTC] backup route Marijus Spakovskis
6 siblings, 0 replies; 8+ messages in thread
From: Mike @ 2000-11-17 11:56 UTC (permalink / raw)
To: lartc
<PRE>Emmanuel Fuste wrote:
><i>
</I>><i> Mike Fedyk wrote:
</I>><i> >
</I>><i> > bert hubert wrote:
</I>><i> > > Linux has a thing called 'dead gateway detection', which might work for you.
</I>><i> > > Just make two routes with a different metric, should work I think.
</I>><i> > >
</I>><i> > > Existing sessions will die however because their source IP address is
</I>><i> > > unroutable.
</I>><i> >
</I>><i> > I'm not sure that is working correctly. I have two DSLs to the internet with
</I>><i> > different IP addresses, speeds and ISPs.
</I>><i> >
</I>><i> > DSL1: 63.194.. 384Kb/sec X 1.5-6Mb/sec ADSL on eth1 via pacbell
</I>><i> > DSL2: 64.63.. is 768Kb/sec SDSL on eth2 via lmki
</I>><i> >
</I>><i> > Test:
</I>><i> > ping yahoo site through DSL1
</I>><i> > unplug phone line from bridge on DSL1
</I>><i> > ip route flush table cache
</I>><i> > ping yahoo site --- No response
</I>><i> > tracepath yahoo site --- Still trying to use DSL1
</I>><i> >
</I>><i> > That isn't working.
</I>><i> >
</I>><i> > Here's my setup:
</I>><i> > $ ip route
</I>><i> > 10.1.1.1 dev eth2 scope link src 10.1.1.2
</I>><i> > 10.0.0.0/24 dev eth0 scope link src 10.0.0.1
</I>><i> > 127.0.0.0/8 dev lo scope link
</I>><i> > default
</I>><i> > nexthop via 63.194.239.201 dev eth1 weight 99
</I>><i> > nexthop via 10.1.1.1 dev eth2 weight 1
</I>><i> >
</I>><i> For the default route, try:
</I>><i> ip route add default via 63.194.239.201 dev eth1
</I>><i> ip route add default via 10.1.1.1 dev eth2 metric 10
</I>><i>
</I>><i> But you will loose the load balancing behaviour.
</I>><i>
</I>><i> Emmanuel.
</I>
I am not running any kind of routing daemon, is this required for this to work?
Maybe rdisc?
The problem I'm having is having a dsl go down suddenly, and switching over to
another for outbound traffic for our network.
I run a ping and unplug the phone from the dsl bridge. This is how it would go
down in a real situation. The ping stops. I "ip ro f t cache", but still
nothing. I turn off the dsl bridge, and still nothing. The only thing that
I've tried that works is "ip link set eth1 down". It seems that I need an
active status monitoring system.
Here's my setup:
<A HREF="mailto:root@gateway">root@gateway</A>:/etc/init.d$ ip ro
63.194.239.201 dev eth1 scope link src 63.194.239.202
10.1.1.1 dev eth2 scope link src 10.1.1.2
10.0.0.0/24 dev eth0 scope link
127.0.0.0/8 dev lo scope link
default via 63.194.239.201 dev eth1
default via 10.1.1.1 dev eth2 metric 2
<A HREF="mailto:root@gateway">root@gateway</A>:/etc/init.d$ ip ru
0: from all lookup local
32760: from 10.1.1.2 lookup 20
32761: from 63.194.239.202 lookup 10
32766: from all lookup main
32767: from all lookup default
<A HREF="mailto:root@gateway">root@gateway</A>:/etc/init.d$ ip ro s t 10
63.194.239.201 dev eth1 scope link src 63.194.239.202
10.0.0.0/24 dev eth0 scope link
default via 63.194.239.201 dev eth1
<A HREF="mailto:root@gateway">root@gateway</A>:/etc/init.d$ ip ro s t 20
10.1.1.1 dev eth2 scope link src 10.1.1.2
default via 10.1.1.1 dev eth2
</PRE>
^ permalink raw reply [flat|nested] 8+ messages in thread* [LARTC] backup route
2000-11-16 21:10 [LARTC] Backup Route Michel
` (5 preceding siblings ...)
2000-11-17 11:56 ` Mike
@ 2003-03-19 15:19 ` Marijus Spakovskis
6 siblings, 0 replies; 8+ messages in thread
From: Marijus Spakovskis @ 2003-03-19 15:19 UTC (permalink / raw)
To: lartc
Hello,
I have box connected to 2 isp, via 1.1.1.1 eth0 and via 2.2.2.2 eth1. I
want that gateway 2.2.2.2 will be used only if 1.1.1.1 is not active.
Curently configuration is with weight 1 and weight 256, so it uses gateway
2.2.2.2 sometimes.
I missed some manual topic or it is only way to make backup with iproute2?
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 8+ messages in thread