The apply preference command sets the action for changing the preference of routes in a routing policy.
The undo apply preference command restores the default setting.
By default, the action for changing the preference of routes is not set in a routing policy.
Parameter | Description | Value |
---|---|---|
preference | Specifies the route precedence. Route sharing and route selection are difficult because multiple routing protocols can run on the device at the same time; therefore, a default preference needs to be specified for each routing protocol. When different protocols discover multiple routes to the same destination, the route discovered by the protocol with a higher preference is selected to forward IP packets. The smaller the preference value, the higher the preference. | The value is an integer ranging from 1 to 255. |
Usage Scenario
To change the preference of routes for selecting the optimal route, you can apply a routing policy containing the apply preference command.
Prerequisites
The apply preference command can be used only after the route-policy command is used.
Precautions
When a routing policy takes effect, it affects route selection.