maximum load-balancing (BGP-VPN instance IPv4 address family view)

Function

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

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

By default, the maximum number of equal-cost routes for load balancing is 1, and load balancing is not implemented.

Format

maximum load-balancing number

maximum load-balancing ebgp ebgpNumber

maximum load-balancing ibgp ibgpNumber

maximum load-balancing number ecmp-nexthop-changed

maximum load-balancing ebgp ebgpNumber ecmp-nexthop-changed

maximum load-balancing ibgp ibgpNumber ecmp-nexthop-changed

undo maximum load-balancing

undo maximum load-balancing ebgp

undo maximum load-balancing ibgp

Parameters

Parameter Description Value
number

Specifies the maximum number of equal-cost routes for load balancing.

The value is an integer that ranges from 1 to 128.

ebgp ebgpNumber

Specifies the maximum number of equal-cost EBGP routes for load balancing.

The value is an integer that ranges from 1 to 128.

ibgp ibgpNumber

Specifies the maximum number of equal-cost IBGP routes for load balancing.

The value is an integer ranging from 1 to 128.

ecmp-nexthop-changed

Configures a BGP device to change the next hop addresses of the routes that carry out load balancing to its address.

-

Views

BGP-VPN instance IPv4 address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

To configure the maximum number of equal-cost routes for load balancing, run the maximum load-balancing command. Load balancing improves the usage of network resources.

After BGP load balancing is configured, the routes that meet the following conditions can carry out load balancing as equal-cost routes.

  • Original next-hop addresses are different.
  • PrefVal values are the same.
  • Local_Pref attributes are the same.
  • The routes are either summarized or non-summarized.
  • Origin attributes (IGP, EGP, or incomplete) are the same.
  • MED values are the same.
  • The routes are EBGP or IBGP routes.
  • The IGP costs within an AS are the same.
  • AS_Path attributes are the same.

    For BGP routes with the same prefix in a routing table:
  • If the optimal route and the routes selected for load balancing are all labeled routes, the number of routes used for load balancing depends on the maximum load-balancing ingress-lsp or maximum load-balancing transit-lsp command configuration.
  • If the optimal route and the routes selected for load balancing are all non-labeled routes, the number of routes used for load balancing depends on the maximum load-balancing command configuration.

    If BGP labeled routes implement load balancing and the ingress LSP creation criteria are met, ingress LSPs are created for the labeled routes; If BGP labeled routes implement load balancing and the transit LSP creation criteria are met, transit LSPs are created for the labeled routes.

    After the maximum load-balancing ebgp command is run, only EBGP routes implement road balancing. After the maximum load-balancing ibgp command is run, only IBGP routes implement load balancing. If neither ebgp nor ibgp is configured, both EBGP and IBGP routes participate in load balancing, and the number of EBGP routes for load balancing is the same as the number of IBGP routes for load balancing.

    By default, after the maximum load-balancing command is run on a BGP device, the BGP device changes the next-hop of a route to itself before advertising the route to a peer, regardless of whether the route participates in load balancing. After ecmp-nexthop-changed is set, a BGP device changes the next-hop of only routes that participate in load balancing to itself before advertising them to peers and keeps the next-hop of the routes that do not participate in load balancing unchanged.

    NOTE:

    If you run the maximum load-balancing 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. However, in RR or BGP confederation scenarios, the device does not change the next hop addresses of non-local routes to be advertised to a local address.

    If you run the maximum load-balancing { ebgp | ibgp } 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 ] ecmp-nexthop-changed command, the device changes the next-hop of only routes that participate in load balancing to itself before advertising them to peers and keeps the next-hop of the routes that do not participate in load balancing unchanged.

    In Add-Path scenarios, the next hops of Add-Path routes to be advertised are processed in the same way as that of the optimal route no matter whether the routes are used for load balancing, regardless of whether load balancing is implemented.

Configuration Impact

If the maximum load-balancing command is run for multiple times, the latest configuration overrides the previous one.

Precautions

If the maximum load-balancing command is run, the maximum load-balancing ebgp or maximum load-balancing ibgp command does not take effect. If the maximum load-balancing ebgp or maximum load-balancing ibgp command is run, the maximum load-balancing command does not take effect.

If either the ebgp or the ibgp parameter is configured in the maximum load-balancing command, this parameter must be also configured in the undo maximum load-balancing command to delete load balancing.

The maximum load-balancing and the peer load-balancing commands are mutually exclusive.

Example

# Set two equal-cost routes to a specified destination.
<HUAWEI> system-view
[~HUAWEI] ip vpn-instance vpn1
[*HUAWEI-vpn-instance-vpn1] ipv4-family
[*HUAWEI-vpn-instance-vpn1-af-ipv4] route-distinguisher 100:1
[*HUAWEI-vpn-instance-vpn1-af-ipv4] quit
[*HUAWEI-vpn-instance-vpn1] quit
[*HUAWEI] bgp 100
[*HUAWEI-bgp] ipv4-family vpn-instance vpn1
[*HUAWEI-bgp-vpn1]
 maximum load-balancing 2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >