BGP Scaling Techniques: Scalable Infrastructure Workshop Afnog 2010
BGP Scaling Techniques: Scalable Infrastructure Workshop Afnog 2010
BGP Scaling Techniques: Scalable Infrastructure Workshop Afnog 2010
Scalable Infrastructure
Workshop
AfNOG 2010
BGP Scaling Techniques
How to scale iBGP mesh beyond a few
peers?
How to implement new policy without
causing flaps and route churning?
How to reduce the overhead on the
routers?
BGP Scaling Techniques
Original BGP specification and
implementation was fine for the Internet
of the early 1990s
But didnt scale
Issues as the Internet grew included:
Scaling the iBGP mesh beyond a few peers?
Implement new policy without causing flaps
and route churning?
Keep the network stable, scalable, as well as
simple?
BGP Scaling Techniques
Current Best Practice Scaling Techniques
Route Refresh
Peer-groups
Route Reflectors (and Confederations)
Deprecated Scaling Techniques
Soft Reconfiguration
Route Flap Damping
Dynamic Reconfiguration
Non-destructive policy changes
Route Refresh
Problem:
Hard BGP peer reset required after every
policy change because the router does not
store prefixes that are rejected by policy
Hard BGP peer reset:
Tears down BGP peering
Consumes CPU
Severely disrupts connectivity for all networks
Solution:
Route Refresh
Route Refresh Capability
Facilitates non-disruptive policy changes
No configuration is needed
Automatically negotiated at peer establishment
No additional memory is used
Requires peering routers to support route
refresh capability RFC2918
clear ip bgp x.x.x.x [soft] in tells peer to resend
full BGP announcement
clear ip bgp x.x.x.x [soft] out resends full BGP
announcement to peer
Dynamic Reconfiguration
Use Route Refresh capability if supported
Supported on virtually all routers
Find out from show ip bgp neighbor
Non-disruptive, Good For the Internet
Otherwise use Soft Reconfiguration IOS feature
Only hard-reset a BGP peering as a last resort
peer
BGP out
sh ip bgp neigh advertised process
Managing Policy Changes
clear ip bgp <addr> [soft] [in|out]
<addr> may be any of the following:
x.x.x.x IP address of a peer
* all peers
ASN all peers in an AS
external all external peers
peer-group <name> all peers in a peer-group
Peer Groups
Saving Time!
Peer Groups
Without peer groups
iBGP neighbours receive same update
Large iBGP mesh slow to build
Router CPU wasted on repeat calculations
Solution peer groups!
Group peers with same outbound policy
Updates are generated once per group
Peer Groups Advantages
Makes configuration easier
Makes configuration less prone to error
Makes configuration more readable
Lower router CPU load
iBGP mesh builds more quickly
Members can have different inbound
policy
Can be used for eBGP neighbours too!
Configuring Peer Group
router bgp 100
neighbor ibgp-peer peer-group
neighbor ibgp-peer remote-as 100
neighbor ibgp-peer update-source loopback 0
neighbor ibgp-peer send-community
neighbor ibgp-peer route-map outfilter out
neighbor 1.1.1.1 peer-group ibgp-peer
neighbor 2.2.2.2 peer-group ibgp-peer
neighbor 2.2.2.2 route-map infilter in
neighbor 3.3.3.3 peer-group ibgp-peer
Two solutions
Route reflector simpler to deploy and run
Confederation more complex, corner case benefits
Route Reflector: Principle
Route Reflector
AS 100
B C
Route Reflector
Reflector receives path Clients
from clients and non-
clients
Selects best path
If best path is from Reflectors
A
client, reflect to other
clients and non-clients
B C
If best path is from
non-client, reflect to
clients only
Non-meshed clients AS 100
Described in RFC4456
Route Reflector Topology
Divide the backbone into multiple clusters
At least one route reflector and few clients
per cluster
Route reflectors are fully meshed
Clients in a cluster could be fully meshed
Single IGP to carry next hop and local
routes
Route Reflectors:
Loop Avoidance
Originator_ID attribute
Carries the RID of the originator of the route in
the local AS (created by the RR)
Cluster_list attribute
The local cluster-id is added when the update
is sent by the RR
Cluster-id is router-id (address of loopback)
Do NOT use bgp cluster-id x.x.x.x
Route Reflectors: Redundancy
Multiple RRs can be configured in the
same cluster not advised!
All RRs are in the cluster must have the same
cluster ID (otherwise it is a different cluster)
A router may be a client of RRs in different
clusters
Common today in ISP networks to overlay
clusters redundancy achieved that way
Each client has two RRs = redundancy
Route Reflectors: Benefits
Solves iBGP mesh problem
Packet forwarding is not affected
Normal BGP speakers co-exist
Multiple reflectors for redundancy
Easy migration
Multiple levels of route reflectors
Route Reflectors: Migration
Where to place the route reflectors?
Follow the physical topology!
This will guarantee that the packet forwarding
wont be affected
Configure one RR at a time
Eliminate redundant iBGP sessions
Place one RR per cluster
Route Reflector: Migration
AS 300
A
B C
AS 100
D
E G
AS 200 F
Suppress limit
3000
Penalty
2000
Reuse limit
1000
0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Time