< Home

cost-style

Function

The cost-style command sets the cost style of routes received and sent by an IS-IS device.

The undo cost-style command restores the default cost style of routes received and sent by an IS-IS device.

By default, the cost style of routes received and sent by an IS-IS device is narrow.

Format

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

undo cost-style

Parameters

Parameter Description Value
narrow Configures an IS-IS device to receive and send only routes with cost style narrow. When the cost style is narrow, the cost of routes ranges from 1 to 63. -
wide Configures an IS-IS device to receive and send only routes with cost style wide. When the cost style is wide, the cost of routes ranges from 1 to 16777215. -
wide-compatible Configures an IS-IS device to receive routes with cost style narrow or wide and sent only routes with cost style wide. -
compatible Configures an IS-IS device to receive and send routes with cost style narrow or wide. -
narrow-compatible Configures an IS-IS device to receive routes with cost style narrow or wide and sent only routes with cost style narrow. -
relax-spf-limit Configures an IS-IS device to receive routes with cost higher than 1023.

If this parameter is specified, there is no restriction on the link costs of interfaces or route costs. The cost of a received route is the actual cost.

If this parameter is not specified, the following situations occur:
  • If the cost of a route is smaller than or equal to 1023, and the link cost of each interface through which the route passes is smaller than or equal to 63:

    The cost of the route is the sum of link costs 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 certain interfaces through which the route passes are larger than 63:

    An IS-IS device can learn only the routes imported by the interfaces and direct routes of the network segment where the interfaces reside. The costs of these routes are the actual cost.

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

    The device can receive only the routes of the network segment where the interface with link cost smaller than 1023 resides. If the cost of a route is larger than 1023, the cost is calculated as 1023.

-

Views

IS-IS view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

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

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

Precautions

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

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

Example

# Configure an IS-IS device to send only the packets with cost style narrow and to receive the packets with cost style narrow or wide.

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