maximum load-balancing (OSPF view)

Function

The maximum load-balancing command sets the maximum number of equal-cost routes for load balancing.

The undo maximum load-balancing command restores the default setting.

By default, load balancing is supported. For details about the maximum number of equal-cost routes, see the parameter value range.

Format

maximum load-balancing number

undo maximum load-balancing

Parameters

Parameter Description Value
number

Specifies the maximum number of equal-cost routes.

The value is an integer ranging from 1 to 64.

Views

OSPF view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ospf write

Usage Guidelines

Usage Scenario

If a routing protocol discovers multiple routes with the same cost to one destination, they can carry out load balancing. The maximum load-balancing command sets the maximum number of equal-cost routes that can carry out load balancing. This optimizes route selection rules and meet traffic forwarding requirements on a complex network.

Configuration Impact

Packets will be load-balanced by multiple equal-cost routes to one destination.

Load balancing is performed either per-destination or per-packet. By default, packets are load-balanced per-destination.

The undo maximum load-balancing command restores the default equal-cost routes that are discovered by OSPF for load balancing.

Follow-up Procedure

If the number of equal-cost OSPF routes is greater than the value set using the maximum load-balancing command and specified routes need to be used for load balancing, run the nexthop ip-address weight value command to specify a high priority for the routes.

Precautions

To disable load balancing, set the value of number to 1.

Example

# Restore the default maximum number of equal-cost routes for load balancing.
<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] undo maximum load-balancing
# Set the maximum number of the equal-cost routes.
<HUAWEI> system-view
[~HUAWEI] ospf 100
[*HUAWEI-ospf-100] maximum load-balancing 2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >