< Home

cost-style

Function

The cost-style command sets the cost type of a route that is received or sent by the IS-IS device.

The undo cost-style command restores the default cost type of a route that is received or sent by the IS-IS device.

By default, the cost type of the IS-IS route is narrow.

Format

cost-style { narrow | wide | wide-compatible }

cost-style { compatible | narrow-compatible } [ relax-spf-limit ]

undo cost-style

Parameters

Parameter Description Value
narrow Indicates that the cost type of the route received and sent is narrow. -
wide Indicates that the cost type of the route received and sent is wide. -
wide-compatible Indicates that the route with the cost of narrow or wide type can be received, but only the route with the cost of wide type can be sent. -
compatible Indicates the route with the cost of narrow or wide type can be received and sent. -
narrow-compatible Indicates that the route with the cost of wide or narrow type can be received, but only the route with the cost of narrow type can be sent. -
relax-spf-limit Permits to receive the route whose cost is greater than 1023.
  • When relax-spf-limit is not specified, the following situations occur:

    • If the cost of a route is smaller than or equal to 1023 and the link costs of all interfaces through which the route passes are smaller than or equal to 63:

      The route is received, and the cost of the route equals the total link cost of all interfaces through which the route passes.

    • If the cost of a route is smaller than or equal to 1023 and the link costs of all interfaces through which the route passes are greater than 63:

      The router can learn only direct routes of its other interfaces and routes imported by the interface. The route is received, and the cost of the route equals the total link cost of all interfaces through which the route passes. The route will be discarded by the interfaces it is going to pass through. Subsequent routes forwarded by the interface are discarded.

    • If the cost of a route is greater than 1023:

      The router can receive only the routes to the network segment where the interface with the link cost smaller than 1023 resides. The router learns the route.

  • When relax-spf-limit is specified, the following situation occurs:

    There is no limit on link costs of interfaces or the cost of a route. The route is received, and the cost of the route equals the total link cost of all interfaces through which the route passes.

-

When the cost type is narrow, the cost of a route ranges from 1 to 63; when the cost type is wide, the cost of a route ranges from 1 to 16777215.

Views

IS-IS view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

By default, the cost type of IS-IS routes is narrow, which means that only routes with the cost ranging from 1 to 63 can be received and sent. LSPs carrying TE information when IS-IS is applied to MPLS TE or LSPs carrying tag information to be filtered by a routing policy cannot be flooded when the cost type is narrow. The cost-style command can be used to change the cost type of IS-IS routes so that they can be transmitted successfully.

To implement extended IS-IS functions, setting the cost type of IS-IS routes to wide is recommended.

Prerequisites

An IS-IS process has been enabled using the isis command.

Configuration Impact

When the cost type of a route is changed from wide to narrow, transmission of the route may be interrupted.

Precautions

If you want to change the cost type of IS-IS routes, running the command while configuring basic IS-IS functions is recommended. If the cost type of IS-IS routes is changed during network operation, the IS-IS process is restarted and neighbors are disconnected.

Example

# Set IS-IS device to receive the packets whose cost type is narrow or wide, but to send the packet whose cost type is narrow.

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