BGP Multipath load sharing iBGP and eBGP

This topic is to discuss the following lesson:

still multipath is not enabling. below is the config.

R1#show run | section bgp
router bgp 1
 neighbor 192.168.12.2 remote-as 23
 neighbor 192.168.13.3 remote-as 23
 maximum-paths 2
 no auto-summary

BGP Table:

R1#show ip bgp
    BGP table version is 2, local router ID is 192.168.13.1
    Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
                  r RIB-failure, S Stale
    Origin codes: i - IGP, e - EGP, ? - incomplete

       Network          Next Hop            Metric LocPrf Weight Path
    *  192.168.23.0     192.168.13.3                           0 23 i
    *>                  192.168.12.2             0             0 23 i

Does BGP version 2 support multipath?

1 Like

Hi Pavan,

That is interesting. What IOS version do you have? The version you see is the version number of the BGP table, not BGP itself.

Rene

Hi Rene,

Some confusion please clarify the below sentence:

We can tell BGP to “relax” its requirement of having the same AS path numbers and AS path length to only checking the AS path length and "AS Path (both AS number and AS path length)

So, If only AS-PATH is identical/same length then we can do BGP load sharing right ?

br//zaman

Hi Zaman,

By default, BGP doesn’t want to load balance over two paths if the AS number is not the same. However, when you add thebgp bestpath as-path multipath-relax command then we remove that requirement. The only thing that remains is that the AS path length has to be the same.

Rene

Hi,
What will happen to return traffic from r2 or r3 to r1 in single AS case
thanks

Hi Sims,

That’s up to AS 23. R2 and R3 will work their way through the BGP attributes list to find the best path to get to prefixes in AS 1:

Rene

OK, so I am right that ECMP (BGP multipath) in single AS case load balance only outgoing traffic (traffic from R1 to R2/3), but not influence incoming traffic (from R2/3 to R1)?

It’s possible to load balance also incoming traffic to R1?

Thanks for reply.

Hello Zdenek

Yes, that is correct. Only outgoing traffic, that is traffic from R1 to R2/R3 is load balanced. There is no way to load balance incoming traffic from the point of view of R1. In other words, there is no configuration within R1 that can be made in order to cause incoming traffic to take two routes to get to R1. Having said that, it is possible to configure load balancing on the side of the other AS and configure load balancing for outgoing traffic from the point of view of the other AS.

I hope this has been helpful!

Laz

Hello Laz,

thank you for your answer.
I have another question. It is possible to load balancing returning incoming traffic from R2/3 to R1? If yes, how to do?

I’m in this situation:
R1 = customer router (customer AS)
R2/R3 = ISP (both in our AS)
Customer is in cooperation with us (ISP).
Totally two BGP sessions between two ISP routers and customer router.
ISP to customer advertise only default route (0.0.0.0/0).
Customer to ISP advertise his public prefix x.x.x.x/24 assigned from RIPE.
Customer wants ECMP (BGP multipath) bidirectionally.

Customer’s configured on his router (R1) ECMP for load balance outgoing traffic to both BGP peers:
router bgp xxxxxx
neighbor x.x.x.x remote-as xxxxxx
neighbor y.y.y.y remote-as xxxxxx
maximum-paths 2

What should configure ISP for ECMP (load balance incoming traffic from Internet to customer) on both routers (R2/R3)?

Otherwise it would work only one way, not bidirectionally.

Thanks for reply.
Zdenek

Hello Zdenek

In order to get all traffic from the Internet to internal devices to be balanced, R2 and R3 must advertise both routes as equally desirable to the Internet at large. This way both options will be viewed as equal cost paths allowing for the routing to be divided more or less equally across both routers.

A similar configuration can be found at this Cisco documentation. This example shows how BGP will be used to load balance between two customer routers to two ISP routers. But you can switch this around and look at the configs of the two customer routers from the point of view of the ISP.

I hope this has been helpful!

Laz

Hello,

Just a few remarks.

At eBGP Same AS example “R1 will will have paths” should be replaced with “R1 will have 2 paths”. R2 configuration also needs the mask for “network 192.168.23.0” under bgp 23.

At the conclusion there is a note “the hidden bgp bestpath asp-path multipath-relax command”.
I guess the command is bgp bestpath as-path multipath-relax.

Shouldn’t R1#show ip route bgp at the end of iBGP example also include the 192.168.123.0/24 network?

A (perhaps stupid) question would be if you could trick a router to bypass the as-path length also using the prepending mechanism.

Thank you,
Stefanita

Hi Stefanita,

Thanks for this, I just fixed these errors.

192.168.123.0/24 is a directly connected network for R1. It’s in the routing table, but as directly connected.

BGP multipath requires the same AS number and the same AS path length. With the bgp bestpath as-path multipath-relax command you tell BGP to ignore the AS number so that only the AS path length is left. If you end up with two options where one path has a longer AS path length then you could use prepending to fix this, making the two paths equal.

Rene

1 Like

My bad: the output is for show ip route & bgp. Since 192.168.123.0/24 is also directly connected it will not be displayed in show ip route bgp (it will be displayed in show ip route). Many thanks!

1 Like