< Home

maximum load-balancing (OSPF)

Function

The maximum load-balancing command enables the maximum number of equal-cost routes to a destination in the routing table.

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

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 8, in milliseconds. The default value is 8.

Views

OSPF view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

If the destinations and costs of the multiple routes discovered by one routing protocol are the same, load balancing can be implemented among the routes. You can use the maximum load-balancing command to configure the maximum number of equal-cost routes for load balancing, to optimize routing selecting policies, and, therefore, to meet the requirements of complex networks.

Configuration Impact

After you use the maximum load-balancing command to configure the maximum number of equal-cost routes for load balancing, packets are sent to the same destination through several equal-cost routes in load-balancing mode.

The available options are Flow-by-Flow Balancing and Packet-by-packet Balancing. By default, IP packets are sent by Flow-by-Flow Balancing.

Follow-up Procedure

When the number of equal-cost routes on the live network is greater than that specified in the maximum load-balancing command, valid routes are randomly selected for load balancing. To specify valid routes for load balancing, run the nexthop ip-address weight value command to set the route preference. Ensure that the preferences of valid routes to be used must be high.

Precautions

To cancel load balancing, you can set the number parameter to 1.

Example

# Set the maximum number of the equal-cost routes.

<sysname> system-view
[sysname] ospf 100
[sysname-ospf-100] maximum load-balancing 2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >