BGP Load Balancing
BGP Load Balancing
BGP Load Balancing
Geography
Example: Dont use trans-oceanic links twice
Cost reasons
Balance traffic for optimal price
Redundancy
Redundancy and load balancing are not always aligned Example: if you use load balancing over several links, and one link goes down: can you still forward all traffic on the single link? For redundancy it is may sometimes be better to send/announce all traffic on a single link and then have redundant links for backup At the edge, it may be easier to get symmetrical routing which is better for filtering
Sub-link-layer load-balancing
10Gb/s 20 Gb/s LAG 10Gb/s
Two physical links is aggregated into a single LinkAggregate Group. Single (20Mb/s) link Load balancing normally on flows
Link-layer load-balancing
In (metro) Ethernet, load balancing can not be made: Spanning tree computes a single link Example: only one link between 222 and 333 can be used for forwarding.
444
1 2
Ethernet switch
333
3 4
2 1
222
12.0.0.1
13.0.0.1
10.0.0.1
130.2.3.0/24
AS1
RTA
EBGP RTB
AS2
BGP Multipath
By default, the best selection algorithm in BGP selects one route
no load balancing from a single router to a single prefix possible unless outside BGP using loopback peering for example
BGP multipath enables load balancing between equal paths (to the level of comparing routerids) Limited JunOS functionality
set protocol bgp group extern multipath [multiple-as]
Internal (eg from A) vs external (from D) load balancing Equal cost vs unequal cost multipath (links between B-D and C-D have different bandwidth).
9
Prefix set A
Prefix set B
10
192.16.0.0/24 192.16.1.0/24
AS9
192.16.0.0/23 192.16.1.0/24 Practical BGP: pages 54-55
11
AS8
AS9
192.16.0.0/24 ASPATH: 9,9,9 192.16.1.0/24 ASPATH: 9
AS7
12
Conditional advertisement
Advertize a prefix when some (network) condition is met
Specific route must be present in routing table
Example SUNET
If IGP reachability fails to campus, do not announce network.
Nordunet Stockholm
University Campus
Practical BGP: pages 63-65
14
Intelligent routing
A generalization of Conditional advertisement is 'Intelligent routing'
External event triggers announcements
Example 1: Announce an anycast route to a DNS server if you can access an A-record from it Example 2: Only announce routes to a site if performance measurement ensures a minimal bandwidth of 10Mb/s
Internal multi-path BGP Tag with communities for internal use or even LOCALPREF (seldom used)
Why?
RA
RB
FWA
FWB
Exercise: Symmetry
AS-C C.1/24 AS-A A.1/24 B.1/24 AS-B D/24 and E/24 are yout networks that you anounce to AS-A and AS-B Try to device a symmetric solution for D.1 and E.1 communicating with A.1, B.1 and C.1 respectively You should have some level of load-balancing.
RA
RB
D.1/24
E.1/24
18
RA
RB
FWA
FWB
19
Load-balancing lab
EBGP loopback peering EBGP over multiple links Balance prefixes on multiple EBGP peerings Redundancy
2/0/0
RTX1
RTX4
2/0/0
RTX2
20