Hola lartc, I have redhat6.2 (kernel 2.2.14), and ipchains. I try to configure 2 default gw: route add default gw 200.10.0.254 route add default gw 205.1.0.254 metric 10 but when gateway 1 down (lost connection) the default route didn''t change to the 2nd gateway. I need any servicice to do this? Regards Alex
On Thu, Feb 01, 2001 at 01:49:11PM -0600, fabian1 wrote:> Hola lartc, > I have redhat6.2 (kernel 2.2.14), and ipchains. > I try to configure 2 default gw: > > route add default gw 200.10.0.254 > route add default gw 205.1.0.254 metric 10 > > but when gateway 1 down (lost connection) the default route didn''t > change to the 2nd gateway. I need any servicice to do this?Linux is supposed to have something called ''dead gateway detection'' - in what way is 200.10.0.254 ''dead''? Does it still respond to ARP request? Regards, bert hubert -- PowerDNS Versatile DNS Services Trilab The Technology People ''SYN! .. SYN|ACK! .. ACK!'' - the mating call of the internet
On Thu, 1 Feb 2001, bert hubert wrote:> On Thu, Feb 01, 2001 at 01:49:11PM -0600, fabian1 wrote: > > Hola lartc, > > I have redhat6.2 (kernel 2.2.14), and ipchains. > > I try to configure 2 default gw: > > > > route add default gw 200.10.0.254 > > route add default gw 205.1.0.254 metric 10 > > > > but when gateway 1 down (lost connection) the default route didn''t > > change to the 2nd gateway. I need any servicice to do this? > > Linux is supposed to have something called ''dead gateway detection''Which it doesn''t use when there''s a multipath default route. Now, that isn''t technically the case here, so that shouldn''t be the problem here. However, I thought I''d mention it, as others might run into it. Doei, Arthur. -- /\ / | arthurvl@sci.kun.nl | Work like you don''t need the money /__\ / | A friend is someone with whom | Love like you have never been hurt / \/__ | you can dare to be yourself | Dance like there''s nobody watching
On Thu, 1 Feb 2001, Arthur van Leeuwen wrote:> On Thu, 1 Feb 2001, bert hubert wrote: > > > Linux is supposed to have something called ''dead gateway detection'' > > Which it doesn''t use when there''s a multipath default route. Now, that isn''t > technically the case here, so that shouldn''t be the problem here.Does this mean that Linux automatically detects a failed default route and takes the second one if I configure two default routes? Cheers, René GNU/Linux Manages! - Linux Solution Provider RP551296-NICAT - Open Software for Open Minds
On Thu, 1 Feb 2001, Rene ''Lynx'' Pfeiffer wrote:> On Thu, 1 Feb 2001, Arthur van Leeuwen wrote: > > > On Thu, 1 Feb 2001, bert hubert wrote: > > > > > Linux is supposed to have something called ''dead gateway detection'' > > > > Which it doesn''t use when there''s a multipath default route. Now, that isn''t > > technically the case here, so that shouldn''t be the problem here. > > Does this mean that Linux automatically detects a failed default > route and takes the second one if I configure two default routes?No, it means the exact opposite. If you configure two default routes Linux will randomly multiplex outgoing connections over the two routes. As opposed to the case of a single route it will not even *try* to do dead gateway detection on these routes anymore. Yes, I do think that behaviour is silly. However, I haven''t thought of a better way to do it yet. Doei, Arthur. -- /\ / | arthurvl@sci.kun.nl | Work like you don''t need the money /__\ / | A friend is someone with whom | Love like you have never been hurt / \/__ | you can dare to be yourself | Dance like there''s nobody watching
On Thu, 1 Feb 2001, Arthur van Leeuwen wrote:> On Thu, 1 Feb 2001, Rene ''Lynx'' Pfeiffer wrote: > > > On Thu, 1 Feb 2001, Arthur van Leeuwen wrote: > > > > > On Thu, 1 Feb 2001, bert hubert wrote: > > > > > > > Linux is supposed to have something called ''dead gateway detection'' > > > > > > Which it doesn''t use when there''s a multipath default route. Now, that isn''t > > > technically the case here, so that shouldn''t be the problem here. > > > > Does this mean that Linux automatically detects a failed default > > route and takes the second one if I configure two default routes? > > No, it means the exact opposite. If you configure two default routes > Linux will randomly multiplex outgoing connections over the two routes.This is exactly the problem I am having. I am trying to set up a spare default route in case the primary route is down. The router in question is a Linux machine having access to three upstream connections and to the DMZ. I do not want to have routing daemons on the box, I simply want to change the default route in case the primary connection (which supplies the LAN behind the DMZ) is down. The only thing I have come up so far (I do not want to have fancy things like zebra, routed or gated on this machine) is a Perl script that measures the connectivity and takes action if it detects that the route is down. Does anyone have a better idea? (I am willing to to a nice and tidy ASCIIgram if you like ;-) Cheers, René GNU/Linux Manages! - Linux Solution Provider RP551296-NICAT - Open Software for Open Minds
On Fri, 2 Feb 2001, Rene ''Lynx'' Pfeiffer wrote:> On Thu, 1 Feb 2001, Arthur van Leeuwen wrote: > > > On Thu, 1 Feb 2001, Rene ''Lynx'' Pfeiffer wrote: > > > > > On Thu, 1 Feb 2001, Arthur van Leeuwen wrote: > > > > > > > On Thu, 1 Feb 2001, bert hubert wrote: > > > > > > > > > Linux is supposed to have something called ''dead gateway detection'' > > > > > > > > Which it doesn''t use when there''s a multipath default route. Now, that isn''t > > > > technically the case here, so that shouldn''t be the problem here. > > > > > > Does this mean that Linux automatically detects a failed default > > > route and takes the second one if I configure two default routes? > > > > No, it means the exact opposite. If you configure two default routes > > Linux will randomly multiplex outgoing connections over the two routes. > > This is exactly the problem I am having. I am trying to set up a spare default > route in case the primary route is down. The router in question is a Linux > machine having access to three upstream connections and to the DMZ. I do not > want to have routing daemons on the box, I simply want to change the default > route in case the primary connection (which supplies the LAN behind the DMZ) > is down.> The only thing I have come up so far (I do not want to have fancy things like > zebra, routed or gated on this machine) is a Perl script that measures the > connectivity and takes action if it detects that the route is down.> Does anyone have a better idea? (I am willing to to a nice and tidy ASCIIgram > if you like ;-)Nope. Polling for connectivity is what you''re stuck with doing, unless you want to do some kernel hacking. Doei, Arthur. (Who is thinking about actually doing the latter... it''s *useful*, in more cases than one) -- /\ / | arthurvl@sci.kun.nl | Work like you don''t need the money /__\ / | A friend is someone with whom | Love like you have never been hurt / \/__ | you can dare to be yourself | Dance like there''s nobody watching
On Fri, 2 Feb 2001, Arthur van Leeuwen wrote:> Nope. Polling for connectivity is what you''re stuck with doing, unless you > want to do some kernel hacking.I''m not too familiar with the latest kernel netfilter capabilities, but is it possible to MARK certain packet (eg retransmits) so that they could be caught by the netlink device which sends them to a userspace program, which changes the default route? Or could you mark ICMP destination unreachables to fling them up the netlink chain into userspace? Paul Wouters Xtended Internet -- Broerdijk 27 Postbus 170 Tel: 31-24-360 39 19 6523 GM Nijmegen 6500 AD Nijmegen Fax: 31-24-360 19 99 The Netherlands The Netherlands info@xtdnet.nl