Bgp Load Balancing(1)
-
Upload
better-sembiring -
Category
Documents
-
view
23 -
download
1
Transcript of Bgp Load Balancing(1)
![Page 1: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/1.jpg)
1
Load balancing and traffic controlin BGP
Olof Hagsand KTH /CSC
DD2491 p2 2009/2010
![Page 2: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/2.jpg)
2
Issues in load balancing
• Load balancing: spread traffic on several paths instead of a single.•Why?•Use resources better
Can postpone upgrade of infra-structure
•GeographyExample: Dont use trans-oceanic links twice
•Cost reasonsBalance traffic for optimal price
![Page 3: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/3.jpg)
3
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
![Page 4: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/4.jpg)
4
Sub-link-layer load-balancing
20 Gb/s LAG 10Gb/s
10Gb/s
• Two physical links is aggregated into a single Link-Aggregate Group.• Single (20Mb/s) link• Load balancing normally on flows
![Page 5: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/5.jpg)
5
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.
4441 2
333 22232
3 2
1A B41
4
Ethernet switch
![Page 6: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/6.jpg)
6
IGP load balancing in IBGP
•IS-IS / OSPF equal-cost multipath provides load balancing in IBGP
Since next-hop self uses peering between loop-backs, and the IBGP neighbor may be reachable via more than one nexthop
10.0.0.1
Route Nexthop Metric Protocol130.2.3.0/24 10.0.0.1 IBGP10.0.0.1/32 12.0.0.1 10 IGP10.0.0.1/32 13.0.0.1 10 IGP
130.2.3.0/24
12.0.0.1
13.0.0.1
Equal-costmultipath
![Page 7: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/7.jpg)
7
Loopback peering in EBGP
•Loopback peering can also be used in EBGP, but routing of loopback is then set-up using static routes
Uncommon to use IGP between AS
EBGP
AS2RTB
AS1
RTA
![Page 8: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/8.jpg)
8
BGP Multipath
•By default, the best selection algorithm in BGP selects one routeno 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]
•By default equal cost multipathBook also describes unequal cost multipath in CISCO
Practical BGP: pages 261-269
![Page 9: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/9.jpg)
9
IBGP Multipath example
•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).
A
B C
D
![Page 10: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/10.jpg)
10
Balance prefix announcements
•For incoming traffic, you can partition your prefixes and anounce different prefix sets on different peerings.•If you have many transit operators, you can balance the traffic to get optimal price.•If you want higher granularity of the balancing, it is common to de-aggregate (or refrain from aggregating)
Bad for global BGP table sizes
Prefix set A
Prefix set B
![Page 11: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/11.jpg)
11
Load balancing + robustness
192.16.1.0/24
192.16.0.0/24
192.16.0.0/24
192.16.1.0/24
192.16.0.0/24192.16.1.0/24
• For robustness, you may wisth to announce all prefixes on all peerings, but use better metric (shorter AS-PATH / longer prefixes) where you prefer traffic•Example: prefixes
192.16.0.0/23
192.16.0.0/23
192.16.0.0/23
AS9
Practical BGP: pages 54-55
![Page 12: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/12.jpg)
12
Load balancing + robustness
192.16.1.0/24
192.16.0.0/24
192.16.0.0/24 ASPATH: 9
192.16.1.0/24ASPATH: 9
•Example: AS-PATH
192.16.0.0/24 ASPATH: 9,9,9
192.16.0.0/24ASPATH: 9,9,9
AS9
AS8
AS7
AS6 192.16.0.0/24 ASPATH: 6,8,9
192.16.1.0/24ASPATH: 6,7,9
![Page 13: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/13.jpg)
13
Longer prefix announcements
•Using longer prefixes introduces issues with address allocation and PI/PA addresses•In the sitiation below where PA addresses are used (AS2:s block), all inbound traffic will flow via AS3•AS2 must either
announce the more specific prefix = 'punching a hole' in 10.1.0.0/16 by 'leaking' 10.1.1.0/24AS1 must get PI addresses
10.1.1.0/2410.1.0.0/16
10.1.1.0/24 10.1.1.0/24
AS1
AS2
AS3
Practical BGP: pages 56-59
![Page 14: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/14.jpg)
14
Conditional advertisement•Advertize a prefix when some (network) condition is met
Specific route must be present in routing table
•Example SUNETIf IGP reachability fails to campus, do not announce network.
Practical BGP: pages 63-65
Stockholm
Nordunet
University Campus
![Page 15: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/15.jpg)
15
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
Practical BGP: pages 81-83
![Page 16: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/16.jpg)
16
Controlling outbound traffic
•Outbound control is in general simpler than inbound control since, using IP, you need only control the next-hop.•No BGP: Announce (default) routes using IGP metrics, load balance using equal-cost multipath•Control outgoing traffic by filtering input routes
accepting partial routes
•Internal multi-path BGP•Tag with communities for internal use•or even LOCALPREF (seldom used)
Practical BGP: pages 65-76
![Page 17: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/17.jpg)
17
Forcing symmetric entry/exit points
•Asymmetric routing is normal behavior for multi-homed networks•But enterprise may want to enforce symmetric routing.
(Providers usually do not have this problem)
• Why?
Practical BGP: pages 77-81
FWA FWB
RA RB
![Page 18: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/18.jpg)
18
Exercise: Symmetry
RA RB
AS-C
AS-BAS-A
D.1/24
B.1/24
C.1/24
A.1/24
• 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.
E.1/24
![Page 19: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/19.jpg)
19
Forcing symmetric entry/exit points•Using the topology shown you do not actually require symmetric routing, it is enough to be traffic be symmetric w.r.t the firewalls: the routing could be asymmetric over RA and RB.•This is usually done by splitting the address space internally and letting the IGP handle symmetric FW access
FWA FWB
RA RB
![Page 20: Bgp Load Balancing(1)](https://reader036.fdocuments.us/reader036/viewer/2022081907/5450df40af79593a0a8b4570/html5/thumbnails/20.jpg)
20
Load-balancing lab
•EBGP loopback peering•EBGP over multiple links•Balance prefixes on multiple EBGP peerings•Redundancy
RTX2
RTX1 RTX4
ASXASX-1 ASX+1
2/0/02/0/0
2/0/1 2/0/1
2/0/0 2/0/0