isis cost (interface view)

Function

The isis cost command sets a link cost for an IS-IS interface.

The undo isis cost command restores the default link cost.

By default, the link cost of IS-IS interfaces is 10.

Format

isis cost cost [ level-1 | level-2 ]

isis process-id process-id cost cost [ level-1 | level-2 ]

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

undo isis process-id process-id cost [ cost ] [ level-1 | level-2 ]

Parameters

Parameter Description Value
cost cost

Specifies a link cost for the SPF calculation.

  • The value is an integer and varies with the cost type.
  • When the cost type is narrow, narrow-compatible, or compatible, the value ranges from 1 to 63
  • When the cost type is wide or wide-compatible, the value ranges from 1 to 16777214.
  • The value is maximum: Sets the link cost of an interface to 16777215.

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 is used for TE information transmission, not for route calculation.

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

level-1

Sets the link cost value for the Level-1 interface.

-

level-2

Sets the link cost value for the Level-2 interface.

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.

-

process-id process-id

Specifies the IID of an IS-IS multi-instance process.

The value is an integer ranging from 1 to 4294967295.

Views

100GE interface view, 10GE interface view, 25GE sub-interface view, 25GE interface view, 400GE interface view, 40GE interface view, 50GE sub-interface view, 50GE interface view, Eth-Trunk interface view, FlexE interface view, GE optical interface view, GE electrical interface view, GMPLS-UNI interface view, Global VE sub-interface view, Loopback interface view, Tunnel interface view, VBDIF interface view, VE sub-interface view, VE interface view, VLANIF interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
isis write

Usage Guidelines

Usage Scenario

On a large-scale network, there are multiple valid routes destined for the same destination in most cases. IS-IS calculates an optimal route based on the SPF algorithm and transmits traffic over it. This feature may cause the following problems:

  • All traffic is transmitted over the optimal route, causing load imbalance.
  • If the optimal route fails, traffic transmitted over it will be discarded.

    To address this problem, run the isis cost command to configure different link costs for different interfaces so that traffic can be transmitted over different physical links.

Prerequisites

IS-IS has been enabled on the interface using the isis enable command in the interface view.

Configuration Impact

If the link cost is changed, routes of the entire network are recalculated, and the traffic forwarding path changes accordingly.

Precautions

For the IGP shortcut-capable TE tunnel interfaces, the link cost is the value set using the mpls te igp metric command.

If the isis cost and circuit-cost commands are both run, the value set using the isis cost command takes effect.

Example

# Set the link cost of the Level-2 link on GigabitEthernet 0/1/0 to 5.
<HUAWEI> system-view
[~HUAWEI] isis 1
[*HUAWEI-isis-1] quit
[*HUAWEI] interface GigabitEthernet 0/1/0
[*HUAWEI-GigabitEthernet0/1/0] isis enable
[*HUAWEI-GigabitEthernet0/1/0] isis cost 5 level-2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >