path-selection
Syntax
path-selection { (always-compare-med | cisco-non-deterministic | external-router-id); as-path-ignore; l2vpn-use-bgp-rules; med-plus-igp { igp-multiplier number; med-multiplier number; } }
Hierarchy Level
[edit logical-systems logical-system-name protocols bgp], [edit logical-systems logical-system-name routing-instances routing-instance-name protocols bgp], [edit protocols bgp], [edit routing-instances routing-instance-name protocols bgp]
Description
Configure BGP path selection.
Default
If the path-selection
statement is not included
in the configuration, only the multiple exit discriminators (MEDs)
of routes that have the same peer ASs are compared.
Options
always-compare-med |
Always compare MEDs whether or not the peer ASs of the compared routes are the same. Note:
We recommend that you configure the |
as-path-ignore |
In the best-path algorithm, skip the step that compares the autonomous system (AS) path lengths. By default, the best-path algorithm evaluates the length of the AS paths and prefers the route with the shortest AS path length. Note:
Starting with Junos OS Release 14.1R8, 14.2R7, 15.1R4, 15.1F6, and 16.1R1, the as-path-ignore option is supported for routing instances. |
cisco-non-deterministic |
Emulate the Cisco IOS default behavior. This mode
evaluates routes in the order that they are received and does not
group them according to their neighboring AS. With As an example, suppose you have three path advertisements for the 192.168.1.0 /24 route:
These advertisements are received in quick succession, within a second, in the order listed. Path 3 is received most recently, so the routing device compares it against path 2, the next most recent advertisement. The cost to the IBGP peer is better for path 2, so the routing device eliminates path 3 from contention. When comparing paths 1 and 2, the routing device prefers path 1 because it is received from an EBGP peer. This allows the routing device to install path 1 as the active path for the route. Note:
We do not recommend using this configuration option in your network. It is provided solely for interoperability to allow all routing devices in the network to make consistent route selections. |
external-router-id |
Compare the router ID between external BGP paths to determine the active path. |
igp-multiplier number |
The multiplier value for the IGP cost to a next-hop address. This option is useful for making the MED and IGP cost comparable.
|
l2vpn-use-bgp-rules |
Enable routers to use both the BGP path selection algorithm and the designated forwarder path selection algorithm when selecting the preferred path to each destination in a Layer 2 VPN or VPLS routing instance. The BGP path selection algorithm is used by all of the Provider routers participating in the routing instance. The designated forwarder path selection algorithm is used by the PE router participating in the routing instance.
|
med-multiplier number |
The multiplier value for the MED calculation. This option is useful for making the MED and IGP cost comparable.
|
med-plus-igp |
Add the IGP cost to the indirect next-hop destination to the MED before comparing MED values for path selection. This statement only affects best-path selection. It does not affect the advertised MED. |
Required Privilege Level
routing—To view this statement in the configuration.
routing-control—To add this statement to the configuration.
Release Information
Statement introduced before Junos OS Release 7.4.
med-plus-igp
option introduced in Junos OS Release 8.1.
as-path-ignore
and l2vpn-use-bgp-rules
options introduced in Junos OS Release 10.2.