BGP load sharing and unequal cost load sharing

On Cisco routers, by default the BGP protocol will not do load-sharing – and even less unequal cost load-sharing – across multiple links, for traffic to the same eBGP destination with different AS-path. Let’s see how we can change this.

We can configure the command: “maximum-paths n”, but it only works if the weight, local-pref. and AS-path attributes are the same across the different uplinks.

So how can we do load sharing if we are multihomed to different ASes? In that case, we must use the BGP command: “bgp bestpath as-path multipath-relax”.

VIRL lab topology

Let’s lab this! Here is my VIRL topology:

AS-4 is our multihomed company. They have two BGP upstreams: AS-2 and AS-3.

AS-1 in blue represent the Internet. 1.1.1.1 here is “the Internet”.

AS-5 is a remote site or a branch-office, they are using a different AS number for some reason. AS-4 is providing Internet access to them.

Note: in this topology, AS-2 and AS-3 are sending the “full” BGP table to AS-4 – even the full table here is only 4 prefixes – and also the default-route. This is to demonstrate that this command works with the default route and with a specific prefix.

Without “multipath-relax”

First, let’s see this topology without the command bgp bestpath as-path multipath-relax.

You can see for the default and 1.1.1.1/32 prefixes we have multipath.

Then, you can also see that AS-1 is doing transit between AS-2 and AS-3 in both directions (prefixes 2.2.2.2/32 and 3.3.3.3/32) and in that cast the shortest as-path is still the best path, without multipath.

bgp bestpath as-path ignore

You cannot have the same result with the command ” bgp bestpath as-path ignore” because this command skip the as-path length comparison yes, but you still receive the prefix from two different AS and this is not multipath.

Furthermore, if you try to enable “bgp bestpath as-path ignore” in conjunction with “bgp bestpath multipath-relax as-path” you have this nice message from Cisco IOS:

The Author

Jerome Tissieres is a multi-vendor certified network systems engineer with over 20 years of successful experience in building and operating enterprise, services providers and data-center IP networks.Jerome has also been chosen to be a 2019 Cisco Champion!

Pin It on Pinterest

Notice: This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the privacy policy.
By closing this banner, clicking a link or continuing to browse otherwise, you agree to the use of cookies.Ok