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.
Parameter | Description | Value |
---|---|---|
cost cost |
Specifies a link cost for the SPF calculation. |
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. |
- |
topology topology-name |
Specifies the name of an IPv4 topology instance. If this parameter is not configured, the link cost is set for the IPv4 base topology. |
The value is a string of 1 to 31 case-sensitive characters without spaces. The value must start with a letter (a to z or A to Z, case sensitive) and can contain numbers, hyphens (-), or underlines (_). When double quotation marks are used around the string, spaces are allowed in the string. |
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, Global VE sub-interface view, Loopback interface view, VE sub-interface view, VE interface view
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:
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.<HUAWEI> system-view [~HUAWEI] ip topology red [*HUAWEI] isis 1 [*HUAWEI-isis-1] cost-style wide [*HUAWEI-isis-1] topology red topology-id 10 [*HUAWEI-isis-1-topology-red] quit [*HUAWEI-isis-1] quit [*HUAWEI] interface GigabitEthernet 0/1/0 [*HUAWEI-GigabitEthernet0/1/0] isis enable [*HUAWEI-GigabitEthernet0/1/0] ip topology red enable [*HUAWEI-GigabitEthernet0/1/0] isis topology red [*HUAWEI-GigabitEthernet0/1/0] isis topology red cost 5 level-2