Course contents

Module 2: Scaling iBGPLesson 2.3 (3 of 3 in this module)6 of 11 in the Advanced BGP course

BGP multipath

Load sharing over several equal BGP paths.

Advanced · 15 min read

You'll learn to enable eBGP and iBGP multipath, say when two paths count as equal, and verify two installed next hops.

One best path, several forwarding paths

The best-path algorithm picks a single winner. Sometimes the runner-up is just as good and the router could use both. BGP multipath lets the routing table hold several equal paths so CEF shares traffic across them.

Single path and multipath
Single path and multipathNormally BGP installs one best path. With multipath it installs several equal ones and shares traffic.DefaultOne best pathOne next hop installedMultipathEqual paths installedTraffic shared across themvs

On small screens, swipe sideways or focus the diagram and use the arrow keys.

The best path is still chosen for advertisement. Multipath only widens forwarding.
BGP multipath: two equal paths, both installed
BGP multipath: two equal paths, both installedR1 learns 203.0.113.0/24 from ISP A and ISP B with identical attributes. With maximum-paths 2, it installs both next hops and shares traffic.R1AS 64500ISP A192.0.2.1ISP B192.0.2.5203.0.113.0/24R1 routing table: 203.0.113.0/24 via 192.0.2.1 and via 192.0.2.5

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Paths must tie on weight, local preference, AS path length, origin, MED and IGP metric. Different AS numbers need a looser rule.
Two equal paths installed for load sharing
Two equal paths installed for load sharingR1 learns the prefix 203.0.113.0/24 from ISP A at 192.0.2.1 and ISP B at 192.0.2.5. Both paths tie on every attribute used to compare them. With maximum-paths set to 2, R1 installs both next hops in the routing table and shares traffic between them. Without it, R1 installs only the best path.R1maximum-paths 2ISP A 192.0.2.1ISP B 192.0.2.5203.0.113.0/24Both next hops installed in the routing table

On small screens, swipe sideways or focus the diagram and use the arrow keys.

Paths must tie on weight, local preference, AS-path length, origin, MED and IGP cost. Sharing is per flow, so one large transfer still uses a single path.

When paths are equal

For multipath, paths must tie on weight, local preference, AS path length, origin, MED and, for iBGP paths, the IGP metric to the next hop. By default they must also come from the same neighbouring AS. For eBGP paths to two different ISPs, add the relax option.

What must be equal
What must be equalPaths must tie on the early best-path steps to be used together.Weight and local preferenceEqualAS path length and originEqualMEDEqual, from the same neighbouring ASNeighbouring ASSame by default, relaxed with multipath-relaxIGP metric to the next hopEqual for iBGP multipath

On small screens, swipe sideways or focus the diagram and use the arrow keys.

If any step differs, the lower one is not installed.
router bgp 64500 bgp bestpath as-path multipath-relax address-family ipv4 unicast maximum-paths 2

R1. maximum-paths 2 allows two eBGP paths. multipath-relax lets them come from different neighbouring ASes. Use maximum-paths ibgp 2 for iBGP paths.

Illustrative Cisco IOS XE output written for this lesson, not a router capture
R1#show ip route 203.0.113.0
Routing entry for 203.0.113.0/24
  Known via "bgp 64500", distance 20, metric 0
  Routing Descriptor Blocks:
  * 192.0.2.1, from 192.0.2.1, 00:02:10 ago
      Route metric is 0, traffic share count is 1
    192.0.2.5, from 192.0.2.5, 00:02:10 ago
      Route metric is 0, traffic share count is 1
Two next hops are installed with equal share. If only one appears, check each attribute on both paths with show ip bgp 203.0.113.0, because a single difference disqualifies a path.

Technical reference: Cisco IOS XE BGP configuration guide. Output above is illustrative.

Configuring and checking multipath

The maximum number of installed paths is set under the address family with maximum-paths for eBGP and maximum-paths ibgp for iBGP. After the change, the routing table shows several next hops for the prefix and traffic is shared per flow.

Enable and verify multipath
Enable and verify multipathSet the limit, relax the AS rule if needed, then check the routing table.maximum-paths 2under the familymultipath-relaxif ISPs differshow ip routetwo next hopsTesttraffic uses both

On small screens, swipe sideways or focus the diagram and use the arrow keys.

The BGP table still shows one best path marked with greater-than.

Risks to plan for

Multipath changes how traffic reaches destinations. Two providers can have different delay and capacity, so a flow can see uneven results. Return traffic still follows the other network, so the load may not be balanced in both directions.

Check your understanding

Predict · scenario 1

Paths from ISP A and ISP B tie on every attribute. maximum-paths 2 is set but only one is installed. What is missing?

Predict · scenario 2

What does a router advertise to a neighbour when multipath is on?

Predict · scenario 3

You set local preference 200 on one path. Does multipath still use both?

FAQ

Is there still one best path?
Yes. BGP still selects one best path and advertises only that to neighbours. Multipath adds extra equal paths to the routing table for forwarding.
How is traffic shared?
By the router's normal load-sharing method, usually per flow with CEF, so one flow stays on one path.
Why would two ISPs not qualify by default?
Default multipath requires the paths to come from the same neighbouring AS. Paths from different ASes need bgp bestpath as-path multipath-relax.