[an error occurred while processing this directive][an error occurred while processing this directive]



path-selection {(always-compare-med | cisco-non-deterministic | external-router-id);as-path-ignore;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]

Release Information

Statement introduced before JUNOS Release 7.4.

Statement introduced in JUNOS Release 9.0 for EX Series switches.

med-plus-igp option introduced in JUNOS Release 8.1.

as-path-ignore option introduced in JUNOS Release 10.2.


Configure BGP path selection.


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.


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 always-compare-med option.

as-path-ignore—Skip the third step of the of the algorithm that determines the active route. By default, the third step of the algorithm evaluates the length of an AS path.

Note: The as-path-ignore statement is not supported with routing instances.

cisco-non-deterministic—Configure routing table path selection so that it is performed using the same nondeterministic behavior as the Cisco IOS software. The active path is always first. All inactive, but eligible, paths follow the active path and are maintained in the order in which they were received, with the most recent path first. Ineligible paths remain at the end of the list.

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.

Range: 1 through 1000
Default: None

med-multiplier number—The multiplier value for the MED calculation.

Range: 1 through 1000
Default: None

med-plus-igp—Add the IGP cost to the next-hop destination to the MED before comparing MED values for path selection.

Required Privilege Level

routing—To view this statement in the configuration.

routing-control—To add this statement to the configuration.

Published: 2010-04-14

[an error occurred while processing this directive]