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 remote-as 23
 neighbor remote-as 23
 maximum-paths 2
 no auto-summary

BGP Table:

R1#show ip bgp
    BGP table version is 2, local router ID is
    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
    *                           0 23 i
    *>                     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.


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 ?


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.


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

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:


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!


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 (
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.

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!



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” 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 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,

Hi Stefanita,

Thanks for this, I just fixed these errors. 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.



My bad: the output is for show ip route & bgp. Since 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

Hello Rene/Laz,
I have a design question and I am going to use the below topology as the reference.

As you see in this diagram, the firewall has two zones: orange zone and green zone. Everything is running EIGRP on both sides of the firewall. Now some kind of dynamic routing has to be run between core switches and the firewall so both sides of the firewall can see each other’s route. The limitation of the firewall is that it does not support EIGRP. Therefore, we have to pick one between OSPF and BGP. I was kind of leaning towards BGP.


  1. Would you please let me know what the best way would be to approach the routing design?
  2. If we decide to use BGP, how can we design this?


Hello Azm

For me, both OSPF and BGP would work in this scenario. However, I would probably choose OSPF for several reasons:

  1. If you were going to connect this topology to the Internet and require some sharing of BGP routes with your ISP directly, then BGP would be the better choice so you can influence both outgoing and incoming traffic (in cooperation with your ISP) and achieve load balancing and redundancy. However, you are not connecting to any other BGP AS’es, so these benefits of BGP are not applicable. Secondly, you want a routing protocol that will respond quickly to failures, and OSPF is definitely preferable to BGP.
  2. Another aspect that will affect your configuration is the type of HA you are creating. If you are creating an Active/Standby situation, then remember that the active ASA will always have the same IP addresses. In other words, of ASA1 is active and ASA2 is standby, and ASA1 fails, ASA2 will assume the IP addresses of ASA1 resulting in an uninterrupted flow of traffic. This means that all other devices only see (as far as routing information goes) a single device between the core devices and the router. So your routing design should assume only a single ASA device exists. For more information on how dynamic routing behaves when configured on an active/standby ASA arrangement, take a look at this Cisco Documentation. Now having said this, I’m not sure how useful dynamic routing would be in this situation since you only have a single choice of next hop IP address from both core A and core B towards the router at the bottom of the topology.
  3. Another issue that affects the design is how are Core A and Core B integrated? I assume (since you didn’t mention it) that there is no HSRP or similar protocol running between those two, so the ASA, for traffic destined upwards in the topology, would be load balanced between the two core devices using the routing protocol employed. So you must make sure that the costs of the routes are appropriate so that load balancing does indeed occur.
  4. Finally, if you were to employ BGP in this situation, you would probably follow the design in this lesson, where Cores A and B are in a single AS and the firewalls are also in a single AS. But remember, with HA, the topology as seen from the point of view of the cores will look like there is only one ASA, just like in the lesson.

I hope this helps you to further develop you topology and your implementation of what you need. Feel free to continue the conversation if there are still outstanding issues that have not been addressed, or if you have additional questions as a result of the discussion.

I hope this has been helpful!


Hello All,

We know that BGP only advertises the best-path route to other BGP peers regardless of the number of routes in the BGP Loc-RIB.

My questions are:

  • What’s the different with IGP protocols like EIGRP? Does EIGRP advertises all routes (best and non-best routes) to neighbors?
  • If BGP only advertises the best route, can we receive best routes from different neighbor to the same destination network and perform ECMP ?

Please advise.


Hello Luis

By default BGP will indeed only advertise the best route. Unlike BGP, IGP protocols such as EIGRP and OSPF function differently.

OSPF routers within a single area obtain a complete map of the whole network. This means that all alternative paths are advertised, so the LSDB will contain all of the possible routes to a particular destination within an OSPF area. Of these, only the route with the best metric will be put in the routing table. If there are two equal cost routes, then equal cost load balancing will be performed for up to four paths (by default, but this can be increased to up to 32). You can find out more about that at this lesson.

EIGRP on the other hand, do not advertise all possible routes to each other, and thus, unlike OSPF, each EIGRP router does not have a full picture of the network topology. There are rules that dictate which routes will be shared, and which will not. These have to do with the successor, feasible successor, and other paths that do not fulfil the feasibility condition. The routes that are advertised, are placed in the topology table, but only the best route is placed in the routing table.
More about these mechanisms can be found at this lesson. If more than one route to a destination has the same cost, all routes will be placed in the routing table, and EIGRP will perform equal cost load balancing. It can also be configured to perform unequal cost load balancing. More about these features at this lesson.

If you want to perform ECMP, you can do so using the multipath load sharing feature of BGP. You can find out more about this at the following lesson:

I hope this has been helpful!


Hello Rene,

Thanks for the wonderful explanation.

I wonder what type of load sharing algorithm does BGP use? Per packet, per flow. round robin?


Hello Rangaraj

The load balancing that takes place, whether OSPF, EIGRP, or BGP, is performed by CEF. CEF load balancing is configured on a per-packet round robin or on a per session (source and destination address pairs) basis. More information about the algorithms used by CEF for load balancing can be found at this Cisco documentation.

I hope this has been helpful!