SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Cisco Live Milan 2015 - BGP advance
Cisco Live Milan 2015 - BGP advanceCisco Live Milan 2015 - BGP advance
Cisco Live Milan 2015 - BGP advanceBertrand Duvivier
 
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
 
Juniper mpls best practice part 1
Juniper mpls best practice   part 1Juniper mpls best practice   part 1
Juniper mpls best practice part 1Febrian ‎
 
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
 
VXLAN BGP EVPN: Technology Building Blocks
VXLAN BGP EVPN: Technology Building BlocksVXLAN BGP EVPN: Technology Building Blocks
VXLAN BGP EVPN: Technology Building BlocksAPNIC
 
Deploy MPLS Traffic Engineering
Deploy MPLS Traffic EngineeringDeploy MPLS Traffic Engineering
Deploy MPLS Traffic EngineeringAPNIC
 
Troubleshooting BGP
Troubleshooting BGPTroubleshooting BGP
Troubleshooting BGPDuane Bodle
 
Juniper MPLS Tutorial by Soricelli
Juniper MPLS Tutorial by SoricelliJuniper MPLS Tutorial by Soricelli
Juniper MPLS Tutorial by SoricelliFebrian ‎
 

Tendances (20)

Bgp
BgpBgp
Bgp
 
Bgp protocol
Bgp protocolBgp protocol
Bgp protocol
 
BGP
BGPBGP
BGP
 
IS-IS Protocol Introduction
IS-IS Protocol IntroductionIS-IS Protocol Introduction
IS-IS Protocol Introduction
 
Border Gatway Protocol
Border Gatway ProtocolBorder Gatway Protocol
Border Gatway Protocol
 
Cisco Live Milan 2015 - BGP advance
Cisco Live Milan 2015 - BGP advanceCisco Live Milan 2015 - BGP advance
Cisco Live Milan 2015 - BGP advance
 
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]
 
Juniper mpls best practice part 1
Juniper mpls best practice   part 1Juniper mpls best practice   part 1
Juniper mpls best practice part 1
 
BGP
BGP BGP
BGP
 
bgp protocol
 bgp protocol bgp protocol
bgp protocol
 
How BGP Works
How BGP WorksHow BGP Works
How BGP Works
 
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
 
IS-IS vs OSPF
IS-IS vs OSPFIS-IS vs OSPF
IS-IS vs OSPF
 
bgp(border gateway protocol)
bgp(border gateway protocol)bgp(border gateway protocol)
bgp(border gateway protocol)
 
VXLAN BGP EVPN: Technology Building Blocks
VXLAN BGP EVPN: Technology Building BlocksVXLAN BGP EVPN: Technology Building Blocks
VXLAN BGP EVPN: Technology Building Blocks
 
Bgp (1)
Bgp (1)Bgp (1)
Bgp (1)
 
Deploy MPLS Traffic Engineering
Deploy MPLS Traffic EngineeringDeploy MPLS Traffic Engineering
Deploy MPLS Traffic Engineering
 
Cisco ospf
Cisco ospf Cisco ospf
Cisco ospf
 
Troubleshooting BGP
Troubleshooting BGPTroubleshooting BGP
Troubleshooting BGP
 
Juniper MPLS Tutorial by Soricelli
Juniper MPLS Tutorial by SoricelliJuniper MPLS Tutorial by Soricelli
Juniper MPLS Tutorial by Soricelli
 

Similaire à 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
 
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
 
Segment Routing Session#1.pdfSegment Routing Session#1.pdf
Segment Routing Session#1.pdfSegment Routing Session#1.pdfSegment Routing Session#1.pdfSegment Routing Session#1.pdf
Segment Routing Session#1.pdfSegment Routing Session#1.pdfAhMEd22627
 
Segment Routing Session#2.pdfSegment Routing Session#2.pdf
Segment Routing Session#2.pdfSegment Routing Session#2.pdfSegment Routing Session#2.pdfSegment Routing Session#2.pdf
Segment Routing Session#2.pdfSegment Routing Session#2.pdfAhMEd22627
 

Similaire à 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)
 
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
 
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
 
Segment Routing Session#1.pdfSegment Routing Session#1.pdf
Segment Routing Session#1.pdfSegment Routing Session#1.pdfSegment Routing Session#1.pdfSegment Routing Session#1.pdf
Segment Routing Session#1.pdfSegment Routing Session#1.pdf
 
Segment Routing Session#2.pdfSegment Routing Session#2.pdf
Segment Routing Session#2.pdfSegment Routing Session#2.pdfSegment Routing Session#2.pdfSegment Routing Session#2.pdf
Segment Routing Session#2.pdfSegment Routing Session#2.pdf
 

Plus de Olivier Bonaventure

Plus 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
 

Dernier

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
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
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 

Dernier (20)

+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...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
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
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 

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