Specifications
Send document comments to nexus3k-docfeedback@cisco.com.
5-5
Cisco Nexus 3000 Series NX-OS Unicast Routing Configuration Guide, Release 5.0(3)U2(2)
OL-25782-02
Chapter 5 Configuring Basic BGP
Information About Basic BGP
Step 1—Comparing Pairs of Paths
This first step in the BGP best-path algorithm compares two paths to determine which path is better. The
following sequence describes the basic steps that Cisco NX-OS uses to compare two paths to determine
the better path:
1. Cisco NX-OS chooses a valid path for comparison. (For example, a path that has an unreachable
next hop is not valid.)
2. Cisco NX-OS chooses the path with the highest weight.
3. Cisco NX-OS chooses the path with the highest local preference.
4. If one of the paths is locally originated, Cisco NX-OS chooses that path.
5. Cisco NX-OS chooses the path with the shorter AS path.
Note When calculating the length of the AS path, Cisco NX-OS ignores confederation segments, and
counts AS sets as 1. See the “AS Confederations” section on page 6-4 for more information.
6. Cisco NX-OS chooses the path with the lower origin. Interior Gateway Protocol (IGP) is considered
lower than EGP.
7. Cisco NX-OS chooses the path with the lower multi- exit discriminator (MED).
You can configure a number of options that affect whether or not this step is performed. In general,
Cisco NX-OS compares the MED of both paths if the paths were received from peers in the same
autonomous system; otherwise, Cisco NX-OS skips the MED comparison.
You can configure Cisco NX-OS to always perform the best-path algorithm MED comparison,
regardless of the peer autonomous system in the paths. See the “Tuning the Best-Path Algorithm”
section on page 6-9 for more information. Otherwise, Cisco NX-OS will perform a MED
comparison that depends on the AS-path attributes of the two paths being compared:
a. If a path has no AS path or the AS path starts with an AS_SET, then the path is internal, and
Cisco NX-OS compares the MED to other internal paths.
b. If the AS path starts with an AS_SEQUENCE, then the peer autonomous system is the first AS
number in the sequence, and Cisco NX-OS compares the MED to other paths that have the same
peer autonomous system.
c. If the AS path contains only confederation segments or starts with confederation segments
followed by an AS_SET, the path is internal and Cisco NX-OS compares the MED to other
internal paths.
d. If the AS path starts with confederation segments followed by an AS_SEQUENCE, then the
peer autonomous system is the first AS number in the AS_SEQUENCE, and Cisco NX-OS
compares the MED to other paths that have the same peer autonomous system.
Note If Cisco NX-OS receives no MED attribute with the path, then Cisco NX-OS considers the
MED to be 0 unless you configure the best-path algorithm to set a missing MED to the
highest possible value. See the “Tuning the Best-Path Algorithm” section on page 6-9 for
more information.
e. If the nondeterministic MED comparison feature is enabled, the best path algorithm uses the
Cisco IOS style of MED comparison. See the “Tuning the Best-Path Algorithm” section on
page 6-9 for more information.