Can I implement load balancing in BGP?
-
Probably a serverfault question. – Xorlev Feb 14 '10 at 16:54
4 Answers
Not exactly yes, not exactly no
BGP was not intended for traffic engineering but it can certainly be used for that purpose within some limits.
In the traditional multi-homed-to-different providers case, one typically announces all routes to both. Measures the resulting traffic. By prepending your own ASN to the busier path you can tune the metric that remote AS's use to choose one received route over the other. This doesn't always work because of remote route filtering but it should give you some control.
There are other ways. It's hard to appropriately treat this subject in a SO answer but there are a couple of well-known many-times-reviewed books on BGP and this is the first question they all answer.

- 143,651
- 25
- 248
- 329
-
BGP peering (tcp) R1 lo1 <-> R2 lo2 There is 3 Routes from R1 to R2, it is advertising by ospf, All of the routes has metric (for ex) = 5. When EBGP R1 try to send ip packet to network for ex 8.8.8.0\24, it knows that it must send it to R2 (lo2). When R1 look in to Routing table it found 3 routes with the same metric. it will balancing traffic by packet or session. Thank a lot. I found the answer. – user272947 Feb 14 '10 at 18:10
-
Aha, so you did your traffic engineering within your own AS. That works fine for outbound traffic (which is always under your control) but won't affect anything inbound, right? – DigitalRoss Jun 23 '16 at 19:17
Yes. However, the full nuances of how to do this depend greatly on the particular circumstances, and would prevent anybody from giving an accurate answer about your specific case without more details.
See:
- Load Balancing in BGP Networks
- How Does Load Balancing Work?
- Load Sharing with BGP in Single and Multihomed Environments
for more information.

- 303,634
- 46
- 339
- 357
Yes load balancing is possible in BGP, there are many way. Here is a good post about eBGP load balancing with single-homed BGP environment & two ISP connected through Static route.
If you're using Cisco IOS, there's BGP Multipath if you have multiple nodes peering:
http://www.cisco.com/en/US/docs/ios/12_2t/12_2t11/feature/guide/ft11bmpl.html

- 777
- 6
- 15
-
http://wiki.nil.com/EBGP_load_balancing_with_EBGP_session_between_loopback_interfaces – Wedge Martin Jun 19 '13 at 18:15