BGP Multipath load sharing iBGP and eBGP

In my routers ( on Gns3) I saw that I have not the

bgp bestpath as-path multipath-relax command:

R1(config-router)#bgp bestpath ?
  aigp              if both paths doesn't have aigp ignore on bestpath
  compare-routerid  Compare router-id for identical EBGP paths
  cost-community    cost community
  igp-metric        igp metric
  med               MED attribute


Hello Giovanni

It could be an IOS version issue. According to this Cisco command line reference documentation, this command was introduced in IOS XR Release 3.7.2. What version are you using?

I hope this has been helpful!


Hi Rene,

can you help me the difference between hot potato routing and cold potato routing ? what are the advantages ?

Hello Ravi

These terms are used to refer to the ways in which ISPs handle transient traffic. It describes how traffic is handed off from one ISP to another. In this context, we’re not talking about your local ISP that provides you with connectivity, but those ISPs (Tier 1 and Tier 2) that handle backbone Internet traffic. For more info on the Tier architecture of the Internet, take a look at this post:

Remember that these ISPs have multiple connections to other ISPs at various areas within their networks. When a packet is received, and it must be handed off to another ISP, it can be handed off at one of many different connection points.

Hot potato routing is the practice where ISP A will take a packet and route it to the closest available exit point of its own network to ISP B (or C, or D, or …), even if that is not the most efficient way to route it. In such a case, ISP A is essentially relieved of any further responsibility to the packet, and it is now “ISP B’s problem”. This policy is the most common that can be seen in networks, and is based on the peering agreements between ISP A and ISP B (and other ISPs). ISPs will keep track of the traffic ratio (the ratio of traffic flowing in one direction to that flowing in the other direction between peers), and if it is fairly even, then hot potato routing is acceptable and fair, because the ISPs will evenly share the burden of such exchanged traffic.

Cold potato routing is the (more expensive) practice of keeping traffic within an ISPs network for a larger part of the journey, by routing the traffic to the exit point from the ISP’s network that is closest to the final destination. This allows ISPs to provide higher quality network services to their customers. Content providers prefer the use of ISPs that offer cold potato routing because their payloads and the quality of the services they provide depend upon the timely delivery of traffic.

I hope this has been helpful!


1 Like

Hi Rene,
How can we achieve unequal load-balancing in BGP? If we have two upstream providers, is there a way to do 60-40 loadbalancing?

Hello Vishal

BGP is capable of achieving unequal cost load balancing for both iBGP and eBGP. In order to do this, you must first configure the maximum-path value to be 2 or greater, as shown in the lesson. Now, if you have two paths with equal weight, local pref, AS_PATH length, Origin, and MED, then you will achieve equal cost load balancing.

To achieve unequal cost load balancing, you must use the additional feature called dmzlink-bw. This feature will enable and configure BGP to distribute traffic proportionally to the bandwidths of the links.

More information about this command, the syntax, and how it is to be used can be found at the following Cisco documentation.

I hope this has been helpful!


What are advantages and disadvantages of ECMP IN BGP or common?

Hello Naman

You can find out a lot more details about multi path routing for BGP in the following lessons:

Now the advantages of this are quite obvious. That you are making much more efficient use of the bandwidth that is available to you, and you are providing for redundant paths in the event that one path fails.

As for disadvantages, I don’t think there are any other than the fact that you should be careful how you configure it. For eBGP for example, you must make sure that you are using a loopback as the BGP source, otherwise, if the physical interface that is being used as the BGP source fails, your ECMP will fail too, even if you have an available link that is up between the BGP peers. See the eBGP Multi-Hop lesson for more info on that.

In addition, you can choose to create a different BGP session over each link, by applying multiple neighbor commands under BGP, one for each link. If you do this, BGP will initially share two copies of each prefix, but eventually, it will come down to tie-breaker rules to rule one out. In this case, you’ll have to make sure that both paths are enabled using the aforementioned lessons so that you don’t have only one link being used, and the other be idle.

So the disadvantages have more to do with ensuring that the configuration is correct, as complexity increases somewhat…

I hope this has been helpful!


Hello Laz and Rene,
Thank you for all the great info. I have a real work issue that brought me to this lesson, and while it gave me a good start, I am still a little unsure on how to proceed.
My scenario is rather close to the ‘Two paths to one AS scenario’ except that each of my paths are their own router in HSRP. So I have a datacenter with two ISR’s with a separate L3VPN MPLS circuit on each. Thus far, they have been active/standby, but I would like to be active/active. I feel like I could easily replicate the scenario in the lesson by putting both circuits onto one ISR, but then I loose the device redundancy.
Does having the second router make this much more complicated? adding a simple diagram of the setup:

Some additional thoughts. The standby routers do have their own ASN which is then prepended twice so that R1 is preferred. Would it be possible to set the ASN on both routers to be the same and then use MHSRP to load balance between the two routers? I assume this would require the ISP to engage in ECMP?

Hello Nathan

From my understanding, you are running HSRP on the Site-facing interfaces of R1 and R2, correct?

(From the diagram it looks like you may be running it on the MPLS-facing interfaces, something that would not work since you would have two routers with different ASNs with interfaces on the same subnet. In such a case, to what ASN does the virtual IP address belong?)

