The circuit-cost command sets the link cost for all IS-IS interfaces except Loopback.
The undo circuit-cost command restores the default link cost value for all IS-IS interfaces except Loopback.
By default, the link cost value for IS-IS Loopback interfaces is 0, and the default link cost value for other interfaces is 10.
circuit-cost { cost | maximum } [ level-1 | level-2 ]
undo circuit-cost [ cost | maximum ] [ level-1 | level-2 ]
| Parameter | Description | Value |
|---|---|---|
| cost | Specifies the link cost for IS-IS interfaces. |
The value is an integer. The value range is from 1 to 63 when the cost type is narrow, narrow-compatible, or compatible. The value range is from 1 to 16777214 when the cost type is wide or wide-compatible. 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 only for TE information transmission but not for route calculation. |
- |
| level-1 | Sets the link cost value for all the interfaces of Level-1. |
- |
| level-2 | Sets the link cost value for all the interfaces of Level-2. If Level-1 or Level-2 is not specified in the command, the link cost of the Level-1 and Level-2 interfaces is set by default. |
- |
Usage Scenario
On large networks, there may be multiple valid routes to the same destination. IS-IS uses the SPF algorithm to calculate an optimal route and transmits traffic over it, which brings the problem that all traffic is transmitted over the optimal route, causing load imbalance.
To solve the preceding problems, run the circuit-cost command to set a link cost for interfaces so that traffic can be transmitted over different physical links.
Prerequisites
An IS-IS process has been enabled using the isis [ process-id ] command.
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.
Precautions
The priority of the circuit-cost command is lower than that of the isis cost command.
To allow the link cost of IS-IS routes to reflect the actual link cost, configuring a proper link cost for an interface is recommended.