Configuration Guide User guide
1344 FastIron Configuration Guide
53-1002494-02
BGP4 overview
How BGP4 selects a path for a route
When multiple paths for the same route are known to a BGP4 router, the router uses the following
algorithm to weigh the paths and determine the optimal path for the route. The optimal path
depends on various parameters, which can be modified. (Refer to “Optional BGP4 configuration
tasks” on page 1365.)
1. Is the next hop accessible though an Interior Gateway Protocol (IGP) route? If not, ignore the
route.
NOTE
The device does not use the default route to resolve BGP4 next hop. Also refer to “Enabling
next-hop recursion” on page 1371.
2. Use the path with the largest weight.
3. If the weights are the same, prefer the route with the largest local preference.
4. If the routes have the same local preference, prefer the route that was originated locally (by
this BGP4 Layer 3 switch).
5. If the local preferences are the same, prefer the route with the shortest AS-path. An AS-SET
counts as 1. A confederation path length, if present, is not counted as part of the path length.
6. If the AS-path lengths are the same, prefer the route with the lowest origin type. From low to
high, route origin types are valued as follows:
• IGP is lowest
• EGP is higher than IGP but lower than INCOMPLETE
• INCOMPLETE is highest
7. If the routes have the same origin type, prefer the route with the lowest MED. For a definition of
MED, refer to “Configuring the Layer 3 switch to always compare Multi-Exit Discriminators
(MEDs)” on page 1377.
BGP4 compares the MEDs of two otherwise equivalent paths if and only if the routes were
learned from the same neighboring AS. This behavior is called deterministic MED.
Deterministic MED is always enabled and cannot be disabled. In addition, you can enable the
Layer 3 switch to always compare the MEDs, regardless of the AS information in the paths. To
enable this comparison, enter the always-compare-med command at the BGP4 configuration
level of the CLI. This option is disabled by default.
NOTE
By default, value 0 (most favorable) is used in MED comparison when the MED attribute is not
present. The default MED comparison results in the Layer 3 switch favoring the route paths
that are missing their MEDs. You can use the med-missing-as-worst command to make the
Layer 3 switch regard a BGP route with a missing MED attribute as the least favorable route,
when comparing the MEDs of the routes.
NOTE
MED comparison is not performed for internal routes originated within the local AS or
confederation.