The first thing to keep in mind is that from each site, how the outgoing traffic is routed is completely in your control. You can set up HSRP to load balance outgoing traffic between the two routers by making R1 active in some subnets, and R2 active in others. You can then route traffic out via either R1 or R2. You don’t actually have to change any BGP or MPLS configuration for that.

However, if you want to load balance incoming traffic, you’ll have to take a look at the 1.1.2 Different AS section in the lesson. Because your R1 and R2 routers are in different AS’es, this scenario matches up better with what you want to do. You will have to involve the ISP in that they will have to implement BGP multipath across their MPLS network. More in this can be found here:

I hope this has been helpful!


1 Like

So if R2 and R3 advertise the same prefix to R1 and we enable this feature on it , can R1 guarantee symmetric return ? Or are we still going to have asymmetric routing

Hello Nicolas

The configurations created in this lesson only affect routing in the direction from R1 to the destination. It does not affect the return traffic. In order to ensure that the return traffic behaves the way you want it to, you must modify the routing on the other routers as well.

Note that the specific configurations in this lesson result in equal-cost multipath routing. How packets are distributed across the multiple paths will also depend upon the configuration of CEF.

Take a look at the following two NetworkLessons notes for more information:

I hope this has been helpful!


is there any case the rtr version not to be supported ? i am using Version 15.9(3)M2 .

Hello Konstantinos

The maximum-paths command has been around since IOS version 12.2 so I don’t think you’ll have a problem with your particular version. You may find that the syntax has changed a bit, and looks like this:

maximum-paths eibgp number-of-paths
maximum-paths ibgp number-of-paths

where the first option enables multipath for both iBGP and eBGP, while the second enables it only for iBGP. Take a look at the following command reference for more info:

I hope this has been helpful!


Is it possible to do loadbalance when we have Dual-Homed to One ISP Through Multiple Local Routers? is multipath should work?

Hello Rahul

The answer is yes, however we must understand that load balancing using BGP is very different for incoming and for outgoing traffic, regardless of the edge topology of your network.

For outgoing traffic, you control everything at the edge, so you are able to do whatever you want. Using multipath load sharing will indeed perform load balancing even if you have a dual homed arrangement to one ISP through multiple local routers. That’s the easy part.

The challenge is ensuring that your incoming traffic is load balanced. Technically, it can be done, however, you are not in control in this case. It is the ISP that’s in control. You can influence how incoming traffic is managed using various BGP attributes, but ultimately, it is the ISP that decides because they can overrule any attributes you may send them. In such a case, you should discuss with the ISP your requirements so that the edge of your network will operate as you desire.

Technically speaking, with the topology you describe, it is possible to use multipath to achieve load balancing.

I hope this has been helpful!


Thanks Laz for the review and reply, my requirement is as we have two links to one ISP with multiple routers, currently one link is active for outgoing traffic and we need to utilize the second link as well for the same outgoing traffic, like a round robin load balancing, the outgoing traffic i am referring is to internet.

Few LAN segment needs to utilize both the links at the same time to connect the internet, we are receiving the default route from both the links.While checking how to utilize both the link simultaneously, i checked the multipath option.

There is firewall in between our LAN segment and edge router which will decide where to route the internet traffic to which router, now is the primary router.The edge router are logically connected via iBGP as well

Hello Rahul

Since we’re talking about outgoing traffic, it should not be a problem. Just one more clarification. You say you have two links to the same ISP with multiple routers. Are the multiple routers yours or the ISP’s? In other words, do you have a single edge router that belongs to you that connects to two ISP routers? Or do you have two routers that belong to you that connect to two ISP routers? I am assuming the first case…

So your topology looks something like this right?:


And you are running iBGP between the edge router and the two ISP routers, correct? Then yes, you can configure BGP load balancing to load balance traffic across these two ISP connections. Can you clarify these questions further before we get to the conclusive answer to your question? Thanks!

I hope this has been helpful!


I tried to use loopbacks to peer which made the next hop the same for both routes. I noticed that Rene mentioned that the next hops must be different in order to do BGP multipath. Is there a way to do load balancing here without l3 lags.

Hello Justin

Indeed in an implementation like yours, for ECMP to take place using multipath load sharing fro BGP, it is a requirement that the next hop IP be different for the destination.

If the next hop address for the two paths is the same, ECMP will not occur, even if all the BGP path attributes are the same. This is because one of the key factors that BGP considers when deciding to enable ECMP is that the next hop for the paths must be different.

In most implementations, including Cisco’s, the next hop of the route is one of the key components of the route itself. Two routes with the same next hop are considered to be the same route. So, in this case, BGP won’t do ECMP over these routes.

One option is to make the peering between the routers take place on the physical interfaces themselves. This of course will introduce a point of failure that the use of the loopback interface resolves. The other option is not to use BGP for load balancing. Remember, BGP was not really designed to be very good at such load balancing. Even though the paths are equal, the actual traffic distribution among the links may not be perfectly equal due to the way the router performs load balancing.

Alternatives to using BGP for load balancing include link aggregation, the use of multiple VRFs in the routers, or using policy-based routing.

Ultimately, depending on your broader topology, it may not be the best choice to link two routers together with multiple links. It may be that the best-case scenario is to redesign the network to eliminate such a setup in a production network.

I hope this has been helpful!