ADSL Load Balancing

Home » Asterisk Users » ADSL Load Balancing
Asterisk Users 8 Comments

Hi,

I’ve got a client with two ADSL connections for redundancy.

Is it possible to set up asterisk to connect to one SIP provider using both adsl connections and load balance between the two connections?
Or to use one connection as the main one, and automatically fail over if the first connection drops?

Or does this kind of thing need a serious network switch?

Thanks
Dan

8 thoughts on - ADSL Load Balancing

  • Your router would have to do per-destination when it came to load balancing
    between the two dsl circuits. That way a single call could only use one dsl
    path.

    Hi,

    I’ve got a client with two ADSL connections for redundancy.

    Is it possible to set up asterisk to connect to one SIP provider using both
    adsl connections and load balance between the two connections?

    Or to use one connection as the main one, and automatically fail over if the
    first connection drops?

    Or does this kind of thing need a serious network switch?

    Thanks

    Dan

  • Get a Draytek 2820 router/modem and a Vigor 120 ADSL modem and do it in
    the 2820. Much easier. (The 2820 has one ADSL port and one WAN port which
    will run pppoe to the 120 modem)

    However if you’re up for it, then 2 separate ADSL modem/routers and read
    this: http://lartc.org/howto/ specifically section 4.

    Gordon

  • I use the SG560 (http://www.snapgear.com/index.cfm?skey=1557) to do this.

    It handles two WAN connections (going to your ADSL modems). I set the
    routing policies so that VOIP goes on one link by default, and
    everything else on the other. If one link goes down, everything will be
    routed on the remaining link.

    (Unfortunately, it doesn’t seem to revert to the default state after the
    downed link recovers, so I have to add some reboot-modems-after-recovery
    scripts in a cron job to make things recovery in an ideal way.)

    I think you can do the same with the Cisco RV016, which is cheaper, but
    the documentation is poor.

    – Mike

  • Hello,

    If you are using Cisco gear (891 SOHO routers for example), take a
    look at Policy Routing, you can set next-hop routers based on any
    information available to an access-list.

    Chris

  • You can do policy routing on Linux systems too, using iptables’ mark functionality, combined with iproute2. Mark packets patching whatever parameters you wish (i.e., in the mangle table in the prerouting chain, match packets on UDP port 5060), and then use ip rule/ip route to route as you desire. See here for more detailed instructions/examples:

    http://linux-ip.net/html/adv-multi-internet.html

    Whether this will work well (or at all) for your specific case is questionable at best. I can’t imagine load balancing SIP traffic across two ADSL lines would work well, if at all, but I’ve never tried it either. Doing a primary/failover setup would work a lot better, I’d think.

    Oh, and my apologies for top-quoting. Outlook and all…

    href=”mailto:asterisk-users-bounces@lists.digium.com”>asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Chris Childress
    Sent: Thursday, November 04, 2010 9:08 AM

    Hi,

    I’ve got a client with two ADSL connections for redundancy.

    Is it possible to set up asterisk to connect to one SIP provider using both adsl connections and load balance between the two connections?
    Or to use one connection as the main one, and automatically fail over if the first connection drops?

    Or does this kind of thing need a serious network switch?

    Thanks
    Dan

    Hello,

    If you are using Cisco gear (891 SOHO routers for example), take a look at Policy Routing, you can set next-hop routers based on any information available to an access-list.

    Chris