The circuit-cost command sets a link cost for all IS-IS interfaces.
The undo circuit-cost command restores the default value.
The ipv6 circuit-cost command sets an IPv6 cost for the Shortest Path First (SPF) calculation, which is valid for all Level-1 and Level-2 IPv6 interfaces.
The undo ipv6 circuit-cost command deletes the configured cost.
By default, the link cost for IS-IS loopback interfaces is 0, and the default link cost for other interfaces is 10.
By default, the configured cost is applicable to all Level-1 and Level-2 IPv6 interfaces. The default cost is 10.
Parameter | Description | Value |
---|---|---|
cost |
Specifies a link cost for IS-IS interfaces. |
The value is an integer.
|
level-1 |
Sets a link cost for all Level-1 interfaces. |
- |
level-2 |
Sets a link cost for all Level-2 interfaces. If Level-1 or Level-2 is not specified in the command, the link cost is set for Level-1 and Level-2 interfaces 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. The cost of an IPv6 interface takes precedence over the global IPv6 cost. Before using the ipv6 circuit-cost command in an IS-IS process, enable IPv6 in the IS-IS process. For details, see the isis ipv6 enable command.Prerequisites
An IS-IS process has been created using the isis 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
For the IGP shortcut-enabled TE tunnel interface, the link cost is the value configured using the mpls te igp metric command.
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. If the command is run in the IS-IS view, it takes effect only in the base topology.