The maximum load-balancing eibgp command configures the maximum number of EBGP and IBGP routes for load balancing.
The undo maximum load-balancing eibgp command deletes the configured maximum number of EBGP and IBGP routes for load balancing.
By default, the maximum number of EBGP and IBGP routes for load balancing is 1, and load balancing is not implemented.
Parameter | Description | Value |
---|---|---|
number |
Specifies the maximum number of equal-cost EBGP and IBGP routes. |
The value is an integer ranging from 1 to 128. |
ecmp-nexthop-changed |
Configures a BGP device to change the next hop addresses of routes for load balancing to its address only when the device advertises these routes. |
- |
Usage Scenario
The maximum load-balancing eibgp command is used in a VPN where a CE is dual-homed to PEs. When the CE shares one AS with only one of the CEs, you can set the number of EBGP and IBGP routes for load balancing. This allows VPN traffic to be balanced among EBGP and IBGP routes.
NOTE: If you run the maximum load-balancing eibgp 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 eibgp ecmp-nexthop-changed 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. 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. After BGP load balancing is configured, BGP routes that meet the following conditions and have the same AS_Path attribute are equal-cost routes and implement load balancing:Configuration Impact
If the maximum load-balancing eibgp command is run more than once, the latest configuration overrides the previous one.
Precautions
The maximum load-balancing and the maximum load-balancing eibgp commands are mutually exclusive.
Load balancing cannot be implemented between leaked and non-leaked routes.<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpna [*HUAWEI-vpn-instance-vpna] ipv4-family [*HUAWEI-vpn-instance-vpna-af-ipv4] route-distinguisher 100:1 [*HUAWEI-vpn-instance-vpna-af-ipv4] vpn-target 111:1 both [*HUAWEI-vpn-instance-vpna-af-ipv4] quit [*HUAWEI-instance-vpna] quit [*HUAWEI] bgp 100 instance a [*HUAWEI-bgp-instance-a] ipv4-family vpn-instance vpna [*HUAWEI-bgp-instance-a-vpna] maximum load-balancing eibgp 3 ecmp-nexthop-changed
<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpna [*HUAWEI-vpn-instance-vpna] ipv4-family [*HUAWEI-vpn-instance-vpna-af-ipv4] route-distinguisher 100:1 [*HUAWEI-vpn-instance-vpna-af-ipv4] vpn-target 111:1 both [*HUAWEI-vpn-instance-vpna-af-ipv4] quit [*HUAWEI-instance-vpna] quit [*HUAWEI] bgp 100 instance a [*HUAWEI-bgp-instance-a] ipv4-family vpn-instance vpna [*HUAWEI-bgp-instance-a-vpna] maximum load-balancing eibgp 3