The isis cost command sets the IPv4 link cost of an IS-IS interface.
The undo isis cost command restores the default configuration.
By default, the IPv4 link cost of an IS-IS interface is 10.
isis cost { cost | maximum } [ level-1 | level-2 ]
undo isis cost { cost | maximum } [ level-1 | level-2 ]
| Parameter | Description | Value |
|---|---|---|
| cost | Specifies the link cost used for the SPF calculation. |
The value is an integer which varies with the cost type.
The cost type can be configured using the cost-style command. |
| maximum | Sets the link cost of an interface to 16777215. NOTE:
The maximum parameter can be configured only when the cost-style of IS-IS is wide or wide-compatible. The neighbor TLV generated after the cost of an interface is set to 16777215 can be used for TE information transmission but not for route calculation. |
- |
| level-1 | Sets the link cost of Level-1 interfaces. |
- |
| level-2 | Sets the link cost of Level-2 interfaces. If neither Level-1 or Level-2 is specified, the link cost is configured for both Level-1 and Level-2 interfaces. |
- |
Ethernet interface view, Ethernet sub-interface view, Eth-Trunk interface view, Eth-Trunk sub-interface view, Tunnel interface view, Loopback interface view, Dialer interface view, VLANIF interface view, Virtual-Template interface view
Usage Scenario
IS-IS uses the SPF algorithm to calculate an optimal route and transmits traffic over it. If the bandwidth of the link over which the optimal route runs is too low or the link is unstable, network resources may be wasted or traffic may be lost. In this situation, you can run the isis cost command to change the link cost so that traffic is forwarded along a desired route, which improves bandwidth utilization and network reliability.
Prerequisites
IS-IS has been enabled on the interface using the isis enable command in the interface view.
Configuration Impact
If the link cost of an interface is changed, routes will be re-calculated on the whole network, causing the changes in traffic forwarding paths. Therefore, configuring the link cost during network planning is recommended.
Precautions
The priority of the circuit-cost command is lower than that of the isis cost command.
# Set the link cost of GigabitEthernet0/0/0 on the Level-2 link to 5.
<sysname> system-view
[sysname] interface GigabitEthernet 0/0/0
[sysname-GigabitEthernet0/0/0] isis cost 5 level-2
<sysname> system-view
[sysname] interface GigabitEthernet 0/0/0
[sysname-GigabitEthernet0/0/0] isis cost maximum