< Home

circuit-cost

Function

The circuit-cost command sets the link cost for all IS-IS interfaces during SPF calculation.

The undo circuit-cost command deletes the configured link cost of all IS-IS interfaces.

By default, no link cost is set for IS-IS interfaces.

Format

circuit-cost { cost | maximum } [ level-1 | level-2 ]

undo circuit-cost [ cost | maximum ] [ level-1 | level-2 ]

Parameters

Parameter Description Value
cost Specifies the interface cost used in SPF calculation. If the IS-IS cost style is wide or wide-compatible, the cost of imported routes ranges from 1 to 1677721416777214; otherwise, the cost ranges from 1 to 63.
maximum Sets the link cost of IS-IS interfaces to 16777215.
NOTE:

You can configure this parameter only when the IS-IS cost style is wide or wide-compatible. After the interface cost is set to 16777215, the neighbor TLV generated on the link can only be used to transmit TE information but cannot be used for route calculation.

-
level-1 Specifies the link cost for all Level-1 interfaces. If no level is specified, the link cost is set for Level-1-2 interfaces. -
level-2 Specifies the link cost for all Level-2 interfaces. If no level is specified, the link cost is set for Level-1-2 interfaces. -

Views

IS-IS view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

On a large network, there are often multiple valid routes to the same destination. IS-IS can use the SPF algorithm to calculate the optimal route to forward traffic. This may cause the following problems:
  • All traffic is forwarded along the optimal path, resulting in load unbalance.
  • If the optimal path is intermittently disconnected, traffic is still forwarded along the optimal path, resulting in traffic loss.

To solve the preceding problems, run the circuit-cost command to change the cost of all IS-IS interfaces so that traffic can be forwarded along different physical links.

Precautions

The isis cost command takes precedence over the circuit-cost command. The circuit-cost command cannot change the cost of loopback interfaces.

Changing the link cost of interfaces will cause routes of the entire network to be recalculated and change the forwarding path of traffic.

Example

# Set the default cost of all Level-1-2 interfaces to 30.

<HUAWEI> system-view
[HUAWEI] isis
[HUAWEI-isis-1] circuit-cost 30
# Set the link cost of all IS-IS interfaces to 16777215.
<HUAWEI> system-view
[HUAWEI] isis 1
[HUAWEI-isis-1] circuit-cost maximum
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >