The preference command sets a priority for IS-IS.
The undo preference command restores the default value.
By default, the priority of IS-IS is 15.
Parameter | Description | Value |
---|---|---|
route-policy route-policy-name |
Specifies the name of a route-policy. |
The name is a string of 1 to 200 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
route-filter route-filter-name |
Specifies the name of route filter policy. |
The value is a string of 1 to 200 case-sensitive characters, spaces not supported. If parameters are included in the referenced route-filter, specify values for them in the format of (var1, var2, ...var8) behind the route-filter name. A maximum of eight parameters can be specified, and each value ranges from 1 to 200 characters. |
preference |
Specifies a priority of the IS-IS protocol. The smaller the value, the higher the priority. |
The value is an integer that ranges from 1 to 255. |
Usage Scenario
Multiple dynamic routing protocols may be run on a device, and routes discovered by various routing protocols to the same destination may exist. In this case, you can use the preference command to set a default priority for each routing protocol. If different protocols have routes to the same destination, the protocol with the highest priority is selected for IP packet forwarding.
The preference command sets a priority for IS-IS or some IS-IS routes. The preference command is used in the following three ways:Prerequisites
An IS-IS process has been created and the IS-IS view has been displayed using the isis command.
Precautions
If an apply clause is configured for a route-policy using the apply preference command, the priorities are used as follows:
route-policy abc permit node 1
if-match cost 20 apply preference 50 <h1 id="id-1"></h1>isis 1
preference 30 route-policy abc If the apply preference 50 command is not run for the route-policy named abc, the priority of all routes is set to 30. Several dynamic protocols can run on a device. In this case, set a priority for each protocol. When routes to the same destination learned from different protocols are available, the one with the highest priority is selected.