BGP load balancing
BGP implements load balancing through route recursion and route selection.
BGP load balancing through route recursion.
The next hop of a BGP route might not be directly connected. One of the reasons is next hops in routing information exchanged between IBGP peers are not modified. The BGP router must find the directly-connected next hop through IGP. The matching route with the direct next hop is called the "recursive route." The process of finding a recursive route is route recursion.
The system supports BGP load balancing based on route recursion. If multiple recursive routes to the same destination are load balanced (suppose three direct next hop addresses), BGP generates the same number of next hops to forward packets. BGP load balancing based on route recursion is always enabled by the system rather than configured by using commands.
BGP load balancing through route selection.
IGP routing protocols, such as RIP and OSPF, compute the metrics of routes, and implement load balancing over the routes with the same metric and to the same destination. The route selection criterion is metric.
BGP has no route computation algorithm, so it cannot perform load balancing according to the metrics of routes. BGP implements load balancing over the routes that meet the following requirements:
The routes have the same AS_PATH, ORIGIN, LOCAL_PREF, and MED attributes.
The routes are all reflected or not reflected by the route reflector.
BGP does not use the route selection rules described in "BGP route selection" for load balancing.
Figure 50: Network diagram
![](images/image49.png)
In Figure 50, Router A and Router B are IBGP peers of Router C. Router D and Router E both advertise a route 9.0.0.0 to Router C. If load balancing with a maximum number of two routes is configured on Router C, and the two routes have the same AS_PATH, ORIGIN, LOCAL_PREF, and MED, Router C installs both the two routes to its routing table for load balancing. After that, Router C forwards to Router A and Router B a single route that has NEXT_HOP changed to Router C and other attributes changed to those of the best route.
![]() | NOTE: BGP load balancing is applicable between EBGP peers, between IBGP peers, and between confederations. | |