The BGP Additional Paths feature is implemented by adding a path identifier to each path in the NLRI. The path identifier
(ID) can be considered as something similar to a route distinguisher (RD) in VPNs, except that a path ID can apply to any
address family. Path IDs are unique to a peering session and are generated for each network. The path identifier is used to
prevent a route announcement from implicitly withdrawing the previous one. The Additional Paths feature allows the advertisement
of more paths, in addition to the bestpath. The Additional Paths feature allows the advertisement of multiple paths for the
same prefix, without the new paths implicitly replacing any previous paths.
The BGP Additional Paths feature requires the user to take three general steps:
1. Specify whether the device can send, receive, or send and receive additional paths. This is done at the address family
level or the neighbor level, and is controlled by either the
bgp additional-paths {send [receive] |
receive} command or the
neighbor additional-paths {send [receive] |
receive} command, respectively. During session establishment, two BGP neighbors negotiate the Additional Path capabilities (whether
they can send and/or receive) between them.
2. Select a set or sets of candidate paths for advertisement by specifying selection criteria (using the
bgp additional-paths select command).
3. Advertise for a neighbor a set or sets of additional paths from the candidate paths marked (using the
neighbor advertise additional-paths command).
To send or receive additional paths, the Additional Path capability must be negotiated. If it isn't negotiated, even if the
selection criteria are such that more than the bestpath is marked and the neighbor is configured to advertise the marked paths,
the selections would be useless because without the capability negotiated, only the bestpath can be sent.
Configuring BGP to send or receive additional paths triggers negotiation of additional path capability with the device's peers.
Neighbors that have negotiated the capability will be grouped together in an update group (if other update group policies
allow), and in a separate update group from those peers that have not negotiated the capability. Therefore, additional path
capability causes the neighbor's update group membership to be recalculated.
Additional Path Selection
There are three path selection (path marking) policies, and they are not mutually exclusive. They are specified per address
family, using the
bgp additional-paths select command. They are:
-
best 2 or
best 3 (best 2 means the bestpath and 2nd best path; the 2nd best path is the one computed by eliminating best-path from the best-computation
algorithm. Similarly,
best 3 means the bestpath, 2nd best path, and 3rd best path; the 3rd best path is the one computed by eliminating bestpath and 2nd
best path from the best-computation algorithm.)
-
group-best (calculates the group-best for prefixes during bestpath calculation; described further below)
-
all (all paths with unique next hops are eligible for selection)
Definition of the group-best Selection
The
group-best keyword is part of the following commands:
-
advertise additional-paths
-
bgp additional-paths select
-
match additional-paths advertise-set
-
neighbor advertise additional-paths
The
group-best is the set of paths that are the best paths from the paths of the same AS. For example, suppose there are three autonomous
systems: AS 100, 200, and 300. Paths p101, p102, and p103 are from AS 100; p201, p202, and p203 are from AS200; and p301,
p302, and p303 are from AS300. If we run the BGP bestpath algorithm on the paths from each AS, the algorithm will select one
bestpath from each set of paths from that AS. Assuming p101 is the best from AS100, p201 is the best from AS200, and p301
is the best from AS300, then the
group-best is the set of p101, p201, and p301.
Advertise a Subset of the Paths Selected
Take care when you select a set of paths but want to advertise a different set of paths. If the set of paths you want to advertise
is not a subset of the selected paths, then you will not advertise the paths you want advertised.
The following example configures the additional paths selected to be the group-best and all selections. However, the paths
configured to be advertised to the neighbor are the best 3 paths. Because the selection and advertise policy are not the same,
the subsequent message is displayed. In these cases, only the bestpath is advertised.
Device(config)# router bgp 100
Device(config-router)# address-family ipv4
Device(config-router-af)# bgp additional-paths send receive
Device(config-router-af)# bgp additional-paths select group-best all
Device(config-router-af)# neighbor 192.168.2.2 advertise additional-paths best 3
% BGP: AF level 'bgp additional-paths select' more restrictive than advertising policy. This is a reminder that AF level additional-path select commands are needed.