< Home

Setting the Maximum Number of Equal-Cost Routes

If the destinations and costs of the multiple routes discovered by one routing protocol are the same, load balancing can be performed among these routes.

Context

The FW supports multi-route mode. In multi-route mode, multiple routes to the same destination can enjoy the same priority. If no other routes to the same destination enjoy higher priority, all the routes are accepted. The HASH algorithm is applied to select a route among others to transfer the packets based on the source and destination IP addresses of the packets. As a result, the load on the network is in a balance.

Setting the maximum number of equal-cost routes can restrict the number of equal-cost routes adding to the routing table.

Procedure

  1. Access the system view.

    system-view

  2. Access the OSPFv3 process view.

    ospfv3 [ process-id ]

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

    maximum load-balancing number

    When the number of equal-cost routes is greater than number specified in the maximum load-balancing command, valid routes are selected for load balancing based on the following criteria:

    1. Route preference: Routes with lower preferences are selected for load balancing. For details about route preference configuration, see 4.
    2. Interface index: If routes have the same priorities, routes with higher interface index values are selected for load balancing.
    3. Next hop IP address: If routes have the same priorities and interface index values, routes with larger IP address are selected for load balancing.

  4. (Optional) Configure the route preferences for load balancing.

    nexthop router-id interface-type interface-number weight value

    To specify valid routes for load balancing, run the nexthop command to set the route preference. Ensure that the preferences of valid routes to be used must be high.

    The smaller the weight value, the higher the preference of the route. The default weight value is 255, which indicates that load balancing is implemented regardless of the route preferences.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic