preference (Routing Options)
Syntax preference {
metric-value;
<type metric_type>
}
Hierarchy Level [edit logical-systems logical-system-name routing-instances routing-instance-name
routing-options (aggregate | generate | static) (defaults | route)],
[edit logical-systems logical-system-name routing-instances routing-instance-name
routing-options rib routing-table-name (aggregate | generate | static) (defaults | route)],
[edit logical-systems logical-system-name routing-options (aggregate | generate | static)
(defaults | route)],
[edit logical-systems logical-system-name routing-options rib routing-table-name (aggregate |
generate | static) (defaults | route)],
[edit routing-instances routing-instance-name routing-options (aggregate | generate | static)
(defaults | route)],
[edit routing-instances routing-instance-name routing-options rib routing-table-name
(aggregate | generate | static) (defaults | route)],
[edit routing-options (aggregate | generate | static) (defaults | route)],
[edit routing-options rib routing-table-name (aggregate | generate | static) (defaults | route)]
Release Information Statement introduced before Junos OS Release 7.4.
Statement introduced in Junos OS Release 9.0 for EX Series switches.
Statement introduced in Junos OS Release 11.3 for the QFX Series.
Statement introduced in Junos OS Release 12.3 for ACX Series routers.
Statement introduced in Junos OS Release 14.1X53-D20 for the OCX Series.
Description Preference value for a static, aggregate, or generated route. You also can specify a
secondary preference value, as well as color values, which are even finer-grained
preference values.
You can specify a primary route preference (by including the preference statement in
the configuration), and a secondary preference that is used as a tiebreaker (by including
the preference2 statement). You can also mark route preferences with additional route
tiebreaker information by specifying a color and a tiebreaker color (by including the color
and color2 statements in the configuration).
If the Junos OS routing table contains a dynamic route to a destination that has a better
(lower) preference value than the static, aggregate, or generated route, the dynamic
route is chosen as the active route and is installed in the forwarding table.
Options metric_value—The metric value for an aggregate, a generated, or a static route to determine
the best route among multiple routes to a destination
Range: 0 through 4,294,967,295 (2
32
– 1)
Default: 5 (for static routes), 130 (for aggregate and generated routes)
type metric_type—(Optional) External metric type for routes exported by OSPF. When
routes are exported to OSPF, type 1 routes are advertised in type 1 externals, and
Copyright © 2017, Juniper Networks, Inc.1674
ACX Series Universal Access Router Configuration Guide