Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

preference (Routing Options)

Syntax

(preference | preference2 | color | color2) preference <type 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.

Description

Preference value for a static, aggregate, or generated route. You also can specify a secondary preference value (preference2), as well as colors, which are even finer-grained preference values (color and color2).

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

preference—Preference value. A lower number indicates a more preferred route.

Range: 0 through 4,294,967,295 (232 – 1)

Default: 5 (for static routes), 130 (for aggregate and generated routes)

type type—(Optional) Type of route.

Range: 1 through 16

Required Privilege Level

routing—To view this statement in the configuration.

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

Published: 2013-08-15