Slashdot Mirror


Routing to Multiple Providers with Linux?

Dale Woolridge asks: "Suppose I want to increase the availability/reliability of my home network's connection (to the internet) and high-speed & low-latency are important. I've been using cable for almost two years now, but there are sometimes inexplicable outages which leave me without net access for hours at a time. Rather than switch to another type (aDSL) of provider, I augmented my connectivity by adding another provider. I want to automate the selection of outgoing route, but am willing to live with manual failover in cases where a particular interface/route is available but my upstream provider is having routing problems. Basically, I want to be multi-homed, but my choice of options is limited; clearly, I cannot fiddle with upstream routing."

"To that end, I did a little searching and came up with a few items to help me along the way. First, I had to download the iproute2 package, add a routing table for multipath routing based on this example, and do some interface/packet matching using this information. Unfortunately, none of this seems sufficient to do what I want. Based on what I've read, the issue lies in source address selection. If the multipath table is my default table, I think it chooses the source address based on the weights of the hops in that route. Even with interface selection rules (ip rule add dev eth0 table ...) the issue (routing problems to/from linux box) persists. While I am using the 2.2.19 kernel, I would consider moving to a newer kernel iff I can achieve my goal with it.

Based on the above, my question is this: Has anyone successfully configured their home network as described above under linux? I am interested in knowing how to do it."

7 of 21 comments (clear)

  1. Re:God, are you are so geeky its scary. by ptomblin · · Score: 3

    I, too, have RoadRunner and it rarely goes down for more than a few hours at a time, and that's pretty rare for even that (I once had a 184 day uptime on my router box, and I usually reboot that when the RoadRunner connection drops just to make sure it's not my fault). However I know of other people who lose their high bandwidth connections for days at a time on a fairly regular basis. Since I'm running a couple of web sites and mailing lists off my server at home, if I were in that boat I'd probably look into some sort of redundancy too.

    --

    --
    The next Cmdr Taco duplicate will be ready soon, but subscribers can beat the rush and see it early!
  2. BGP by galmeida · · Score: 4

    You'll have to use BGP. Maybe gated, see http://www.gated.org/

  3. Look at other options... by stienman · · Score: 3

    If you're willing to pay $80/mo or more for a reliable connection, you might want to look at your other options which have a guranteed uptime and latency. SDSL can get you both low latency, high speed, and most companies offering it have good gurantees (try Bullseye, for instance).

    You could also co-locate an external machine with a static IP, and form a vpn with it with your two links. Perhaps you could even find a host that could set that up for you for less than the cost of co-location. I know, bad latency, but do you really expect to have all three: Fast connection, low latency, low cost?

    Part of the issue is that you're trying to take two consumer grade connections and create one business-grade connection. This isn't a 1+1=2 situation at all, you'll be lucky if 1+1=1.25 in your case, and if it is what you choose to do then you might as well use it for automatic failover with the associated glitch of losing any current tcp sessions when it switches. There is just no easy way to get around that with two dynamic IP connections and nothing else. If you can get your cable company(s) to give you static IPs, you might be able to finagle a few things, but you will not be able to mess with the many routers that you'd have to reconfigure to have completely transparent failover.

    Often you will get what you pay for in this business, and what you are asking for is going to cost you either:
    1) Try to make two broken connections equal one good connection: Work with your software and service providers and get things going (40+ hours, and ongoing problems, say 2-4hours/mo, as well as your connection fees of $80/mo or so) or
    2) Skip the pain and simply do it right the first time: Get a dedicated business class connection with gurantees for $120/mo or more depending on your connection speed. A T1 (fractional, burstable, there are lots of options that reduce your cost) is surprisingly affordable these days, if you want better latency and reliability.

    But then, your time and effort may be worth less than $10 an hour to you.

    -Adam

    This sig 80% recycled bits, 20% post user.

  4. Try this.... by NetJunkie · · Score: 3

    Take a look at the NAT routers from http://www.nexland.com/. They have one that will load balance across two connections. Just plug in two Ethernet cables and away you go. Since you have two addresses that are not portable, it will "only" load balance a connection, not by the packet. But it should work!

  5. Failover rather than multihoming by elbuddha · · Score: 5

    You have 2 basic problems with this scheme:
    1. You have been provided with 2 different IP addresses or address spaces, one from each provider, neither of which is portable (neither provider is going to accept traffic from you with a source address in the other provider's IP block).
    2. Neither provider is going to announce routes to you, period. Not with BGP, not even with RIP. So forget about doing path selection with any routing protocol
    Sounds like what you really need is a failover/shadow scheme rather than actual multihoming.

    The way I would go about that goal is:
    • Figure out what manual commands you go through in order to switch over your connectivity from one provider to the other, and back. Write those commands out in a script of your choice.
    • Determine a mechanism and write another script for determining if a connection has gone bad, and run that script as a cron job or background task. You may even desire to combine the two scripts, but personally I would keep their functionality separate.
    • Have the connection-testing script call the connection-changing script when your connection goes down. You could even have the testing script then test the new connection as change back to the first if it goes down, or continue to monitor the primary connection and switch back when it comes up.
    More work for you of course, but have fun with it. Do a good enough job and someone else may even want to use it too.
  6. Not a chance (OK, very slim chance) by autocracy · · Score: 3
    You'll need to register for an autonomous system (AS) number, get yourself into the listings on the major routing tables (warning: nobody wants to add a /32 listing - better get 255 IP addressess for each connection!), and you'll probably have to get your ISPs to play nice too. Oh, and I doubt they'd change their route tables to provide you with a new block of IP addies.

    I know that this how things sounds harsh and cruel, but the truth of it is that it's probably not going to happen the way that you want.

    So you're a karma whore, eh? For the right price, I'll be a karma pimp...

    --
    SIG: HUP
  7. God, are you are so geeky its scary. by Beowulf_Boy · · Score: 4

    "My Cable ISP goes out once a month, so I bought another Cable connection for 40$ a month so I will never be without my connection"
    You are sad, very sad.
    I have RoadRunner, it only goes out when the electric does, so I can't use it anyways.
    Oops, I forgot, you have your basement filled with leadAcid batterys so you will never be without a computer.
    Lemme guess, you also have an I-opener in the Crapper so you can check your e-mail when "Other" business arises.
    Go outside, get some fresh air, take a walk, something, but don't pay 40$ a month so you will have a backup connection for a few hours a month or so. Thats redicoulas.
    IF you really want to, I would use Freesco, it allows connecting 3 networks together, and it just sees the cable modem as a network, I use it right now, ( I have it running on a p75 with 4 megs Ram) and it works great, Runs Linux, and was a sinch to install.