Override dead

Linux Advanced Routing and Traffic Control

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

 



Hello,

Like others which have posted to this list, I
configured a load balancing router using Julian's
patches as described in "nano.txt" for multiple ISP
links.  It works perfectly when all ISPs are up and
running.  Here's a sample diagram:

    ISP A                        ISP B
      |                           |
      | WAN                       | WAN
  +---+------+                +---+------+
  |   DSL    |                |   DSL    |
  | Router A |                | Router B |
  +---+------+                +---+------+
      | LAN (1.1.1.1)             | LAN (2.2.2.1)
      |                           |
      |       +---------+         |
      |  eth0 |  Linux  | eth1    |
      +-------+  Router +---------+
    (1.1.1.2) |         | (2.2.2.2)
              +----+----+
                   | eth2
                   |
             Local Network

The problem is that there are times when the
provider's network goes down, but our router is still
able to communicate with the provider's router.  For
example, in the diagram above assume that ISP A's DSL
network is down - the Linux Router is still able to
ping DSL Router A.

So, a workaround I tried was to run a shell script
once every minute as a cron job.  The script runs two
tests.  First it tries to ping the DSL router.  If
that succeeds, it then tries to ping an Internet site
such as google.com.  The ping commands use the -I
parameter to make sure the packets go out the right
interface.

If either of the tests fails, I adjust the load
balancing rule and remove the "nexthop" parameter for
the particular interface that is down.  Here's an
example:

Balancing rule if both interfaces are up:
ip route add default table balancing proto static\
    nexthop via 1.1.1.1 dev eth0 weight 1\
    nexthop via 2.2.2.2 dev eth1 weight 1

Balancing rule if second DSL line is down:
ip route add default table balancing proto static\
    nexthop via 1.1.1.1 dev eth0 weight 1

Ok, that all works fine and dandy.  The problem is
that  if one of the WANs gets marked as down and it's
removed from the balancing rule, all future ping tests
to Internet hosts specifically using that interface
end up failing.  The behavior is very strange.

Say that eth1 is one of the WANs which was tested as
down and removed from the balancing rule.  If I then
try to ping an Internet host using eth1 like this
"ping 128.101.101.101 -I eth1", the router sends ARP
requests out eth1 asking for the MAC adddress which
corresponds to 128.101.101.101!

Has anyone experienced this problem before?  What I'd
really like is to be able to manually mark an
interface as "dead" without actually taking it down or
removing it from the load balancing route.  When you
run "ip route list table balancing", it will tell you
if an interface is dead or not.  The only downfall is
as I explained at the beginning of this e-mail - there
are cases where the Linux router itself can still ping
the DSL router connected to it, but that DSL's
Internet connection is not functional.

If the actual commands I run would be helpful, please
ask and I'll post them (they're basically copied from
nano.txt).

Thanks!

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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