(Optional) Configuring a Cost for IS-IS Interfaces (IPv6)

Configuring the IS-IS interface costs can control IS-IS route selection.

Context

The link cost of an IPv6 IS-IS interface can be an interface cost, global cost, or automatically calculated cost. They take effect in descending order.

  • The interface cost takes effect only on a specified interface.

  • The global cost takes effect only on all interfaces.

  • The automatically calculated cost is a cost automatically calculated based on the interface bandwidth.

The default cost of an IPv6 IS-IS interface is 10, and the default cost style is narrow.

Procedure

  • Configure the IS-IS cost type.
    1. Run system-view

      The system view is displayed.

    2. Run isis [ process-id ]

      The IS-IS view is displayed.

    3. Run cost-style { narrow | wide | wide-compatible | { narrow-compatible | compatible } [ relax-spf-limit ] }

      The IS-IS cost type is configured.

      The cost range of an interface and the cost range of routes that the interface receives vary with the cost style.

      • If the cost type is narrow, the cost of an interface ranges from 1 to 63. The maximum cost of routes that the interface receives is 1023.

      • If the cost style is narrow-compatible or compatible, the cost of an interface ranges from 1 to 63. The cost of routes that the interface receives is related to the parameter relax-spf-limit.

        • If relax-spf-limit is not specified, the route cost is determined by the following rules:

          If the cost of the route is not greater than 1023 and the link cost of every interface through which the route passes is less than or equal to 63, the local device accepts the actual cost of the route.

          If the cost of the route is not greater than 1023, but the link cost of an interface through which the route passes is greater than 63, the device can learn only the routes to the network segment where the interface resides and the routes imported by the interface. The local device considers the cost of the route as the actual one and accepts the route but discards subsequent routes forwarded by the interface.

          If the cost of the route is greater than 1023, the device can learn only the routes to the interface on which the link cost of the route exceeds 1023 for the first time. The link cost of each interface through which the route passes before the route reaches this interface is not greater than 63. The local device can learn routes to the network segment where the interface resides and the routes imported by the interface. The local device considers the cost of the routes as 1023 and accept them but discards subsequent routes forwarded by the interface.

        • If relax-spf-limit is specified, the route cost is determined by the following rules:

          There is no limit on link costs of interfaces or route costs. The local device considers the cost of each route as the actual one and accepts the routes.

      • If the cost style is wide-compatible or wide, the cost of the interface ranges from 1 to 16777214 or maximum (16777215). When the cost is maximum, the neighbor TLV with cost 16777215 generated on the link is used for route calculation but for the transmission of TE information. The maximum cost of a received route is 0xFFFFFFFF.

    4. Run commit

      The configuration is committed.

  • Configure the cost of an IS-IS interface.
    1. Run system-view

      The system view is displayed.

    2. Run interface interface-type interface-number

      The interface view is displayed.

    3. Run isis ipv6 [ topology topology-name ] cost cost-value [ level-1 | level-2 ]

      The cost of the IS-IS interface is configured.

    4. Run commit

      The configuration is committed.

  • Configure the global IS-IS cost.
    1. Run system-view

      The system view is displayed.

    2. Run isis [ process-id ]

      The IS-IS view is displayed.

    3. Run ipv6 circuit-cost { cost } [ level-1 | level-2 ]

      A global IS-IS cost is configured.

      You can run this command to change the costs of all interfaces at a time.

    4. Run commit

      The configuration is committed.

  • Enable IS-IS to automatically calculate interface costs.
    1. Run system-view

      The system view is displayed.

    2. Run isis [ process-id ]

      The IS-IS view is displayed.

    3. Run ipv6 bandwidth-reference value

      The reference value of the bandwidth is configured.

    4. Run ipv6 auto-cost enable [ compatible ]

      IS-IS is enabled to automatically calculate the interface cost.

      • If the cost style of the system is wide or wide-compatible, when ipv6 auto-cost enable command is configured, Interface cost = (Bandwidth-reference/Interface bandwidth) x 10, and when ipv6 auto-cost enable compatible command is configured, Interface cost = (Bandwidth-reference/Interface bandwidth).

        If the interface cost calculated through this formula is greater than 16777214, 16777214 is used as the interface cost for route calculation. That is, the interface cost will never be greater than 16777214.

        The ipv6 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.

      • If the cost-style is narrow, narrow-compatible, or compatible, the cost of each interface is determined by the interface bandwidth range. Table 1 lists the interface costs corresponding to different interface bandwidth ranges.

        Table 1 Mapping between IS-IS interface costs and interface bandwidth

        Cost

        Bandwidth Range

        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

        Interface bandwidth > 2.5 Gbit/s

      To change the cost of a loopback interface, run the isis ipv6 cost command only in the loopback interface view.

    5. Run commit

      The configuration is committed.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >