The apply preference command sets the preference for routes.
The undo apply preference command cancels the configuration.
By default, the preferences of routes are not set.
| Parameter | Description | Value |
|---|---|---|
| preference | Specifies the route preference. | The value is an integer ranging from 1 to 255. The smaller the value is, the higher the preference is. |
Usage Scenario
If a route satisfies the filter condition specified by the if-match clause, you can run the apply preference command to change the preference of the route to participate in route selection. Then, when different protocols discover multiple routes to the same destination, the route discovered by the protocol with a higher preference is selected as a valid route to forward packets.
Prerequisites
The apply preference command can be used only after the route-policy command is used.
Configuration Impact
After a route matches a route-policy, you can change the preference of the route.