05-14-2010 10:48 AM - edited 03-04-2019 08:29 AM
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
05-14-2010 03:08 PM
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
+
neigh
! 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
05-14-2010 03:48 PM
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.
05-17-2010 08:48 AM
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
05-21-2012 11:51 PM
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.
05-06-2016 07:34 AM
Just in case someone is still looking for the answer of this although 6 years later. What you need to do is:
1- Put all your interfaces in a VRF (eiBGP multipath only works for VPNv4 routes)
2- in your address-familly enable: maximum-paths eibgp 2 (or more if you have many paths)
3- Make sure, your iBGP route(s) has the same BGP Weight as the eBGP one(s)
4- in BGP, enable: bgp bestpath as-path multipath-relax
That's it. Hope this helps
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: