EBGP/IBGP Load Balancing

Unanswered Question
May 14th, 2010

Hi All,

Is it possible to install a routes into routing table from the same subnet coming from two different sources ebgp/ibgp and "load balance" the traffic? I've searched the forums found threads similar to my question but there was never a clear answer if it was possible or not.

i've used the lines below to tweak ad/weight/lp etc...

RTRA

router bgp 100
no synchronization
bgp log-neighbor-changes
bgp bestpath as-path multipath-relax
neighbor 1.1.1.2 remote-as 100
neighbor 1.1.1.2 next-hop-self
neighbor 1.1.1.2 soft-reconfiguration inbound
neighbor 1.1.1.2 route-map bgp in
neighbor 2.2.2.2 remote-as 200
neighbor 2.2.2.2 soft-reconfiguration inbound
neighbor 2.2.2.2 route-map bgp in
maximum-paths 2
maximum-paths ibgp 2
distance 200 2.2.2.0 0.0.0.3
no auto-summary

route-map bgp permit 10
set metric 0
set local-preference 100

RTRB

router bgp 100
no synchronization
bgp log-neighbor-changes
bgp bestpath as-path multipath-relax
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 next-hop-self
neighbor 1.1.1.1 soft-reconfiguration inbound
neighbor 1.1.1.1 route-map bgp in
neighbor 3.3.3.2 remote-as 300
neighbor 3.3.3.2 soft-reconfiguration inbound
neighbor 3.3.3.2 route-map bgp in
maximum-paths 2
maximum-paths ibgp 2

distance 200 2.2.2.0 0.0.0.3
no auto-summary

route-map bgp permit 10
set metric 0
set local-preference 100

Thanks in advance

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Average Rating: 3 (1 ratings)
Giuseppe Larosa Fri, 05/14/2010 - 15:08

Hello Merryll,

BGP best path selection happens in the BGP table not in the IP routing table.

BGP best path selection clearly states that eBGP is preferred over iBGP, so even if you are attempting to set AD to 200 for eBGP routes this does not make them iBGP routes in the BGP table.

I couldn't test it in a lab, but I think that a possible way to handle this is to make the iBGP session to appear as an eBGP session using on both sides the neighbor local-as command with the appropriate options. if this can be done you convert the problem to the known problem of eBGP load balancing with different peer AS numbers.

To work this requires the hidden command

bgp bestpath as-path multipath-relax

+

maximum paths 2

+

neighbor local-as XX

+

neigh remote-as YY

! eventually ebgp-multihop could be needed

! last two commands are mirrored on the "iBGP" peer exchanging XX and YY

it would be nice if you could share lab test results if you can do them.

The only trouble I see is the BGP router-id that should make not possible to have at the same time the fake eBGP session and an iBGP session between the same two devices.

Hope to help

Giuseppe

merryllem Fri, 05/14/2010 - 15:48

Giuseppe

"BGP best path selection happens in the BGP table not in the IP  routing table.

BGP  best path selection clearly states that eBGP is preferred over iBGP, so  even if you are attempting to set AD to 200 for eBGP routes this does  not make them iBGP routes in the BGP table."

Thanks for the clarification.

As for you idea, I did try that before I posted but I was not able to get the results. I was able to get bgp session working however the routes were not passing through... but now that I think about it, i think did i might have not given it enough time... ill go ahead and try again.

One thing that is bugging me is if i do manage to get to work, what would stop the routers (rtr1/2) from sending packets to each other (loop) since both routers would have two entries in the routing table 1 to each other and 2 to the ISP.

Giuseppe Larosa Mon, 05/17/2010 - 08:48

Hello Merryll,

>> One thing that is bugging me is if i do manage to get to work, what would stop the routers (rtr1/2) from sending packets to each other (loop) since both routers would have two entries in the routing table 1 to each other and 2 to the ISP.

this is a good reason to avoid to do this in production network.

probably to achieve this strange load balancing AS path prepending may be needed to tune AS path length in addition to the other measures (in order to make AS path lengths equal in the two paths)

Hope to help

Giuseppe

ambotkardeepak Mon, 05/21/2012 - 23:51

Use of OER/PFR fits best in this scenario. That is a special feature for the edge routing.

Also use of bgp maximum paths for the load balancing can be used.

Actions

Login or Register to take actions

This Discussion

Posted May 14, 2010 at 10:48 AM
Stats:
Replies:4 Avg. Rating:3
Views:1236 Votes:0
Shares:0
Tags: No tags.

Discussions Leaderboard