cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2019
Views
0
Helpful
4
Replies

bgp multipath

Kashish_Patel
Level 2
Level 2

Why does a bgp router (configured with multipath) advertise only one best path to its peers, even though it knows multiple paths to reach a destination and also installs them in its routing table? Can somebody help me understand this?

2 Accepted Solutions

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hi Kashish,

There are two reasons for this. First, BGP was designed to handle a tremendous amount of routing information and to work very efficiently. This also includes advertising as little information to peers as possible while not compromising reachability - and that can be done with advertising just a single, best path. In fact, BGP's best path algorithm as described in RFC 4271 does not consider the possibility of a multipath - it seems to be a later Cisco extension.

Second, and more technically, in BGP, advertising the same network (i.e. prefix/mask) twice with a different set of attributes is considered an update of the previous advertisement. If you wanted to advertise two or more paths to the same destination, it would look like this:

192.0.2.0/24, next hop NH1, other BGP attributes...

192.0.2.0/24, next hop NH2, other BGP attributes...

Now if you advertise these two paths, a receiving router first learns about 192.0.2.0/24 via NH1, and then, receiving the second known route via NH2, it would consider it an update of the previous route via NH1 - so it would remove the path via NH1 and replace it with the path via NH2 - clearly not achieving what you want.

There are solutions to this, such as the use of route reflectors and multiple VRFs, or the BGP Add-Path extension. Basic BGP, however, is not designed for this.

Best regards,

Peter

View solution in original post

In a MPLS VPN scenario if a customer is multihomed to two PEs, load sharing can be achieved by using different Route Distinguisher (RD) for that VRF on each PE. The VPNv4 prefix is made up of 64 bit RD and 32 bit IPv4 address. This makes the prefix unique. If the RD is the same on both PEs then there can only be one best path because it would be the same prefix.

Like Peter described there are newer features like add path that enables BGP to send multiple paths to be used. Peter also described that BGP was designed to be a stable and higly scaling protocol. Announcing more than one path will lead to increased usage of RAM, RIB and FIB so these are factors that must be considered before enabling such features.

There is also a feature called diverse path that can be used on Route Reflectors (RR). Description from Cisco:

BGP Diverse Path Using a Diverse-Path Route Reflector

The BGP Diverse Path Using a Diverse-Path Route Reflector feature overcomes the lack of path diversity in an AS containing RRs. This feature is meant to provide path diversity within an AS, within a single cluster only. That is, an RR is allowed to advertise the diverse path to its client peers only.

For each RR in the AS, a shadow RR is added to distribute the second best path, also known as the diverse path. Figure 2 shows the shadow RR for RR2. The shadow RR improves path diversity because PE3 can now learn both P1 (from RR1/RR2) and learn P2 from the shadow RR

Most of these features are designed for RR scenarios. In an iBGP full mesh, optimal forwarding is easier to achieve.

Daniel Dib
CCIE #37149

Please rate helpful posts.

Daniel Dib
CCIE #37149
CCDE #20160011

Please rate helpful posts.

View solution in original post

4 Replies 4

Peter Paluch
Cisco Employee
Cisco Employee

Hi Kashish,

There are two reasons for this. First, BGP was designed to handle a tremendous amount of routing information and to work very efficiently. This also includes advertising as little information to peers as possible while not compromising reachability - and that can be done with advertising just a single, best path. In fact, BGP's best path algorithm as described in RFC 4271 does not consider the possibility of a multipath - it seems to be a later Cisco extension.

Second, and more technically, in BGP, advertising the same network (i.e. prefix/mask) twice with a different set of attributes is considered an update of the previous advertisement. If you wanted to advertise two or more paths to the same destination, it would look like this:

192.0.2.0/24, next hop NH1, other BGP attributes...

192.0.2.0/24, next hop NH2, other BGP attributes...

Now if you advertise these two paths, a receiving router first learns about 192.0.2.0/24 via NH1, and then, receiving the second known route via NH2, it would consider it an update of the previous route via NH1 - so it would remove the path via NH1 and replace it with the path via NH2 - clearly not achieving what you want.

There are solutions to this, such as the use of route reflectors and multiple VRFs, or the BGP Add-Path extension. Basic BGP, however, is not designed for this.

Best regards,

Peter

Hi Peter,

Thanks for replying. This helps.

In the last sentence, are you suggesting that using RRs, multiple VRFs, or BGP Add-Path extension, BGP router can actually propagate multiple paths to its peers?

Thanks,

Kashish

In a MPLS VPN scenario if a customer is multihomed to two PEs, load sharing can be achieved by using different Route Distinguisher (RD) for that VRF on each PE. The VPNv4 prefix is made up of 64 bit RD and 32 bit IPv4 address. This makes the prefix unique. If the RD is the same on both PEs then there can only be one best path because it would be the same prefix.

Like Peter described there are newer features like add path that enables BGP to send multiple paths to be used. Peter also described that BGP was designed to be a stable and higly scaling protocol. Announcing more than one path will lead to increased usage of RAM, RIB and FIB so these are factors that must be considered before enabling such features.

There is also a feature called diverse path that can be used on Route Reflectors (RR). Description from Cisco:

BGP Diverse Path Using a Diverse-Path Route Reflector

The BGP Diverse Path Using a Diverse-Path Route Reflector feature overcomes the lack of path diversity in an AS containing RRs. This feature is meant to provide path diversity within an AS, within a single cluster only. That is, an RR is allowed to advertise the diverse path to its client peers only.

For each RR in the AS, a shadow RR is added to distribute the second best path, also known as the diverse path. Figure 2 shows the shadow RR for RR2. The shadow RR improves path diversity because PE3 can now learn both P1 (from RR1/RR2) and learn P2 from the shadow RR

Most of these features are designed for RR scenarios. In an iBGP full mesh, optimal forwarding is easier to achieve.

Daniel Dib
CCIE #37149

Please rate helpful posts.

Daniel Dib
CCIE #37149
CCDE #20160011

Please rate helpful posts.

Thanks Peter and Daniel.

Rated your answers as 5..Thank you!