Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is bonding the preferred way of implementing ISP redundancy?

In the texts I've seen, bond device has a netmask, gateway of it's own. How can this be obtained if there are two different gateways from two uplinks, which one to choose?

Do I need any special routing rules to go with it or does simply configuring separate interfaces (using Debian, /etc/network/interfaces), i.e eth1, eth2 for their corresponding uplinks and bonding them to bond0 handle routing automatically?

If I want to NAT client machines, do they use bond device's IP as a gateway? Does the bond0 device is the device that goes into iptables nat rules?

Thanks

share|improve this question
    
I cannot comment on the specifics of how to load balance two ISPs using Linux, but bonding is not the proper terminology. You do not make the two ISP connections appear as one as you would an uplink to a switch. You typically achieve ISP redundancy using simple fail-over configurations, or load-balancing using round-robin or BGP routing configurations. –  Kevin Kuphal Jun 23 '09 at 19:52
add comment

5 Answers

up vote 11 down vote accepted

Bonding is not applicable for this case.

For your solution: You will find some useful notes at Increasing bandwidth with multiple NICs.

For Bonding: You can start at the Wikipedia Link Aggregation and related Channel bonding pages for initial reading on bonding.

share|improve this answer
add comment

"Bonding" (teaming, trunking, or a host of other terms) NICs is used to increase bandwidth into a switch, or for redundancy for LAN connections.

Redundancy and/or bandwidth expansion for WAN connections (like, to the Internet) is accomplished with routing protocols (typically BGP). Bonding the NICs together on a server computer isn't going to accomplish that.

share|improve this answer
add comment

No, you cannot handle multiple ISP uplinks using bonding. Bonding is strictly a Layer 2 (Ethernet) technique, and has no way to detect upstream failures or properly split traffic beyond the direct Ethernet link to your upstream switch/router.

Linux can support multiple upstream ISPs, in either a load-balancing (with limits) or redundant configuration (or both), using policy-based IP routing with multiple routing tables. There is an excellent explanation of the theory and practice, with diagrams, here:

However, I would not recommend implementing that tutorial in a production environment. It's pretty raw, and it will break your existing distribution-specific IP configuration (network-scripts, etc.), and it doesn't handle upstream failures automatically.

The Shorewall project (http://www.shorewall.net/) provides a wrapper mechanism that is far easier and more manageable, especially if you're not already a policy routing pro. It calls itself a "firewall", but it can be strictly useful as a load-balancing, failover-handling gateway to multiple ISPs. The project has a tutorial page that outlines some of the details, here:

Shorewall integrates nicely with the most popular Linux distros, and has actively-maintained packages for RHEL/CentOS, Fedora, Debian, and OpenSUSE.

Specifically, Shorewall provides a set of simplified, rule-based configuration files that you can edit as needed to describe your configuration and implement your desired functionality. It has lots of examples to copy, too.

share|improve this answer
add comment

You can bond over multiple ISPs, but there are significant downsides. It involves tunnelling across your existing connections to a single ISP datacentre with a bonding server/cluster. Then you would use this ISPs IP transit to the internet and IP addressing etc.

Your LAN would be presented with a single fully routed IP range, and cope with failures etc, but the downsides are then: You are still relying on a single ISP for the datacentre/IP transit. You are then bonding over the public internet - which means you can't guarantee latency etc, and if you experience problems, it will be much more difficult to sort out.

Normal bonding with a single ISP obviously has its drawbacks, but to me they are outweighed by the quality/support/flexibility issues of doing it with multiple ISPs.

share|improve this answer
    
Just thought of something else - when you bond across the internet, the ISP that hosts the bonding platform will have to use much more bandwidth than if they bonded it over their own lines. This is because any connections originating outside of their network will obviously take bandwidth on the way in as well as then on the way out with IP transit. So make sure you discuss bandwidth limits and amounts, as some will undoubtedly charge a lot for extra transfer if you exceed those limits. –  Nic May 13 '10 at 15:45
add comment

you can use DrayTek 2950 http://www.draytek.co.uk/products/vigor2950.html

Plug both your internet lines / connections to it and either run it in load balance mode or failover mode

hope that helps

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.