BGP Multipath Scenario

BGP unlike other protocols doesn’t do load balance by default and installs a single best route in the routing table by default. Even in the BGP table you see a single best route.

But like other protocols in BGP we can use the ‘multipath’ command to install more than one route for a prefix in the routing table.


In this post we will use the topology diagram below and understand the configuration of BGP multipath.

In the above post we have customer running AS 100 and a service provider running on AS 200. R1 is the CE router which is dual homed with two PE routers of the service provider and running EBGP with them. Keeping everything on the default if we want to reach address from R1 we will have only a single best path installed on the routing table.

Outputs as below from R1:

R1#sh ip bgp summary

BGP router identifier, local AS number 100

BGP table version is 2, main routing table version 2

1 network entries using 144 bytes of memory

2 path entries using 160 bytes of memory

1/1 BGP path/bestpath attribute entries using 136 bytes of memory

1 BGP AS-PATH entries using 24 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP using 464 total bytes of memory

BGP activity 1/0 prefixes, 2/0 paths, scan interval 60 secs

Neighbor     V          AS       MsgRcvd     MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd        4          200      25                 24               2             0        0      00:19:10        1        4          200      23                 22               2             0        0       00:17:07        1

In the BGP table we see we are getting the route for R4 from both R2 and R3 but route from R3 is considered as the best under routing table due to BGP path selection criteria.

R1#sh ip bgp | b

*                               0 200 i

*>                                              0 200 I   #####Best Route######

R1#sh ip route | b

B [20/0] via, 00:14:16

In the above configuration only single link from R1 > R3 will be used to reach address.

Now let us suppose we want to use both paths R1>R2 and R1>R3 to reach, so we will make use of BGP multipath option to keep both the parallel paths in the routing table. In order for both the parallel paths to be installed in the BGP routing table we will need to make sure the following BGP attributes are kept same on both paths.

  • Weight
  • Local Preference
  • AS Path (both AS number and AS path length)
  • Origin code
  • MED
  • IGP metric

Multipath can be configured for three options:

  • iBGP Multipath: If two parallel paths exist in Ibgp.
  • eBGP Multipath: If two parallel paths exist in EBGP
  • eiBGP Multipath: If two parallel paths exist with a combination of EBGP and IBGP.

In our scenario we are getting two parallel paths from EBGP, hence we can use EBGP multipath in our configuration on R1 as below:

R1(config)#router bgp 100

R1(config-router)#maximum-paths 2

Now if we check we will be getting both the routes installed in the routing table of R1.

R1#sh ip bgp

BGP table version is 3, local router ID is

Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,

r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

x best-external, a additional-path, c RIB-compressed,

Origin codes: i – IGP, e – EGP, ? – incomplete

RPKI validation codes: V valid, I invalid, N Not found

Network                Next Hop   Metric   LocPrf   Weight   Path

*m          0                                         200 I ##‘m’ means multipath enabled #

*>                          0                                         200 i

R1#sh ip route is subnetted, 1 subnets

C is directly connected, Loopback0 is subnetted, 1 subnets

B [20/0] via, 00:01:36

                        [20/0] via, 00:01:36 is variably subnetted, 4 subnets, 2 masks

C is directly connected, FastEthernet0/0

L is directly connected, FastEthernet0/0

C is directly connected, FastEthernet1/0

L is directly connected, FastEthernet1/0

Hence we see route for on R1 is installed in the routing table from both R2 and R3.

Related- BGP disable-connected-check

Share this:

Related Posts

About The Author

Add Comment

Social Media Auto Publish Powered By :
Select your currency
USD United States (US) dollar