The isis cost command sets the link cost value of an IS-IS interface.
The undo isis cost command restores the default link cost value of an IS-IS interface.
By default, the link cost value of an IS-IS interface is 10.
isis cost { cost | maximum } [ level-1 | level-2 ]
undo isis cost [ cost | maximum ] [ level-1 | level-2 ]
Parameter | Description | Value |
---|---|---|
cost | Specifies the link cost value of an interface. | The value is an integer that varies according to the
cost style.
|
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 value of a Level-1 interface. If the interface level is not specified, link cost values of Level-1 and Level-2 interfaces are set. | - |
level-2 | Specifies the link cost value of a Level-2 interface. If the interface level is not specified, link cost values of Level-1 and Level-2 interfaces are set. | - |
Usage Scenario
All traffic is transmitted over the optimal route, causing load imbalance.
If the optimal route is faulty, traffic will get lost.
To solve the preceding problems, run the isis cost command to set a link cost for 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.
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
The priority of the circuit-cost command is lower than that of the isis cost command.
# Set the Level-2 link cost of VLANIF100 to 5.
<HUAWEI> system-view [HUAWEI] isis [HUAWEI-isis-1] network-entity 01.0000.0000.0001.00 [HUAWEI-isis-1] quit [HUAWEI] interface vlanif 100 [HUAWEI-Vlanif100] isis enable 1 [HUAWEI-Vlanif100] isis cost 5 level-2
# Set the Level-2 link cost of GE0/0/1 to 5.
<HUAWEI> system-view [HUAWEI] isis [HUAWEI-isis-1] network-entity 01.0000.0000.0001.00 [HUAWEI-isis-1] quit [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] isis enable 1 [HUAWEI-GigabitEthernet0/0/1] isis cost 5 level-2