The circuit-cost command sets a link cost for all IS-IS interfaces.
The undo circuit-cost command restores the default value.
By default, the link cost for IS-IS loopback interfaces is 0, and the default link cost for other interfaces 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.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 topology view, it takes effect only in the current topology.<HUAWEI> system-view [~HUAWEI] ip topology multicast [*HUAWEI] isis 1 [*HUAWEI-isis-1] cost-style wide [*HUAWEI-isis-1] topology multicast topology-id multicast [*HUAWEI-isis-1-topology-multicast] circuit-cost 30