cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2181
Views
0
Helpful
8
Replies

How to load balance outbound connections across equal BGP peers

kbyrd
Level 2
Level 2

My current routing table looks like this for the default route

C2921-ISP2-1# sh ip bgp 0.0.0.0

BGP routing table entry for 0.0.0.0/0, version 4

Paths: (2 available, best #1, table default)

  Advertised to update-groups:

     4        

  Refresh Epoch 1

  4922 2914

    204.111.0.65 from 204.111.0.65 (204.111.0.5)

      Origin IGP, localpref 100, valid, external, best

  Refresh Epoch 1

  64512 26202

    216.235.224.1 from 216.235.224.1 (216.235.224.253)

      Origin IGP, localpref 100, valid, external

The BGP configuration is simple:

router bgp 64512

bgp log-neighbor-changes

bgp bestpath as-path ignore

neighbor 204.111.0.65 remote-as 4922

neighbor 204.111.0.65 ebgp-multihop 2

neighbor 204.111.0.65 update-source GigabitEthernet0/2

neighbor 216.235.224.1 remote-as 26202

neighbor 216.235.224.1 ebgp-multihop 2

neighbor 216.235.224.1 update-source GigabitEthernet0/1

neighbor 216.235.224.1 route-map as-Kinex in

The router is picking the 204.111.0.65 path because it has the lowest router ID. Same AS hops.

Can I load balance outbound flows (not packet by packet) across these two ISPs?

8 Replies 8

Dennis Mink
VIP Alumni
VIP Alumni

You CANT truly load balance using BGP.  For your outbound connections you will need to play with your local prefence, betweem the two eBGP neighbours.

something like:

The BGP configuration is simple:

router bgp 64512

bgp log-neighbor-changes

bgp bestpath as-path ignore

neighbor 204.111.0.65 remote-as 4922

neighbor 204.111.0.65 ebgp-multihop 2

neighbor 204.111.0.65 update-source GigabitEthernet0/2

neighbor 204.111.0.65 route-map blah1 in

neighbor 216.235.224.1 remote-as 26202

neighbor 216.235.224.1 ebgp-multihop 2

neighbor 216.235.224.1 update-source GigabitEthernet0/1

neighbor 216.235.224.1 route-map blah 2 in

route-map blah1 permit 10

  set local-preference 110

route-map blah2 permit 10

  set local-preference 90

=============================
Please remember to rate useful posts, by clicking on the stars below.

=============================

Please remember to rate useful posts, by clicking on the stars below.

Thanks for your response. What about the

bgp bestpath as-path multipath-relax

command? Someone just brought this (hidden?) command to my attention.

Hello,

yes, the multipath-relax option will work here. Be aware that you need to enable maximum-paths 2 as well. Here you may find more information about this option:

http://wiki.nil.com/Multipath_Load_Sharing_with_two_ISPs

Hope this helps,

Jose.

Let me suggest a slightly different approach, which is easy and works very well for sharing load for multiple outbound BGP peers. I can not tell from this thread so far whether the ISPs are advertising more than a default route. With most ISP when you run BGP with them you have a choice of whether they will advertise just default, or advertise limited routes, or will advertise the full table. If you request at least one of your ISP to advertise limited routes then there will be a group of routes in your table that are unique to that ISP and that traffic will go to that ISP. If you use local preference to prefer the default route from the other ISP then you will automatically have load sharing between the 2 ISP for outbound connections.

HTH

Rick

HTH

Rick

Richard, we may want to do that.

I have in the past asked ISPs for full or for default routes.

First question: 1) Is there a standard for an ISP to advertise "limited routes".

Ideally, I would think it would split the public address range with a limited number of summary advertisements and omit the private ranges. One ISP would take the high range, one ISP would take the low. However, you mentioned only one would provide me with a limited number of routes - giving me a more specific match to their service - and the other would continue with only advertising the default route.

Second question: 2) This is related to failover for the scenario above. How would that work? The customer I am working with needs complete ISP failover (K-12 customer). It would seem I would not have that if something in the link of ISP advertising the default route fails.

1)  I am not aware of a standard for advertising limited routes. Frequently it is that the ISP will advertise routes for its directly connected customers, or perhaps it will advertise routes that have no more than 2 or 3 or x number of hops in the AS path. I have not seen it done as a low range/high range but ask your providers and perhaps they can do that if you ask.

I suggested having one ISP advertise limited routes and one advertise default because it is the most simple to understand. It is, of course, quite possible for each provider to advertise its own limited routes and would probably result in a more efficient routing decision if we can choose the shortest path to some destinations.

2) I was explicit about learning a default from 1 ISP to make the point that at least 1 ISP needs to advertise a default. It is certainly possible, and probably desirable, that both ISP advertise a default route. And if both ISP do advertise a default route then failover is taken care of.

HTH

Rick

HTH

Rick

Thanks, Jose. We have a window to try this command this afternoon.

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

Another option you might wish to consider, if your device supports PfR, that will dynamically load balance.  (Personally, I've found setting up equal paths with the hidden relax command, and just taking defaults, and then allows PfR to "fine tune", works very well.)

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card