circuit-cost (IS-IS topology view)

Function

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.

Format

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

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

Parameters

Parameter Description Value
cost

Specifies a link cost for IS-IS interfaces.

The value is an integer.

  • The value ranges from 1 to 63 when the cost type is narrow, narrow-compatible, or compatible.
  • The value ranges from 1 to 16777214 when the cost type is wide or wide-compatible.

    The cost type can be configured using the cost-style command.

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.

-

Views

IS-IS topology view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
isis write

Usage Guidelines

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.

Example

# Set the default cost of all interfaces to 30 for the topology named multicast.
<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
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >