SlideShare una empresa de Scribd logo
1 de 78
BGP : Advanced topics
Olivier Bonaventure, UCLouvain, 2018
Agenda
• iBGP and the BGP Decision process
• How to scale iBGP to large networks ?
• BGP traffic engineering
BGP in large networks
• What happens when a network contains tens,
hundreds or thousands of routers ?
AS1
AS2
AS3
AS4
3
How to distribute BGP routes
in a large network ?
AS1
AS2
AS3
eBGP
iBGP
IP addresses used on routers
AS1
AS2
AS3
A /64 prefix belonging
to the AS1, 2001:11:1:/64
A /64 prefix belonging
to AS2, e.g. 2001:222:12:/64 A /64 prefix belonging
to AS1, e.g. 2001:222:11:13:/64
A closer look at the BGP messages
AS1
AS2
2001:222:11:13::33
Prefix: p
AS Path : AS3
BGP Nexhop : 2001:222:11:13::33
AS3
Prefix: p
AS Path : AS3
BGP Nexhop : 2001:222:11:13::33
Prefix: p
AS Path : AS1:AS3
BGP Nexhop : 2001:222:12::1234
2001:222:12::1234
p
Endpoints of the eBGP sessions
• eBGP sessions are TCP connections
established between
the IP addresses of
the two routers
on the peering link
AS1
AS2
2001:222:11:13::33
AS3
2001:222:12::1234
2001:222:12::5678
How to distribute BGP routes
in a large network ?
• Full mesh of iBGP sessions
– Why ?
Draw iBGP sessions in AS1
AS1
AS2
AS3
AS4
Endpoints of the iBGP sessions
• A router has several IP addresses, on which
address should an iBGP session terminate ?
– Any IP address belonging to the router
• Address is associated to an interface, if the interface stops,
iBGP session stops as well even if the router is still reachable
over other interfaces
– A loopback address
• A software only interface that is always up and announced
through the intradomain routing protocol so that it remains
reachable as long as the router has one interface up
• Best Current Practice
How to deal with routers that are not
connected to other ASes ?
• Run BGP on these routers
• Include them in
iBGP full-mesh
AS1
AS2
AS3
How to deal with routers that are not
connected to other ASes ?
• Make sure that they wlll
never have to
forward a packet
to an external
destination
• MPLS
AS1
AS2
AS3
What are the roles of the IGP ?
• The intradomain routing protocol distributes
information about the reachability of :
– IP prefixes associated to internal links between
routers of the AS
– IP addresses associated to loopback interfaces or
routers of the AS
– IP prefixes associated to peering links between a
router of this AS and another AS
BGP Nexthop self
• Helps to reduce # routes in the IGP
AS1
AS2
2001:222:11:13::33
AS3
Prefix: p
AS Path : AS3
BGP Nexhop : 2001:11:1001::1
Prefix: p
AS Path : AS1:AS3
BGP Nexhop : 2001:222:12::1234
2001:11:1001::2
Prefix: p
AS Path : AS3
BGP Nexhop : 2001:222:11:13::33
2001:11:1001::1
2001:222:12::1234
The BGP decision process
1. Ignore routes having an unreachable BGP
nexthop
2. Prefer routes having the highest local-pref
3. Prefer routes having the shortest AS-Path
4. Prefer routes having the smallest MED
5. Prefer routes learned via eBGP sessions over
routes learned via iBGP sessions
6. Prefer routes having the closest next-hop
7. Tie breaking rules : prefer route learned from
the router with lowest router id
1st step of BGP decision process
• 1. Ignore routes having an unreachable BGP
nexthop
– Why would a BGP route contain an unreachable
nexthop ?
Unreachable nexthop
• Usually a transient issue
AS1
AS3
AS2
2nd step of BGP decision process
• 2. Prefer routes having the highest local-pref
– Implement routing policies
• Prefer customer routes over shared-cost and provide
routers
– Support backup routes
• Local-pref attribute to added by the import
filter on eBGP session and distributed to all
routers over iBGP sessions
BGP routes towards prefix p on all
routers inside AS1
AS1
R1
AS4
R2
R3
R4
R5
R6
p
3rd step of BGP decision process
• 3. Prefer routes having the shortest AS-Path
– Some operators believe that a BGP route with a
long AS Path has a lower performance than a
route with a longer AS Path
• This is not always true…
5th step of BGP decision process
• 5. Prefer routes learned via eBGP sessions
over routes learned via iBGP sessions
– Motivation : Hot potato routing
• Routers should try to forward packets towards external
destinations to another AS a quickly as possible
6th step of BGP decision process
• 6. Prefer routes having the closest next-hop
– Motivation : Hot potato routing
• Routers should try to forward packets towards external
destinations to another AS a quickly as possible
BGP routes towards prefix p on all
routers inside AS1
AS1
R1
AS4
R2
R3
R4
R5
R6
p
BGP routes towards prefix p on all
routers inside AS1
AS1
R1
AS4
R2
R3
R4
R5
R6
p
AS2
AS3 AS5
4th step of BGP decision process
• Prefer routes having the smallest MED
• MED means Multi-Exit Discriminator
– Motivation : Cold potato routing
– Enable neighbour AS (usually customer) to
indicate the best peering link to reach a given
prefix
BGP routes towards prefix p on all
routers inside AS1
AS1
R1
AS4
R2
R3
R4
R5
R6
p
BGP routes towards prefix p on all
routers inside AS1
AS1
R1
AS4
R2
R3
R4
R5
R6
p
AS2
AS3
IGP=7
IGP=2
7th step of the BGP decision process
• 7. Tie breaking rules : prefer route learned from
the router with lowest router id
– Motivation : select a single best route towards each
destination prefix
• This best route is the route that can be advertised over eBGP
session
– Note that recent routers sometimes load balance
(BGP Multipath) the traffic towards a given prefix over
several routes (having the same BGP attributes)
Differences between
iBGP and eBGP
– Which routes are advertised by a router over iBGP
and eBGP sessions ?
• Over an eBGP session, a router advertises its best route
towards each destination prefix
– Provided this advertisement is allowed by the export filter
– At most one route per destination prefix
• Over an iBGP session, a router advertises its best route
towards each destination prefix provided that this best
route was learned over an eBGP session
– Since iBGP sessions are in full-mesh, there is no need to
readvertise a route learned over another iBGP session
Differences between
iBGP and eBGP
– Which filters are used over iBGP and eBGP sessions
?
• Import and export filters are used over all eBGP sessions
– Usually, there is a series of import filters attached to each
peering link
– Filters are usually implemented as modules that are combined
together and associated to similar peering links (e.g. customer
filter, provider filter, …)
• No filter is applied on iBGP sessions
Differences between
iBGP and eBGP
– What are the attributes carried by iBGP and eBGP
• Prefix : iBGP and eBGP
• AS Path : iBGP and eBGP
– AS Path is updated when a BGP message is sent over an eBGP
session
• Local-pref : iBGP
– Local-pref cannot be used on eBGP sessions
• MED : iBGP and eBGP
• Nexthop : iBGP and eBGP
– Nexthop is updated when a BGP message is sent over an eBGP
session
What happens if iBGP sessions are
missing ?
AS1
R1
AS4
R4
R5
R6
p
AS2
AS3 AS5
IGP=7
What happens if iBGP sessions are
missing ?
AS1
R1
AS4
R4
R5
R6
p
AS2
AS3 AS5
What happens if iBGP sessions are
missing ?
AS1
R1
AS4
R4
R5
R6
p
AS2
AS3 AS5
Conclusion
• BGP depends on the underlying intradomain
routing protocol
– Establishment of the iBGP sessions
– Resolution of the BGP nexthop
• iBGP and eBGP play different roles
– eBGP over sessions with routers in other ASes
– iBGP sessions (in full mesh) inside an AS
• The BGP decision process ranks routes
– Hot potato versus cold potato routing
Reading list
1st edition, BGP section
http://cnp3book.info.ucl.ac.be/network/networ
k/#the-border-gateway-protocol
J. Park et al, “BGP Route Reflection Revisited”,
IEEE Communications Magazine, June 2012,
http://irl.cs.ucla.edu/~j13park/rr-commag.pdf
Agenda
• iBGP and the BGP Decision process
• How to scale iBGP to large networks ?
• BGP traffic engineering
Interactions between IGP and iBGP
• What are the interactions between iBGP and
the intradomain routing protocol ?
– iBGP sessions are TCP connections whose
endpoints are reachable thanks to IGP
• Endpoints of iBGP sessions are usually loopback
interfaces advertised in IGP
– BGP Nexthops are reachable thanks to IGP
– BGP decision process uses reachability and IGP
cost towards BGP nexthop to rank routes
Creation of iBGP sessions
• How are iBGP sessions created on routers ?
– Usually by manual configuration on each router
group INTERNET2-IPv6 {
type internal;
local-address 2001:468:a::1;
family inet6 {
any;
}
export NEXT-HOP-SELF;
peer-as 11537;
neighbor 2001:468:1::1 {
description ATLA;
}
...
Scaling issues with iBGP
• In a network containing N routers
– N*(N-1)/2 iBGP sessions need to be manually
configured and maintained
• Scalability issues
– CPU usage to process and send iBGP messages
• About 600k routes on IPv4 Internet today
– Number of iBGP sessions on each router
• TCP state, BGP Keepalives, …
– Memory consumption
• ADJ-RIB-IN, ADJ-RIB-OUT, ...
Improving iBGP scaling
• Two approaches
– Route Reflectors
• A RR is a special iBGP router that is allowed, under
specific conditions, to advertise over iBGP sessions
routes learned over other iBGP sessions
– BGP confederations
• A large AS is divided in smaller (sub-)ASes containing a
few tens of routers in iBGP full mesh. The sub-ASes use
eBGP to exchange BGP routes
How to design an iBGP hierarchy
• A RR has two types of iBGP neighbours
RR1
R6R1
R8
R9
Client sessions
Non-Client
sessions
Operation of Route Reflectors
• Reception of a new route
– Run BGP decision process on RR
– If best route has changed
• If best route was learned from eBGP session
– Advertise the best route to all iBGP sessions
• If best route was learned from an iBGP client session
– Advertise the best route to all iBGP sessions (clients and non-
clients)
• If best route was learned from a non-client iBGP session
– Advertise the best route to all client iBGP sessions (non-client
sessions are assumed to be in full-mesh and will also receive the
new route from their own iBGP session)
Benefits of using RRs
• Simplified configuration
– A new router can be easily added to the network
• Reduced memory and CPU usage on routers
– Each router maintains fewer iBGP sessions
– Route Reflectors do not announce all routes to
their BGP clients, reducing their memory usage
– Route Reflectors are often specialised devices with
faster CPU and memory that only run BGP and IGP
but do not forward regular packets
Caveats with Route Reflectors
• Route reflectors hide routes to iBGP clients
– A RR only advertises its best route towards each
prefix over a given iBGP session
– A RR runs the BGP decision process on the basis of
its IGP routing table
• iBGP clients could select a different best route than
their RR
• Route reflectors can increase convergence
time after failures
Caveats with Route Reflectors
• Since RRs advertise iBGP learned routes over
iBGP sessions, a badly configured iBGP
topology may cause loops
RR1
R6R1
RR3
RR2
How to prevent loops
• BGP Route Reflection introduces two new
iBGP attributes
– ORIGINATOR_ID
• Set to the router id of the router that injects a route in
iBGP
– CLUSTER_LIST
• When a RR receives a route, it checks whether its
router id is included in the CLUSTER_LIST. If yes, the
route is rejected.
• When a RR sends a route over an iBGP session, it adds
its router id to the CLUSTER_LIST
Fault tolerance
• If a Route Reflector fails, a large number of
BGP routers will be affected and lose BGP
routes
• How to mitigate this problem ?
– Use redundant route reflectors that are deployed
in pairs
– Each BGP router is attached to at least two
different RRs
Fault tolerance
• In practice, each BGP router is usually
attached to two RRs that are close to itself in
the IGP topology
RR1
R6
R1
RR3
RR2
Route Reflectors
• What are the routes learned if R3 acts as RR
for the entire AS1 ?
AS1
R1
AS4
R2
R3
R4
R5
R6
p
Route Reflectors
• What are the routes learned if both R3 and R5
act as RR for the entire AS1 ?
AS1
R1
AS4
R2
R3
R4
R5
R6
p
Which routes are selected ?
AS1
R1
AS4
R2
R3
R4
R5
R6
p
AS2
AS3 AS5
What is the best place for a single RR ?
AS1
R1
AS4
R2
R3
R4
R5
R6
p
AS2
AS3 AS5
What is the best location for two RR ?
AS1
R1
AS4
R2
R3
R4
R5
R6
p
AS2
AS3 AS5
Hierarchy of Route Reflectors
AS1
R1
R2
R3
R4
R5
R6
R7
R8
R9
RA
RB
p
AS2
AS3 AS5
What are the forwarding paths
towards p advertised by AS6 ?
R5 R6
AS6
R1 R3
C=1C=1
C=1
C=5
Agenda
• iBGP and the BGP Decision process
• How to scale iBGP to large networks ?
• BGP traffic engineering
Prefer customer, ...
AS1
R1
R2
R3
R4
R5
R6
AS2 AS3
AS4
AS5
AS6
AS7
$
$
$
$ $
=
Forwarding paths from AS7 to AS8 and
vice-versa
AS1
R1
R2
R3
R4
R5
R6
AS7
AS8
Customer wants packets towards
p1 via R2 and p2 via R5
AS1
R1
R2
R3
R4
R5
R6
AS7
Customer
p1 p2
Fun with MED
• iBGP full mesh
R5 R6
AS4
AS5AS6
R1 R2 R3
C=4
C=2
C=1
C=1
MED=0MED=1
p
MED=0
Fun with MED (2)
• With RRs
R5 R6
AS4
AS5AS6
R1 R2 R3
C=4
C=2
C=1
C=1
MED=0MED=1MED=0
p
Incoming traffic engineering
• How can a customer distribute the load on its
links ?
– one third of traffic on each link ?
ISP
R1
R2
R3
R4
R5
R6
Customerp
More specific prefixes
AS1
R1
R2
R3
R4
R5
R6
AS7
AS9
p0/49
p1/49
p/48
p/48
More specific prefixes
AS1
R1
R2
R3
R4
R5
R6
AS7
AS9
p0/49
p1/49
p0/49 AS9
p1/49 AS9
More specific prefixes
AS1
R1
R2
R3
R4
R5
R6
AS7
AS9
p0/49
p1/49
p0/49 AS9
p/48 AS9 p1/49 AS9
p/48 AS9
AS Path prepending
AS1
R1
R2
R3
R4
R5
R6
AS7
AS9
p0/49
p1/49
p/48 AS9
p/48 AS9:AS9:AS9
Backup links
• How can an ISP provide backup services to its
customers ?
ISP
R1
R2
R3
R4
R5
R6
BGP Communities
• BGP Communities can be attached to BGP
routes in import filter
– To indicate geographical location
– To indicate type of BGP session
– …
• BGP Communities can be attached to BGP
routes in export filter
– To request neighbour AS to treat the route in a
specifix way
How to provide restricted transit ?
ISP
R1
R2
R3
R5
R6
Customer1 Customer3
Customer2
How to provide richer customer
policies ?
• Customer wants to receive packets from US
via AS1 and from Europe via AS2
R1
R2
R3
R5
R6
CustomerAS1
AS2
AS-Path length is not always a
synonym of path quality
• How to prefer AS1 in US, AS2 in Europe
ISP
R1
R2
R3
R5
R6
AS1
AS2
Things to remember
when defining BGP policies
• Any tweaking you do could affects scalability
Source http://bgp.potaroo.net/tools/asn32
Size of IPv6 routing tables
Source http://bgp.potaroo.net/v6/as6447/
Size of IPv4 BGP routing tables
Source http://bgp.potaroo.net/as6447/
BGP communities
• Are by default transitive..
• Any BGP community that you add when
receiving routes will be advertised all over the
Internet
– you should clean your BGP communities when
advertising routes over eBGP, but router
configuration languages do not always make this
easy
Existing BGP communities
• Sprint
– https://www.sprint.net/index.php?p=policy_bgp
– Looking glass https://www.sprint.net/lg/lg_start.php
• Level3
– http://www.scn.rain.com/~neighorn/PDF/Traffic_Engineeri
ng_with_BGP_and_Level3.pdf
• NTT America
– https://www.us.ntt.net/support/policy/routing.cfm
• Internet2
– https://noc.net.internet2.edu/i2network/maps-
documentation/documentation/bgp-communities.html
References
• K. Fster, Application of BGP Communities, The Internet
Protocol Journal - Volume 6, Number 2, July 2003
• B. Donnet and O. Bonaventure. On BGP Communities.
ACM SIGCOMM Computer Communication Review,
38(2):55-59, April 2008.
– http://inl.info.ucl.ac.be/publications/bgp-communities
• B. Quoitin, S. Uhlig, C. Pelsser, L. Swinnen and O.
Bonaventure. Interdomain traffic engineering with BGP.
IEEE Communications Magazine Internet Technology
Series, 41(5):122-128, May 2003.
– http://inl.info.ucl.ac.be/publications/interdomain-traffic-
engineering-bgp

Más contenido relacionado

La actualidad más candente

Eigrp
EigrpEigrp
Eigrpfirey
 
A comparison of segment routing data-plane encodings
A comparison of segment routing data-plane encodingsA comparison of segment routing data-plane encodings
A comparison of segment routing data-plane encodingsGunter Van de Velde
 
Segment Routing
Segment RoutingSegment Routing
Segment RoutingAPNIC
 
Juniper mpls best practice part 2
Juniper mpls best practice   part 2Juniper mpls best practice   part 2
Juniper mpls best practice part 2Febrian ‎
 
Cisco Live! :: Introduction to Segment Routing :: BRKRST-2124 | Las Vegas 2017
Cisco Live! :: Introduction to Segment Routing :: BRKRST-2124  | Las Vegas 2017Cisco Live! :: Introduction to Segment Routing :: BRKRST-2124  | Las Vegas 2017
Cisco Live! :: Introduction to Segment Routing :: BRKRST-2124 | Las Vegas 2017Bruno Teixeira
 
Border Gateway Protocol
Border Gateway ProtocolBorder Gateway Protocol
Border Gateway ProtocolKashif Latif
 
EIGRP Routing Protocols
EIGRP Routing ProtocolsEIGRP Routing Protocols
EIGRP Routing Protocolssul6an14
 
MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]
MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]
MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]APNIC
 
Segment Routing Technology Deep Dive and Advanced Use Cases
Segment Routing Technology Deep Dive and Advanced Use CasesSegment Routing Technology Deep Dive and Advanced Use Cases
Segment Routing Technology Deep Dive and Advanced Use CasesCisco Canada
 
MPLS - Multiprotocol Label Switching
MPLS - Multiprotocol Label SwitchingMPLS - Multiprotocol Label Switching
MPLS - Multiprotocol Label SwitchingPeter R. Egli
 

La actualidad más candente (20)

Eigrp
EigrpEigrp
Eigrp
 
A comparison of segment routing data-plane encodings
A comparison of segment routing data-plane encodingsA comparison of segment routing data-plane encodings
A comparison of segment routing data-plane encodings
 
Segment Routing
Segment RoutingSegment Routing
Segment Routing
 
Border Gatway Protocol
Border Gatway ProtocolBorder Gatway Protocol
Border Gatway Protocol
 
Juniper mpls best practice part 2
Juniper mpls best practice   part 2Juniper mpls best practice   part 2
Juniper mpls best practice part 2
 
Bgp tutorial for ISP
Bgp tutorial for ISPBgp tutorial for ISP
Bgp tutorial for ISP
 
BGP
BGP BGP
BGP
 
MPLS Presentation
MPLS PresentationMPLS Presentation
MPLS Presentation
 
Cisco Live! :: Introduction to Segment Routing :: BRKRST-2124 | Las Vegas 2017
Cisco Live! :: Introduction to Segment Routing :: BRKRST-2124  | Las Vegas 2017Cisco Live! :: Introduction to Segment Routing :: BRKRST-2124  | Las Vegas 2017
Cisco Live! :: Introduction to Segment Routing :: BRKRST-2124 | Las Vegas 2017
 
Ethernet VPN (EVPN) EVerything Provider Needs
Ethernet VPN (EVPN) EVerything Provider NeedsEthernet VPN (EVPN) EVerything Provider Needs
Ethernet VPN (EVPN) EVerything Provider Needs
 
Border Gateway Protocol
Border Gateway ProtocolBorder Gateway Protocol
Border Gateway Protocol
 
EIGRP Routing Protocols
EIGRP Routing ProtocolsEIGRP Routing Protocols
EIGRP Routing Protocols
 
MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]
MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]
MPLS L3 VPN Tutorial, by Nurul Islam Roman [APNIC 38]
 
Eigrp.ppt
Eigrp.pptEigrp.ppt
Eigrp.ppt
 
Bgp
BgpBgp
Bgp
 
Segment Routing Technology Deep Dive and Advanced Use Cases
Segment Routing Technology Deep Dive and Advanced Use CasesSegment Routing Technology Deep Dive and Advanced Use Cases
Segment Routing Technology Deep Dive and Advanced Use Cases
 
MPLS - Multiprotocol Label Switching
MPLS - Multiprotocol Label SwitchingMPLS - Multiprotocol Label Switching
MPLS - Multiprotocol Label Switching
 
Bgp (1)
Bgp (1)Bgp (1)
Bgp (1)
 
IP Multicasting
IP MulticastingIP Multicasting
IP Multicasting
 
Is is
Is isIs is
Is is
 

Similar a BGP Advanced topics

bgp features presentation routing protocle
bgp features presentation routing protoclebgp features presentation routing protocle
bgp features presentation routing protocleBadr Belhajja
 
Computer network (14)
Computer network (14)Computer network (14)
Computer network (14)NYversity
 
PLNOG15: BGP New Advanced Features - Piotr Wojciechowski
PLNOG15: BGP New Advanced Features - Piotr WojciechowskiPLNOG15: BGP New Advanced Features - Piotr Wojciechowski
PLNOG15: BGP New Advanced Features - Piotr WojciechowskiPROIDEA
 
PLNOG 6: Rafał Szarecki - Routing w Sieci - Praktyczne aspekty implementacji ...
PLNOG 6: Rafał Szarecki - Routing w Sieci - Praktyczne aspekty implementacji ...PLNOG 6: Rafał Szarecki - Routing w Sieci - Praktyczne aspekty implementacji ...
PLNOG 6: Rafał Szarecki - Routing w Sieci - Praktyczne aspekty implementacji ...PROIDEA
 
Bgp 6 advanced transit as issues
Bgp 6   advanced transit as issuesBgp 6   advanced transit as issues
Bgp 6 advanced transit as issuesAuguste Behe
 
Part 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGPPart 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGPOlivier Bonaventure
 
BGP Path Selection & Attributes BGP Weight & BGP AS-Path Prepending
BGP Path Selection & Attributes BGP Weight & BGP AS-Path PrependingBGP Path Selection & Attributes BGP Weight & BGP AS-Path Prepending
BGP Path Selection & Attributes BGP Weight & BGP AS-Path PrependingShawan Roy
 
Interautonomous System PLS VPN Advanced Concepts
Interautonomous System PLS VPN Advanced ConceptsInterautonomous System PLS VPN Advanced Concepts
Interautonomous System PLS VPN Advanced ConceptsBrozaa
 
Study Notes BGP Exam
Study Notes BGP ExamStudy Notes BGP Exam
Study Notes BGP ExamDuane Bodle
 
DEVNET-1191 BGP Enabled Application Development
DEVNET-1191	BGP Enabled Application DevelopmentDEVNET-1191	BGP Enabled Application Development
DEVNET-1191 BGP Enabled Application DevelopmentCisco DevNet
 
BGP (border gateway routing protocol)
BGP (border gateway routing protocol)BGP (border gateway routing protocol)
BGP (border gateway routing protocol)Netwax Lab
 
Dynamic Routing with FRR - pfSense Hangout December 2017
Dynamic Routing with FRR - pfSense Hangout December 2017Dynamic Routing with FRR - pfSense Hangout December 2017
Dynamic Routing with FRR - pfSense Hangout December 2017Netgate
 

Similar a BGP Advanced topics (20)

Part8-ibgp.pptx
Part8-ibgp.pptxPart8-ibgp.pptx
Part8-ibgp.pptx
 
bgp features presentation routing protocle
bgp features presentation routing protoclebgp features presentation routing protocle
bgp features presentation routing protocle
 
Computer network (14)
Computer network (14)Computer network (14)
Computer network (14)
 
PLNOG15: BGP New Advanced Features - Piotr Wojciechowski
PLNOG15: BGP New Advanced Features - Piotr WojciechowskiPLNOG15: BGP New Advanced Features - Piotr Wojciechowski
PLNOG15: BGP New Advanced Features - Piotr Wojciechowski
 
PLNOG 6: Rafał Szarecki - Routing w Sieci - Praktyczne aspekty implementacji ...
PLNOG 6: Rafał Szarecki - Routing w Sieci - Praktyczne aspekty implementacji ...PLNOG 6: Rafał Szarecki - Routing w Sieci - Praktyczne aspekty implementacji ...
PLNOG 6: Rafał Szarecki - Routing w Sieci - Praktyczne aspekty implementacji ...
 
Bgp 6 advanced transit as issues
Bgp 6   advanced transit as issuesBgp 6   advanced transit as issues
Bgp 6 advanced transit as issues
 
Part 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGPPart 10 : Routing in IP networks and interdomain routing with BGP
Part 10 : Routing in IP networks and interdomain routing with BGP
 
BGP Path Selection & Attributes BGP Weight & BGP AS-Path Prepending
BGP Path Selection & Attributes BGP Weight & BGP AS-Path PrependingBGP Path Selection & Attributes BGP Weight & BGP AS-Path Prepending
BGP Path Selection & Attributes BGP Weight & BGP AS-Path Prepending
 
Bgp protocol
Bgp protocolBgp protocol
Bgp protocol
 
10 routing-bgp
10 routing-bgp10 routing-bgp
10 routing-bgp
 
Interautonomous System PLS VPN Advanced Concepts
Interautonomous System PLS VPN Advanced ConceptsInterautonomous System PLS VPN Advanced Concepts
Interautonomous System PLS VPN Advanced Concepts
 
Wrou01
Wrou01Wrou01
Wrou01
 
Study Notes BGP Exam
Study Notes BGP ExamStudy Notes BGP Exam
Study Notes BGP Exam
 
DEVNET-1191 BGP Enabled Application Development
DEVNET-1191	BGP Enabled Application DevelopmentDEVNET-1191	BGP Enabled Application Development
DEVNET-1191 BGP Enabled Application Development
 
Bgp Toc
Bgp TocBgp Toc
Bgp Toc
 
Bigbgp (1)
Bigbgp (1)Bigbgp (1)
Bigbgp (1)
 
Bgp training
Bgp trainingBgp training
Bgp training
 
Bgp
BgpBgp
Bgp
 
BGP (border gateway routing protocol)
BGP (border gateway routing protocol)BGP (border gateway routing protocol)
BGP (border gateway routing protocol)
 
Dynamic Routing with FRR - pfSense Hangout December 2017
Dynamic Routing with FRR - pfSense Hangout December 2017Dynamic Routing with FRR - pfSense Hangout December 2017
Dynamic Routing with FRR - pfSense Hangout December 2017
 

Más de Olivier Bonaventure

Más de Olivier Bonaventure (20)

Part3-reliable.pptx
Part3-reliable.pptxPart3-reliable.pptx
Part3-reliable.pptx
 
Part10-router.pptx
Part10-router.pptxPart10-router.pptx
Part10-router.pptx
 
Part1-Intro-Apps.pptx
Part1-Intro-Apps.pptxPart1-Intro-Apps.pptx
Part1-Intro-Apps.pptx
 
Part9-congestion.pptx
Part9-congestion.pptxPart9-congestion.pptx
Part9-congestion.pptx
 
Part2-Apps-Security.pptx
Part2-Apps-Security.pptxPart2-Apps-Security.pptx
Part2-Apps-Security.pptx
 
Part11-lan.pptx
Part11-lan.pptxPart11-lan.pptx
Part11-lan.pptx
 
Part5-tcp-improvements.pptx
Part5-tcp-improvements.pptxPart5-tcp-improvements.pptx
Part5-tcp-improvements.pptx
 
Part4-reliable-tcp.pptx
Part4-reliable-tcp.pptxPart4-reliable-tcp.pptx
Part4-reliable-tcp.pptx
 
Part7-routing.pptx
Part7-routing.pptxPart7-routing.pptx
Part7-routing.pptx
 
Part6-network-routing.pptx
Part6-network-routing.pptxPart6-network-routing.pptx
Part6-network-routing.pptx
 
Part1-Intro-Apps.pptx
Part1-Intro-Apps.pptxPart1-Intro-Apps.pptx
Part1-Intro-Apps.pptx
 
Part2-Apps-Security.pptx
Part2-Apps-Security.pptxPart2-Apps-Security.pptx
Part2-Apps-Security.pptx
 
Part4-reliable-tcp.pptx
Part4-reliable-tcp.pptxPart4-reliable-tcp.pptx
Part4-reliable-tcp.pptx
 
Part3-reliable.pptx
Part3-reliable.pptxPart3-reliable.pptx
Part3-reliable.pptx
 
A personal journey towards more reproducible networking research
A personal journey towards more reproducible networking researchA personal journey towards more reproducible networking research
A personal journey towards more reproducible networking research
 
Part 12 : Local Area Networks
Part 12 : Local Area Networks Part 12 : Local Area Networks
Part 12 : Local Area Networks
 
Part 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGPPart 11 : Interdomain routing with BGP
Part 11 : Interdomain routing with BGP
 
Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6Part 9 : Congestion control and IPv6
Part 9 : Congestion control and IPv6
 
Part 8 : TCP and Congestion control
Part 8 : TCP and Congestion controlPart 8 : TCP and Congestion control
Part 8 : TCP and Congestion control
 
Part 7 : HTTP/2, UDP and TCP
Part 7 : HTTP/2, UDP and TCPPart 7 : HTTP/2, UDP and TCP
Part 7 : HTTP/2, UDP and TCP
 

Último

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 

Último (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

BGP Advanced topics

  • 1. BGP : Advanced topics Olivier Bonaventure, UCLouvain, 2018
  • 2. Agenda • iBGP and the BGP Decision process • How to scale iBGP to large networks ? • BGP traffic engineering
  • 3. BGP in large networks • What happens when a network contains tens, hundreds or thousands of routers ? AS1 AS2 AS3 AS4 3
  • 4. How to distribute BGP routes in a large network ? AS1 AS2 AS3 eBGP iBGP
  • 5. IP addresses used on routers AS1 AS2 AS3 A /64 prefix belonging to the AS1, 2001:11:1:/64 A /64 prefix belonging to AS2, e.g. 2001:222:12:/64 A /64 prefix belonging to AS1, e.g. 2001:222:11:13:/64
  • 6. A closer look at the BGP messages AS1 AS2 2001:222:11:13::33 Prefix: p AS Path : AS3 BGP Nexhop : 2001:222:11:13::33 AS3 Prefix: p AS Path : AS3 BGP Nexhop : 2001:222:11:13::33 Prefix: p AS Path : AS1:AS3 BGP Nexhop : 2001:222:12::1234 2001:222:12::1234 p
  • 7. Endpoints of the eBGP sessions • eBGP sessions are TCP connections established between the IP addresses of the two routers on the peering link AS1 AS2 2001:222:11:13::33 AS3 2001:222:12::1234 2001:222:12::5678
  • 8. How to distribute BGP routes in a large network ? • Full mesh of iBGP sessions – Why ?
  • 9. Draw iBGP sessions in AS1 AS1 AS2 AS3 AS4
  • 10. Endpoints of the iBGP sessions • A router has several IP addresses, on which address should an iBGP session terminate ? – Any IP address belonging to the router • Address is associated to an interface, if the interface stops, iBGP session stops as well even if the router is still reachable over other interfaces – A loopback address • A software only interface that is always up and announced through the intradomain routing protocol so that it remains reachable as long as the router has one interface up • Best Current Practice
  • 11. How to deal with routers that are not connected to other ASes ? • Run BGP on these routers • Include them in iBGP full-mesh AS1 AS2 AS3
  • 12. How to deal with routers that are not connected to other ASes ? • Make sure that they wlll never have to forward a packet to an external destination • MPLS AS1 AS2 AS3
  • 13. What are the roles of the IGP ? • The intradomain routing protocol distributes information about the reachability of : – IP prefixes associated to internal links between routers of the AS – IP addresses associated to loopback interfaces or routers of the AS – IP prefixes associated to peering links between a router of this AS and another AS
  • 14. BGP Nexthop self • Helps to reduce # routes in the IGP AS1 AS2 2001:222:11:13::33 AS3 Prefix: p AS Path : AS3 BGP Nexhop : 2001:11:1001::1 Prefix: p AS Path : AS1:AS3 BGP Nexhop : 2001:222:12::1234 2001:11:1001::2 Prefix: p AS Path : AS3 BGP Nexhop : 2001:222:11:13::33 2001:11:1001::1 2001:222:12::1234
  • 15. The BGP decision process 1. Ignore routes having an unreachable BGP nexthop 2. Prefer routes having the highest local-pref 3. Prefer routes having the shortest AS-Path 4. Prefer routes having the smallest MED 5. Prefer routes learned via eBGP sessions over routes learned via iBGP sessions 6. Prefer routes having the closest next-hop 7. Tie breaking rules : prefer route learned from the router with lowest router id
  • 16. 1st step of BGP decision process • 1. Ignore routes having an unreachable BGP nexthop – Why would a BGP route contain an unreachable nexthop ?
  • 17. Unreachable nexthop • Usually a transient issue AS1 AS3 AS2
  • 18. 2nd step of BGP decision process • 2. Prefer routes having the highest local-pref – Implement routing policies • Prefer customer routes over shared-cost and provide routers – Support backup routes • Local-pref attribute to added by the import filter on eBGP session and distributed to all routers over iBGP sessions
  • 19. BGP routes towards prefix p on all routers inside AS1 AS1 R1 AS4 R2 R3 R4 R5 R6 p
  • 20. 3rd step of BGP decision process • 3. Prefer routes having the shortest AS-Path – Some operators believe that a BGP route with a long AS Path has a lower performance than a route with a longer AS Path • This is not always true…
  • 21. 5th step of BGP decision process • 5. Prefer routes learned via eBGP sessions over routes learned via iBGP sessions – Motivation : Hot potato routing • Routers should try to forward packets towards external destinations to another AS a quickly as possible
  • 22. 6th step of BGP decision process • 6. Prefer routes having the closest next-hop – Motivation : Hot potato routing • Routers should try to forward packets towards external destinations to another AS a quickly as possible
  • 23. BGP routes towards prefix p on all routers inside AS1 AS1 R1 AS4 R2 R3 R4 R5 R6 p
  • 24. BGP routes towards prefix p on all routers inside AS1 AS1 R1 AS4 R2 R3 R4 R5 R6 p AS2 AS3 AS5
  • 25. 4th step of BGP decision process • Prefer routes having the smallest MED • MED means Multi-Exit Discriminator – Motivation : Cold potato routing – Enable neighbour AS (usually customer) to indicate the best peering link to reach a given prefix
  • 26. BGP routes towards prefix p on all routers inside AS1 AS1 R1 AS4 R2 R3 R4 R5 R6 p
  • 27. BGP routes towards prefix p on all routers inside AS1 AS1 R1 AS4 R2 R3 R4 R5 R6 p AS2 AS3 IGP=7 IGP=2
  • 28. 7th step of the BGP decision process • 7. Tie breaking rules : prefer route learned from the router with lowest router id – Motivation : select a single best route towards each destination prefix • This best route is the route that can be advertised over eBGP session – Note that recent routers sometimes load balance (BGP Multipath) the traffic towards a given prefix over several routes (having the same BGP attributes)
  • 29. Differences between iBGP and eBGP – Which routes are advertised by a router over iBGP and eBGP sessions ? • Over an eBGP session, a router advertises its best route towards each destination prefix – Provided this advertisement is allowed by the export filter – At most one route per destination prefix • Over an iBGP session, a router advertises its best route towards each destination prefix provided that this best route was learned over an eBGP session – Since iBGP sessions are in full-mesh, there is no need to readvertise a route learned over another iBGP session
  • 30. Differences between iBGP and eBGP – Which filters are used over iBGP and eBGP sessions ? • Import and export filters are used over all eBGP sessions – Usually, there is a series of import filters attached to each peering link – Filters are usually implemented as modules that are combined together and associated to similar peering links (e.g. customer filter, provider filter, …) • No filter is applied on iBGP sessions
  • 31. Differences between iBGP and eBGP – What are the attributes carried by iBGP and eBGP • Prefix : iBGP and eBGP • AS Path : iBGP and eBGP – AS Path is updated when a BGP message is sent over an eBGP session • Local-pref : iBGP – Local-pref cannot be used on eBGP sessions • MED : iBGP and eBGP • Nexthop : iBGP and eBGP – Nexthop is updated when a BGP message is sent over an eBGP session
  • 32. What happens if iBGP sessions are missing ? AS1 R1 AS4 R4 R5 R6 p AS2 AS3 AS5 IGP=7
  • 33. What happens if iBGP sessions are missing ? AS1 R1 AS4 R4 R5 R6 p AS2 AS3 AS5
  • 34. What happens if iBGP sessions are missing ? AS1 R1 AS4 R4 R5 R6 p AS2 AS3 AS5
  • 35. Conclusion • BGP depends on the underlying intradomain routing protocol – Establishment of the iBGP sessions – Resolution of the BGP nexthop • iBGP and eBGP play different roles – eBGP over sessions with routers in other ASes – iBGP sessions (in full mesh) inside an AS • The BGP decision process ranks routes – Hot potato versus cold potato routing
  • 36. Reading list 1st edition, BGP section http://cnp3book.info.ucl.ac.be/network/networ k/#the-border-gateway-protocol J. Park et al, “BGP Route Reflection Revisited”, IEEE Communications Magazine, June 2012, http://irl.cs.ucla.edu/~j13park/rr-commag.pdf
  • 37. Agenda • iBGP and the BGP Decision process • How to scale iBGP to large networks ? • BGP traffic engineering
  • 38. Interactions between IGP and iBGP • What are the interactions between iBGP and the intradomain routing protocol ? – iBGP sessions are TCP connections whose endpoints are reachable thanks to IGP • Endpoints of iBGP sessions are usually loopback interfaces advertised in IGP – BGP Nexthops are reachable thanks to IGP – BGP decision process uses reachability and IGP cost towards BGP nexthop to rank routes
  • 39. Creation of iBGP sessions • How are iBGP sessions created on routers ? – Usually by manual configuration on each router group INTERNET2-IPv6 { type internal; local-address 2001:468:a::1; family inet6 { any; } export NEXT-HOP-SELF; peer-as 11537; neighbor 2001:468:1::1 { description ATLA; } ...
  • 40. Scaling issues with iBGP • In a network containing N routers – N*(N-1)/2 iBGP sessions need to be manually configured and maintained • Scalability issues – CPU usage to process and send iBGP messages • About 600k routes on IPv4 Internet today – Number of iBGP sessions on each router • TCP state, BGP Keepalives, … – Memory consumption • ADJ-RIB-IN, ADJ-RIB-OUT, ...
  • 41. Improving iBGP scaling • Two approaches – Route Reflectors • A RR is a special iBGP router that is allowed, under specific conditions, to advertise over iBGP sessions routes learned over other iBGP sessions – BGP confederations • A large AS is divided in smaller (sub-)ASes containing a few tens of routers in iBGP full mesh. The sub-ASes use eBGP to exchange BGP routes
  • 42. How to design an iBGP hierarchy • A RR has two types of iBGP neighbours RR1 R6R1 R8 R9 Client sessions Non-Client sessions
  • 43. Operation of Route Reflectors • Reception of a new route – Run BGP decision process on RR – If best route has changed • If best route was learned from eBGP session – Advertise the best route to all iBGP sessions • If best route was learned from an iBGP client session – Advertise the best route to all iBGP sessions (clients and non- clients) • If best route was learned from a non-client iBGP session – Advertise the best route to all client iBGP sessions (non-client sessions are assumed to be in full-mesh and will also receive the new route from their own iBGP session)
  • 44. Benefits of using RRs • Simplified configuration – A new router can be easily added to the network • Reduced memory and CPU usage on routers – Each router maintains fewer iBGP sessions – Route Reflectors do not announce all routes to their BGP clients, reducing their memory usage – Route Reflectors are often specialised devices with faster CPU and memory that only run BGP and IGP but do not forward regular packets
  • 45. Caveats with Route Reflectors • Route reflectors hide routes to iBGP clients – A RR only advertises its best route towards each prefix over a given iBGP session – A RR runs the BGP decision process on the basis of its IGP routing table • iBGP clients could select a different best route than their RR • Route reflectors can increase convergence time after failures
  • 46. Caveats with Route Reflectors • Since RRs advertise iBGP learned routes over iBGP sessions, a badly configured iBGP topology may cause loops RR1 R6R1 RR3 RR2
  • 47. How to prevent loops • BGP Route Reflection introduces two new iBGP attributes – ORIGINATOR_ID • Set to the router id of the router that injects a route in iBGP – CLUSTER_LIST • When a RR receives a route, it checks whether its router id is included in the CLUSTER_LIST. If yes, the route is rejected. • When a RR sends a route over an iBGP session, it adds its router id to the CLUSTER_LIST
  • 48. Fault tolerance • If a Route Reflector fails, a large number of BGP routers will be affected and lose BGP routes • How to mitigate this problem ? – Use redundant route reflectors that are deployed in pairs – Each BGP router is attached to at least two different RRs
  • 49. Fault tolerance • In practice, each BGP router is usually attached to two RRs that are close to itself in the IGP topology RR1 R6 R1 RR3 RR2
  • 50. Route Reflectors • What are the routes learned if R3 acts as RR for the entire AS1 ? AS1 R1 AS4 R2 R3 R4 R5 R6 p
  • 51. Route Reflectors • What are the routes learned if both R3 and R5 act as RR for the entire AS1 ? AS1 R1 AS4 R2 R3 R4 R5 R6 p
  • 52. Which routes are selected ? AS1 R1 AS4 R2 R3 R4 R5 R6 p AS2 AS3 AS5
  • 53. What is the best place for a single RR ? AS1 R1 AS4 R2 R3 R4 R5 R6 p AS2 AS3 AS5
  • 54. What is the best location for two RR ? AS1 R1 AS4 R2 R3 R4 R5 R6 p AS2 AS3 AS5
  • 55. Hierarchy of Route Reflectors AS1 R1 R2 R3 R4 R5 R6 R7 R8 R9 RA RB p AS2 AS3 AS5
  • 56. What are the forwarding paths towards p advertised by AS6 ? R5 R6 AS6 R1 R3 C=1C=1 C=1 C=5
  • 57. Agenda • iBGP and the BGP Decision process • How to scale iBGP to large networks ? • BGP traffic engineering
  • 58. Prefer customer, ... AS1 R1 R2 R3 R4 R5 R6 AS2 AS3 AS4 AS5 AS6 AS7 $ $ $ $ $ =
  • 59. Forwarding paths from AS7 to AS8 and vice-versa AS1 R1 R2 R3 R4 R5 R6 AS7 AS8
  • 60. Customer wants packets towards p1 via R2 and p2 via R5 AS1 R1 R2 R3 R4 R5 R6 AS7 Customer p1 p2
  • 61. Fun with MED • iBGP full mesh R5 R6 AS4 AS5AS6 R1 R2 R3 C=4 C=2 C=1 C=1 MED=0MED=1 p MED=0
  • 62. Fun with MED (2) • With RRs R5 R6 AS4 AS5AS6 R1 R2 R3 C=4 C=2 C=1 C=1 MED=0MED=1MED=0 p
  • 63. Incoming traffic engineering • How can a customer distribute the load on its links ? – one third of traffic on each link ? ISP R1 R2 R3 R4 R5 R6 Customerp
  • 68. Backup links • How can an ISP provide backup services to its customers ? ISP R1 R2 R3 R4 R5 R6
  • 69. BGP Communities • BGP Communities can be attached to BGP routes in import filter – To indicate geographical location – To indicate type of BGP session – … • BGP Communities can be attached to BGP routes in export filter – To request neighbour AS to treat the route in a specifix way
  • 70. How to provide restricted transit ? ISP R1 R2 R3 R5 R6 Customer1 Customer3 Customer2
  • 71. How to provide richer customer policies ? • Customer wants to receive packets from US via AS1 and from Europe via AS2 R1 R2 R3 R5 R6 CustomerAS1 AS2
  • 72. AS-Path length is not always a synonym of path quality • How to prefer AS1 in US, AS2 in Europe ISP R1 R2 R3 R5 R6 AS1 AS2
  • 73. Things to remember when defining BGP policies • Any tweaking you do could affects scalability Source http://bgp.potaroo.net/tools/asn32
  • 74. Size of IPv6 routing tables Source http://bgp.potaroo.net/v6/as6447/
  • 75. Size of IPv4 BGP routing tables Source http://bgp.potaroo.net/as6447/
  • 76. BGP communities • Are by default transitive.. • Any BGP community that you add when receiving routes will be advertised all over the Internet – you should clean your BGP communities when advertising routes over eBGP, but router configuration languages do not always make this easy
  • 77. Existing BGP communities • Sprint – https://www.sprint.net/index.php?p=policy_bgp – Looking glass https://www.sprint.net/lg/lg_start.php • Level3 – http://www.scn.rain.com/~neighorn/PDF/Traffic_Engineeri ng_with_BGP_and_Level3.pdf • NTT America – https://www.us.ntt.net/support/policy/routing.cfm • Internet2 – https://noc.net.internet2.edu/i2network/maps- documentation/documentation/bgp-communities.html
  • 78. References • K. Fster, Application of BGP Communities, The Internet Protocol Journal - Volume 6, Number 2, July 2003 • B. Donnet and O. Bonaventure. On BGP Communities. ACM SIGCOMM Computer Communication Review, 38(2):55-59, April 2008. – http://inl.info.ucl.ac.be/publications/bgp-communities • B. Quoitin, S. Uhlig, C. Pelsser, L. Swinnen and O. Bonaventure. Interdomain traffic engineering with BGP. IEEE Communications Magazine Internet Technology Series, 41(5):122-128, May 2003. – http://inl.info.ucl.ac.be/publications/interdomain-traffic- engineering-bgp