maximum-link-cost

Function

The maximum-link-cost command sets the maximum cost for OSPF links.

The undo maximum-link-cost command restores the default value.

By default, the maximum cost of OSPF links is 65535.

Format

maximum-link-cost cost

undo maximum-link-cost [ cost ]

Parameters

Parameter Description Value
cost

Sets the maximum cost for OSPF links.

The value is an integer ranging from 1 to 65534.

Views

OSPF view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ospf write

Usage Guidelines

Usage Scenario

In an IGP-LDP synchronization scenario, when an LDP tunnel's next hop changes, a large number of entries need to be updated. If upstream and downstream forwarding entries reside on different boards, they may not be updated synchronously during traffic switchback. As a result, packet loss occurs if upstream forwarding entries are updated but downstream forwarding entries are not. To prevent packet loss, FRR forwarding entries can be created for the switchback path, and the link's primary/secondary status can be updated during traffic switchback. As defined in standard protocols, in an IGP-LDP synchronization scenario, if LDP is not in the fully operational state, OSPF needs to set the link cost to LSInfinity (65535). However, as defined in standard protocols, a link cannot participate in FRR route computation if its cost is 65535. To resolve this conflict in an IGP-LDP synchronization scenario, run the maximum-link-cost command to change the maximum cost for OSPF links.

This command also applies to stub-router and neighbor flapping suppression scenarios.

Example

# Set the maximum cost to 65534 for OSPF links.
<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] maximum-link-cost 65534
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >