< Home

auto-cost enable

Function

The auto-cost enable command enables the system to calculate the cost of an interface based on the bandwidth of the interface automatically.

The undo auto-cost enable command disables the function.

By default, automatic calculation of the cost is disabled.

Format

auto-cost enable [ compatible ]

undo auto-cost enable

Parameters

Parameter Description Value
compatible

Specifies the IS-IS to calculate the cost of an interface based on the bandwidth of the interface automatically in compatible.

-

Views

IS-IS view

Default Level

2: Configuration level

Usage Guidelines

Configuration Impact

After this command is run, if the cost of an IS-IS interface is not set in the interface view and no cost is set in the IS-IS view, IS-IS topology view, or IS-IS IPv6 topology view, the system automatically calculates a cost for the interface.

If the cost style of the system is wide or wide-compatible, the system calculates the cost of each interface based on the following formula:

Interface cost = (Bandwidth-reference/Interface bandwidth) x 10.

If the cost style of the system is narrow, narrow-compatible or compatible, the cost of each interface is based on the following table.

Table 1 Relationship between the IS-IS interface cost and the bandwidth

Cost

Range of the Interface Bandwidth

60

Interface bandwidth =< 10 Mbit/s

50

10 Mbit/s < Interface bandwidth =< 100 Mbit/s

40

100 Mbit/s < Interface bandwidth =< 155 Mbit/s

30

155 Mbit/s < Interface bandwidth =< 622 Mbit/s

20

622 Mbit/s < Interface bandwidth =< 2.5 Gbit/s

10

2.5 Gbit/s < Interface bandwidth

Precautions

The auto-cost enable command cannot change the cost of the loopback interface.

The auto-cost enable command can be run on Eth-Trunk interfaces as same with on physical interfaces. If the command is run on an Eth-Trunk interface, the bandwidth of the Eth-Trunk interface is equal to the total bandwidth of all its member interfaces.

Example

# Enable the system to calculate the cost of IS-IS interface automatically.

<sysname> system-view
[sysname] isis 1
[sysname-isis-1] auto-cost enable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >