maximum load-balancing (BGP)
Function
The maximum load-balancing command configures the maximum number of equal-cost routes.
The undo maximum load-balancing command restores the maximum number of equal-cost routes to 1.
By default, the maximum number of equal-cost routes is 1, and load balancing is not implemented.
Format
maximum load-balancing [ ebgp | ibgp ] number [ ecmp-nexthop-changed ]
undo maximum load-balancing [ ebgp | ibgp ]
Parameters
Parameter | Description | Value |
---|---|---|
ebgp | Indicates that only EBGP routes carry out load balancing. | - |
ibgp | Indicates that only IBGP routes carry out load balancing. | - |
number | Specifies the maximum number of equal-cost routes in the BGP routing table. | The value is an integer ranging from 1 to 8. |
ecmp-nexthop-changed is valid only in the BGP view, BGP IPv4 unicast address family view, and BGP IPv6 unicast address family view.
Views
BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-IPv6 unicast address family view
Usage Guidelines
Usage Scenario
After the maximum load-balancing command is run, multiple BGP equal-cost routes will implement load balancing, improving 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 of these routes are different.
PrefVal values are the same.
Local_Pref attributes are the same.
All BGP routes are summarized or non-summarized routes.
Origin attributes (IGP, EGP, or incomplete) are the same.
MED values are the same.
All BGP routes are EBGP or IBGP routes.
The IGP metric values within an AS are the same.
AS_Path attributes are the same.
After the maximum load-balancing ebgp number command is run, only EBGP routes implement road balancing. After the maximum load-balancing ibgp number 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.
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.
Precautions
If the maximum load-balancing command is run for multiple times, the latest configuration overrides the previous one.
The maximum load-balancing number command cannot be configured together with the maximum load-balancing ebgp number or maximum load-balancing ibgp number command.