< Home

Configuring BGP4+ Load Balancing

Configuring BGP4+ load balancing better utilizes network resources and reduces network congestion.

Context

On large networks, there may be multiple valid routes to the same destination. BGP, however, advertises only the optimal route to its peers. This may result in unbalanced traffic on different routes.

Either of the following methods can be used to address the problem of unbalanced traffic:
  • Use BGP routing policies to allow traffic to be balanced. For example, use a routing policy to modify the Local_Pref, AS_Path, Origin, and Multi_Exit Discriminator (MED) attributes of BGP routes to direct traffic to different forwarding paths for load balancing.

  • Use multiple paths for load balancing. In this method, multiple equal-cost routes need to be configured for traffic load balancing.

    Equal-cost BGP routes can be generated for traffic load balancing only when the first 9 route attributes described in "Principles of Route Selection" are the same, and the AS_Path attributes are also the same.

Procedure

  1. Access the system view.

    system-view

  2. Access the BGP view.

    bgp { as-number-plain | as-number-dot }

  3. Access the BGP IPv6 unicast address family view.

    ipv6-family unicast

  4. Set the number of BGP4+ routes to be used for load balancing.

    maximum load-balancing [ ebgp | ibgp ] number [ ecmp-nexthop-changed ]

    By default, the number of BGP4+ routes to be used for load balancing is 1, meaning that load balancing is not implemented.

    • ebgp indicates that load balancing is implemented only among EBGP routes.

    • ibgp indicates that load balancing is implemented only among IBGP routes.

    • If neither ebgp nor ibgp is specified, both EBGP and IBGP routes participate in load balancing, and the number of EBGP routes to be used for load balancing is the same as the number of IBGP routes to be used for load balancing.

    If you run the maximum load-balancing number command, the device changes the next hop addresses of the routes to be advertised to a local address no matter whether the routes are used for load balancing.

    If you run the maximum load-balancing [ ebgp | ibgp ] number command, the device does not change the next hop addresses of the routes to be advertised to a local address no matter whether the routes are used for load balancing.

    If you run the maximum load-balancing [ ebgp | ibgp ] number ecmp-nexthop-changed command, the device changes the next hop addresses of the routes to be advertised to a local address only when the routes are used for load balancing.

    The maximum load-balancing number command cannot be configured together with the maximum load-balancing ebgp number or maximum load-balancing ibgp number command.

    When routes with the same destination addresses carry out load balancing on the public network, the system determines the type of optimal routes first. If the optimal routes are IBGP routes, only IBGP routes carry out load balancing. If the optimal routes are EBGP routes, only EBGP routes carry out load balancing. This means that load balancing cannot be implemented among IBGP and EBGP routes with the same destination address.

  5. (Optional) Configure the FW not to compare the AS_Path attributes of the routes to be used for load balancing.

    load-balancing as-path-ignore

    By default, the FW compares the AS_Path attributes of the routes to be used for load balancing.

    • If there are multiple routes to the same destination but these routes pass through different ASs, load balancing cannot be implemented among these routes by default. To implement load balancing among these routes, run the load-balancing as-path-ignore command. After the load-balancing as-path-ignore command is run, the device no longer compares the AS_Path attributes of the routes to be used for load balancing. Therefore, exercise caution when using this command.

    • The load-balancing as-path-ignore and bestroute as-path-ignore commands are mutually exclusive.

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