Implementing BGP
1 The paths are partitioned into groups such that within each group the MED can be compared among all
paths. The same rules as in
can be compared between any two paths. Normally, this comparison results in one group for each neighbor
AS. If the bgp bestpath med always command is configured, then there is just one group containing all
the paths.
2 The best path in each group is determined. Determining the best path is achieved by iterating through all
paths in the group and keeping track of the best one seen so far. Each path is compared with the best-so-far,
and if it is better, it becomes the new best-so-far and is compared with the next path in the group.
3 A set of paths is formed containing the best path selected from each group in Step 2. The overall best path
is selected from this set of paths, by iterating through them as in Step 2.
Best Path Change Suppression
The third part of the implementation is to determine whether the best-path change can be suppressed or
not—whether the new best path should be used, or continue using the existing best path. The existing best
path can continue to be used if the new one is identical to the point at which the best-path selection algorithm
becomes arbitrary (if the router-id is the same). Continuing to use the existing best path can avoid churn in
the network.
Note
This suppression behavior does not comply with the IETF Networking Working Group
draft-ietf-idr-bgp4-24.txt document, but is specified in the IETF Networking Working Group
draft-ietf-idr-avoid-transition-00.txt document.
The suppression behavior can be turned off by configuring the bgp bestpath compare-routerid command.
If this command is configured, the new best path is always preferred to the existing one.
Otherwise, the following steps are used to determine whether the best-path change can be suppressed:
1 If the existing best path is no longer valid, the change cannot be suppressed.
2 If either the existing or new best paths were received from internal (or confederation) peers or were locally
generated (for example, by redistribution), then the change cannot be suppressed. That is, suppression is
possible only if both paths were received from external peers.
3 If the paths were received from the same peer (the paths would have the same router-id), the change cannot
be suppressed. The router ID is calculated using rules in
4 If the paths have different weights, local preferences, origins, or IGP metrics to their next hops, then the
change cannot be suppressed. Note that all these values are calculated using the rules in
of Paths, on page
5 If the paths have different-length AS paths and the bgp bestpath as-path ignore command is not configured,
then the change cannot be suppressed. Again, the AS path length is calculated using the rules in
Pairs of Paths, on page
6 If the MED of the paths can be compared and the MEDs are different, then the change cannot be suppressed.
The decision as to whether the MEDs can be compared is exactly the same as the rules in
of Paths, on page
7 If all path parameters in Step 1 through Step 6 do not apply, the change can be suppressed.
OL-30423-03
Comparing Pairs of Paths, on page 39
39.
39.
39, as is the calculation of the MED value.
Cisco ASR 9000 Series Aggregation Services Router Routing Configuration Guide, Release 5.1.x
BGP Best Path Algorithm
are used to determine whether MED
Comparing Pairs of Paths, on page
39.
Comparing Pairs
Comparing
Comparing Pairs
41