BGP Outbound Load Balancing

Unanswered Question
Nov 12th, 2009


If I had 2 Internet routers, each homed to a different ISP -- and then had one router sitting behind them with a routed uplink to each, could I create a load sharing scheme if I have 2 equal-cost default routes in that backend router to each of the Internet routers?

So, its like a triangle...2 Internet edge routers, each with its own bgp connection to a different ISP, and then a 3rd router sitting behind both of them with the static routes as described.

Would that work to utilize both edge routers' ISP links going outbound?


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (3 ratings)
Jon Marshall Thu, 11/12/2009 - 12:07


Yes you could use both ISP links that way assuming that

1) the BGP routers are independant of each other ie. there is no IBGP peering between them - if there was then it may not work as you expect

2) you NAT the outbound traffic to one of the ISP's public address per ISP so return traffic comes back in the same router.


Jon Marshall Thu, 11/12/2009 - 12:25


Actually i may be talking rubbish (wouldn't be the first time !!). EBGP routes will always be preferred over IBGP routes so it shouldn't matter and in fact running IBGP would also give you some sort of redundancy if one of the ISP links went down.


ex-engineer Thu, 11/12/2009 - 12:47

Jon, we presently have a box topology.

Two Internet (I1 and I2) routers with one "access" router (A1 and A2) connected to each - like a box.

So, its I1 with a southbound connection to A1 and I2 with a southbound connection to A2. I1 and I2 connected to each other, and A1 and A2 connected to each other. All equal cost L3 links.

Each edge router has an eBGP connection to the ISP, but this is what is happening:

A1 is the HSRP primary and it receives and forwards all the traffic from the users to a default route it has to I1. I1 sees itself as the best route to the Internet and out it goes. Thats it. A2 and I2 are sitting their twittling their thumbs. This is the outbound direction.

So, what I am thinking is that A1 (lets just talk about A1 for now), should be dual homed to I1 and I2.

A1 can then have 2 equal-cost default routes to I1 and I2 that it learned dynamically from each of them.

I1 and I2 both learn their default routes from their ISP connections, so they can withdraw the default route advertisment to A1 if it loses it.

Does this make sense?

let me know if you need a drawing?

I am trying to get I2 to forward outbound traffic to the Internet as much as I1 does...right now, I1 outbound to the Internet is about 16 times more than I2.

What do you think?

Jon Marshall Thu, 11/12/2009 - 12:52


"Does this make sense?"

Yes it does. One solution is as you suggest to dual hone A routers to L routers so whichever A router is used it sees 2 equal cost paths via both L routers.

You could also think about using GLBP instead of HSRP on A routers which would then spread the load between A1 and A2 and with the current box setup both L routers would be used equally.

Note when i say equally that is not necessarily traffic volume but spread of internal clients over the 2 ISP links.


ex-engineer Thu, 11/12/2009 - 13:01

Yup, I was thinking about GLBP, too.....

I guess I could leverage both solutions

This way A1 has 2 routes with the dual homing solution...

And A2 can now start forwarding Internet bound traffic with its dual homed connection.

In theory, this should increase our outbound throughput exponentially...

Any more thoughts?

By the way, why the NATing requirement?

Whats wrong with traffic leaving throug I1 sand retruning through I2?

By the way, its an I, not an "L" :-)

Jon Marshall Thu, 11/12/2009 - 13:14


"I guess I could leverage both solutions"

Well yes you can but i'm guessing the bottleneck will be the ISP links so it's questionable whether you need both. Then again you might have great ISP links :-)

NAT - "Whats wrong with traffic leaving throug I1 sand retruning through I2?" - just a question of asymmetric routing. If you don't have firewalls then maybe not such a big issue but if you are trying to make sure both links are utilised would make sense to have return traffic coming back on the same link.

"By the way, its an I, not an "L" :-)" - thought it might be but i knew you'd work it out :-)


ex-engineer Thu, 11/12/2009 - 13:19

The ISP links are 10-Gig.

Got your point on the FWs...there arent any, believe it or not...

Thanks for all your help....

Jon Marshall Thu, 11/12/2009 - 13:54

Yep. good point. I should have said all other things being equal EBGP routes will be preferred over IBGP.


ex-engineer Thu, 11/12/2009 - 13:54

Edison, see your point....

So, will an iBGP connection between I1 and I2 cause an issue? I dont see how

Edison Ortiz Thu, 11/12/2009 - 14:08

So, will an iBGP connection between I1 and I2 cause an issue? I dont see how

If ISP A has a better route, the edge router connected to ISP B will use the iBGP connection to exit the network. The same can be seen from ISP B.

This will provide some kind of load balancing on traffic leaving your network.

With iBGP implemented, you can also deploy the same level of load balancing on traffic entering your network if both edge routers are advertising similar subnets (using AS_PATH prepend for some subnets, for instance).




This Discussion