Re: adsl + cable multiple connection problem

From: alexp (banha_at_sapo.pt)
Date: 04/17/04


Date: 17 Apr 2004 06:55:38 -0700

Here is the answer that Julian Anastasov send me!!!

        Hello Alexandre,

On Fri, 16 Apr 2004, Alexandre Pereira wrote:

>> I don't know if you have enough time to read my message and answer me,
>> but I can't solve this problem by myself so I'm sending this to you.
>>
>> I have a multiple connection (ADSL + Cable) running for almost a year.
>> I followed the instructions of Christoph Simon
>> (http://www.ssi.bg/~ja/nano.txt) and yours
>> (http://www.ssi.bg/~ja/dgd-usage.txt):
>> - patched a brand new kernel (2.4.25) with your scripts
>> (http://www.ssi.bg/~ja/routes-2.4.24-9.diff which works with 2.4.25
>> kernel) [I've tried with other kernels before but always the same problem];
>> - configured the kernel to have "equal cost multi path" enabled;
>> - compiled the kernel and modules and installed them;
>> - installed iproute2 and builded a script like yours to manage multiple
>> connections and Dead gateway detection;
>> - wrote a iptables based firewall.
>>
>> My Linux box have two public static IP adresses (ADSL + Cable) and one
>> private IP for the LAN and DMZ networks.
>>
>> The Cable modem is connected to eth1 and the ADSL modem is set up as
>> RFC1483 Bridging so I have to run adsl-start (pppoe + pppd) to start the
>> ppp0 interface which is connected to the eth0 interface.
>>
>> I expected that, when one of the connections got down, the other one
>> would carry all the load. It happens this way when the Cable connection
>> fails.
>> But when the ADSL connection fails, ppp0 interface disappears and the
>> supposedly static routes go away too. Specially the ip route that
>> manages the load balancing:
>>
>> ip route add default table 222 proto static equalize \
>> nexthop via $GWE1 dev $IFE1 weight 1 \
>> nexthop via $GWE2 dev $IFE2 weight 1
>>
>> On the one hand, you give an example like this one and say that this
>> rule (with "proto static") should survive even if ppp0 is down.

        proto static can survive device state change but not
device unregistration. It is a common case the ppp devices to
disappear. This is why recent 2.4 kernels automatically delete
the whole multipath route. The main problem is that the kernel
has such organization of the network devices that does not allow
device that is unregistered and registered again to get its place back
in the nexthop. The reason for this is that each time device is
registered a new unqiue interface index is allocated, it is not
registered by name because this can lead to security risks (another
device replaces the unregistered in routes).

>> On the other hand, Simon says that there is no support for PPP, PPPoE,
>> etc.(section 1.2. Bad news).

        Yes, nobody can survive unregistered devices Only
iptables works with device names.

>> I would like to know if my configuration is possible or not. And if it
>> is, how can I maintain the routes when the interface ppp0 dies (and
>> disapears from the 'ip addr' list). Can you give me some clues?

        The result is that you need a script that is called on
ppp device event (ip-up and ip-down) to replace the multipath
route with new version containing only registered devices (and
probably alive gateways). So, the "routes" patch does not give you
some failover capabilities, may be only for the ADSL gateway.
The benefit is only the proper routing for NAT connections over
multipath route (when it has two or more nexthops via different
ISPs). But also make sure the gateway for the ADSL line will
not be reachable in the ARP table when the line fails. May be
your scripts will need to health check other indirect gateways,
eg. the ISP state.

>> Regards
>> Alexandre Pereira

Regards

--
Julian Anastasov


Relevant Pages

  • Re: Isa server with 3 inernet connection
    ... >> one adsl and all other protocols to other adsl. ... ISA 2004 standard doesn't route by name, ... networks for each of the internet connections, but only one can function as ...
    (microsoft.public.isaserver)
  • Re: ADSL PPPoA using a bridged ADSL router?
    ... >> route that through a /30 which will live on the ADSL card, ... >advantages of an off-the-shelf box, but I find the scenario slightly ... So many current ADSL routers are simply little embedded Linux ...
    (uk.comp.os.linux)
  • Re: Multiple internet connections routing.
    ... >> connections end up on the same gateway machine) whenever first ... >> register their addresses as your primary and secondary DNS ... A connection surveillance mechanism, triggering a route switching ... And the route switching script itself. ...
    (comp.os.linux.networking)
  • Packet routing by source IP
    ... I have two internet connections and a lan on which I run a server. ... ISP connection 1 goes into a linux router and the connection 2 goes ... iptables has a ROUTE target and can route the packets by source IP. ...
    (comp.os.linux.networking)
  • Re: Network Setup Advice
    ... This lets inbound connections work for mail, ... lest you have the neighborhood skript-kiddy surfing pr0n and sending ... and that is going to have to be the route ... are going to have considerable confusion over which interface to use. ...
    (comp.os.linux.networking)