Basic ISP Load Balancing with a Cisco Router

“We have two independent DSL connections to the Internet and want to share the bandwidth for our users.” This was the basic requirement for a load balancing solution at the customer’s site. After searching a while for dedicated load balancers and thinking about a Do-It-Yourself Linux router solution, I used an old Cisco router (type 2621, about 40,- € on eBay) with two default routes, each pointing to one of the ISP routers. That fits. ;)

Configuration

I configured the router with two interfaces/networks: One facing to the two ISP routers (10.49.253.0/24) and the other one facing to the internal firewall (transfer network 10.49.254.0/24).

Then I added two default routes to the two ISP routers (AVM FRITZ!Boxen):

That is, the routing table looks like that (note the last two lines):

 

From now on, every new IPv4 connection to the outside is routed alternately to one of the default routes. Connections to the same destination IPv4 address are routed through the same router.

Functional Test

For testing purposes I browsed to a few different what-is-my-ip homepages such as my own http://ip.webernetz.net/ script or http://www.wieistmeineip.de/. This immediately revealed the two different IPv4 connections as seen in this screenshots:

Speed Test

Both ISP connections have a DSL download capability of almost 10 MBit/s = 1,25 MByte/s. I ran a basic test with two downloads of Knoppix with the result that both downloads used their capacity completely. The overall download rate was about 2 MB/s.

The following two graphs show the CPU usage of the Cisco 2621 router. During the first graph, one of the two downloads finished, so the CPU usage decreased:

That is, the router is more than 50 % busy with this two downloads. However, for the guest Wifi, it fits. ;)

Featured image “Router” by Chris is licensed under CC BY-NC 2.0.

6 thoughts on “Basic ISP Load Balancing with a Cisco Router

  1. Nice, though I see that both next nops are on that same subnet using that same outgoing interface. Therefore, I assume you are using some sort of a switch, so what happens if the link beyond switch or AVM FRITZ!Box itself fails?

    1. Hi Rafal. The load balancing solution here was not meant to provide redundancy or high availability. It is just for better download/upload performance for the guest users. So, you are right: If the switch between the router and the FRITZ!Box fails, there is not Internet access at all…

  2. If there are 2 link. If I want link1 to send traffic out and Link2 for incoming traffic. Can we achieve this with PBR? and if yes how? If no then why not?

  3. What do you exactly mean with “send traffic out” and “incoming traffic”? I suppose that a connection1 will always use link1 (for tx and rx) and that link2 is for new incoming connections (tx and rx, too). If so, yes, PBR can be used for that to have outgoing connections routed via link1 while the default route points to link2 for new incoming connections.
    I don’t have a tutorial for this scenario on Cisco routers. Please google it yourself. ;)

Leave a Reply

Your email address will not be published. Required fields are marked *