external routing bgp
TRANSCRIPT
-
8/3/2019 External Routing BGP
1/91
1
COLE POLYTECHNIQUEFDRALE DE LAUSANNE
BGPJeanYves Le Boudec
Fall 2009
Self-Organization
1
-
8/3/2019 External Routing BGP
2/91
2
Contents
A. What InterDomain Routing does
.
2. PolicyRouting
3. RouteAggregation
B. How BGP works
1. Howitworks
2. InteractionBGPIGPPacketForwarding
3. OtherBells
and
Whistles
C. Examples
D. Illustrations and Statistics
2
-
8/3/2019 External Routing BGP
3/91
3
A. WhatBGPDoes
1.Inter
Domain
Routing
Whyinvented?
Hierarchical routing is used
theInternetissplitintoDomains,orAutonomousSystems
withOSPF:largedomainsaresplitintoAreas
Routing protocols are saidinterior:(InternalGatewayProtocols,IGPs):insideASs:
RIP,OSPF(standard),IGRP(Cisco)
exterior:betweenASs:
3
EGP(old)andBGP1toBGP4(today),IDRP(tomorrow,maybe)
-
8/3/2019 External Routing BGP
4/91
4
WhatisanARD?AnAS?
ARD = Autonomous Routing Domain= routing domain under one single administration
oneormoreborderrouters
allsubnetworksinsideanARDshouldbeconnected
shouldlearnaboutothersubnetworkprefixes theroutingtablesofinternalroutersshouldcontainentriesofalldestinationoftheInternet
AS = Autonomous System= ARD with a number (AS number)
ASnumberis16bits
public:1
64511
private:64512 65535
ARDs that are do not need a number are typically those with default route tothe rest of the world
4
AS1942 CICGGRENOBLE,AS2200 Renater
AS559 SWITCHTeleinformaticsServices
AS5511 OPENTRANSIT
EPFL:oneARD,nonumber
-
8/3/2019 External Routing BGP
5/91
5
thefigureshowsthreedomains,orARDs.
ARDscanbetransit BandD stub A ormultihomed C .Onl nonstub
domainsneedanASnumber.
ARD D
D1area 0
C2
C1
IGRPA2
A1
A4 BGP-4
BGP-4
OSPF BGP-4
BGP-4 D2
D3D4
D6OSPF
area 2
area 1
D5
5
ARD C
C3B2
B4
B3
A3
Autonomous Routing Domain A
ARD B
-
8/3/2019 External Routing BGP
6/91
6
WhatdoesBGPdo?
WhatdoesBGPdo?
.
paths from one router in one ARD to any network prefix
anywhere in the world
There are only two levels for BGP :
Interdomain
withindomain
6
The method of routing is
Pathvector
Withpolicy
-
8/3/2019 External Routing BGP
7/91
7
PathVectorRouting
What is the requirement ?Findbestroutes,inasensethatcanbedecidedbyeveryARDusingtheirowncriteria
How does it work ?
anIPprefixexample:BA:n1
everyASusesitsownrulesfordecidingwhichpathisbetterBGPtable keepsarecordofbestpathstoalldestinationsASannouncesonlythebestpathsitknows
Q. Explain how E can choose the best paths to n1 and n2 ?
Q. How can loo s be avoided ? solution
B
En1, n2
A:n1,n2
B A:n1,n2
B:n5 dest AS path
n1 B A
n2 B A
n3 D C
n4 D
a e nn5
n4
7
A
CA:n1,n2
C A:n1,n2
C:n3
D
D C A:n1,n2
D C: n3
D: n4
n5 B
n3
-
8/3/2019 External Routing BGP
8/91
8
BorderGateways,E andIBGP
A router that runs BGP is called a BGP speakerAt the boundary between 2 ARDs there are 2 BGP speakers, one in eachdomain
Q:comparetoOSPF
Inside one ARD there are usually several BGP speakers
Theyalltalktoeachother,toexchangewhattheyhavelearnt
UsingInternalBGP(IBGP)
Over TCPconnections,fullmeshcalledtheBGPmesh
mesharenotrepeatedinsidethemesh
D1 D2A B
C D
X:n1 X:n1
A->C: D1 X:n1
E-BGP
8
D4 D5
D3
G H
E F
C->E: D1 X:n1
E->G: D3 D1,X:n1
E-BGP
I-BGP
-
8/3/2019 External Routing BGP
9/91
9
Q1: Which of the following announcements do you think router D willsend to router E ?1. D>E: D2X:n1
2. D>E: D1X:n1
A:1only;2cannotbesentbecauseoverIBGPwedonotrepeataroutelearntromanot er spea er nt esame
Q2: Assume that in the figure below the router R does notrun BGP. Is thispossible ?A: yes.
A: no; C and F are not directly connected (are not onlink)
D1 D2A B
X:n1 X:n1
E-BGPsolution
9
D4 D5
D3
G H
E F
E-BGP
I-BGP R
-
8/3/2019 External Routing BGP
10/91
10
2.PolicyRouting
Whyinvented?
Interconnection of ASs is selforganized
pointtopointlinksbetweennetworks:ex: EPFLtoSwitch,Switchto
Telianet
interconnectionpoints:NAP(NetworkAccessPoint),MAE(Metropolitan
AreaEthernet),CIX(CommercialInterneteXchange),GIX(GlobalInternet
eXchange),
IXP,
SFINX,
LINXMainly 3 types of relations, depending on money flows
customer:EPFLiscustomerofSwitch.EPFLpaysSwitch
provider:SwitchisproviderforEPFL;SwitchispaidbyEPFL
10
peer:EPFLandCERNarepeers:costsofinterconnectionisshared
thetypeofrelationisnegotiatedinbilateralagreements
thereisnoarchitecturerule,justbusiness
-
8/3/2019 External Routing BGP
11/91
11
WhatistheGoalofPolicyRouting?
Example:
,
ISP2andISP3
ISP3 ISP1isalocal,inexpensivelink
CiiscustomerofISPi,ISPsarepeers
It is advantageous for ISP3 to send traffic toISP 1
ISP 3 ISP 2
n v a
ISP1 does not agree to carry traffic from C3to C2
ISP1offersatransitservicetoC1andanon
transitservicetoISP2andISP3
C1
C2C3
n2
11
The goal of policy routing is to support
this and other similar requirementsprovider
customerpeers
-
8/3/2019 External Routing BGP
12/91
12
HowdoesPolicyRoutingWork?
Policy routing is implemented by rules imposed to BGP
routers inside an AS, who may
modifytheattributesthatcontrolwhichpathispreferred
(seelater)
Example
ISP1announcestoISP3allnetworksofC1 sothatC1canISP 1
ISP 3 ISP 2
bereachedbyallsourcesintheworld
ISP1
announces
to
C1
all
routes
it
has
learnt
from
ISP3
and
ISP2 sothatC1cansendtraffictoalldestinationsinthe
world
ISP2announcesISP2n2toISP3andISP1;assumethat
C1
C2C3
n2n3
12
.
ISP3hastworouteston2:ISP2n2andISP1ISP2n2;
assumethatISP3givespreferencetothelatter
packetsfromn3ton2areroutedviaISP1 undesired
solution:ISP1announcestoISP3onlyroutestoISP3s
customers
-
8/3/2019 External Routing BGP
13/91
13
TypicalPolicyRoutingRules
Provider (ISP1) to customer (C1)
announceallrouteslearntfromotherISs
importonlyroutesthatbelongtodomainC1
example:importfromEPFLonlyoneroute
128.178/15
Customer (C1) to Provider (ISP1)
announceallroutesthatbelongtodomainC1ISP 1
ISP 3 ISP 2
importallroutes
Peers (ISP1 to ISP3)
announceonlyroutestoallcustomersofISP1
importonlyroutestoISP3scustomerC1
C2C3
13
agreement
The rules are defined by every AS (self
organization) and implemented in all BGP
speakers in one AS
-
8/3/2019 External Routing BGP
14/91
14
3.Aggregation
Domains that do not have a default route (i.e. all transit ISPs)
inIProutingtablesunlessdefaultroutesareused
inBGPannouncements
Aggregation is a way to reduce the number of routes
14
-
8/3/2019 External Routing BGP
15/91
15
AggregationExample1
193.212.0.0/24
AS2
AS3 AS4
193.212.1.0/24
193.212.0.0/23 193.212.0.0/23
Assume AS3 aggregates the routes received from AS1 and AS2AS1:193.212.0.0/24 AS_PATH:1
AS2:193.212.1.0/24 AS_PATH:2
AS3:193.212.0.0/23 AS_PATH:3{12}
15
. . . _
-
8/3/2019 External Routing BGP
16/91
16
AggregationExample2
197.8.2.0/24
AS2
AS3 AS4
197.8.3.0/24
197.8.2.0/23
197.8.3.0/24
197.8.2.0/23
n2= 197.8.3.0/24
n4
AS4 receives197.8.2.0/23 AS_PATH: 3 {1 2}
197.8.3.0/24 AS_PATH: 2
and assume that AS4 exports only the first route (aggregation is done)
But assume both routes are injected into AS4s local routing tables; Q:
16
what happens to packets from n4 to n2 ?
If AS4 injects only the aggregate route into its local routing tables, whatis the answer now ?solution
-
8/3/2019 External Routing BGP
17/91
17
ExampleWithoutAggregation
197.8.2.0/24 197.8.2.0/23 197.8.2.0/23
AS2
AS3 AS4
197.8.3.0/24
197.8.3.0/24
197.8.2.0/24
197.8.3.0/24
197.8.2.0/24
197.8.3.0/24
Q: If AS3 does not aggregate, what are the routesannounced by AS 4 ? Is there any benefit ?
solution
17
-
8/3/2019 External Routing BGP
18/91
18
Morale
Aggregation should be performed whenever possible
whenallaggregatedprefixeshavethesamepathbeforetheaggregation
point(example2)
An AS can decide to
Aggregateseveralrouteswhenexportingthem
Butstill
maintain
different
routing
entries
inside
its
domain
(example
2)
18
-
8/3/2019 External Routing BGP
19/91
19
B.BGP(BorderGatewayProtocol)
1.Howitworks,FundamentalExamples
BGP4, RFC 1771
rou ers a oeac o erover connec ons
Maintainadjacencytopeers(overTCPconnection):open,keepalive
Transmitonlymodifications
How a BGP router works (see also next slide)
Receives routesfromneighbours
Accepts/rejectsthem(importpolicy)
Processesattributes
Stores
in
Adj
RIB
in
(one
per
BGP
peer,
internal
or
external)Appliesdecisionprocess andstoresresultsinLocRIB (globaltoBGPspeaker)(=decideswhichroutestoacceptamongallpresentinthedifferentAdjRIBins)
Foreverysubnetworkprefix,atmost1route isselectedSendstoneighbours
Decideswhethertosendornot(exportpolicy)
19
Aggregatemultipleroutesintoone,ifapplicable
StoreresultinAdjRIBout(oneperBGPpeer)andsendtoneighbour
OnlyrouteslearntfromEBGParesenttoanIBGPneighbour
SendsupdateswhenAdjRIBoutchanges
Writeforwardingentries initsroutingtable,eitherdirectlyorbyredistributionintoIGP;thisisexplainedindetailinSection2.
-
8/3/2019 External Routing BGP
20/91
20
InsideBGP
One BGP Router
up a es n up a es ou
Adj-RIB-in
Import Policy
Decision
Process:
Ex ort - -- -
Adj-RIB-outLoc-RIB
IGP
Write forwarding
entries
one es
route /
destination
Policy
Internal routes
20
TableStatic Configuration
-
8/3/2019 External Routing BGP
21/91
21
Routes,RIBs,RoutingTable
The records sent in BGP messages are called Routes. Routes + theirattributes are stored in the AdjRIBin, LocRIB, AdjRIBout.
destination(subnetworkprefix)
pathtothedestination(ASPATH)
Attributes
WellknownMandatory
ORIGIN(routelearntfromIGP,BGPorstatic)
NEXTHOP
Wellknown
Discretionary
LOCALPREF(seelater)
ATOMICAGGREGATE(=routecannotbedisaggregated)
OptionalTransitive
MULTIEXITDISC(MED)(seelater)
21
OptionalNontransitive
WEIGHT(seelater)
In addition, like any IP host or router, a BGP router also has a RoutingTable = IP forwarding table
Usedforpacketforwarding,inrealtime
ThisisnotthesameasaRIB,wewillseetheinteractionlater
-
8/3/2019 External Routing BGP
22/91
22
TheDecisionProcess
The decisionprocess decides which route is selected;its output is written into LocRIB
At most one best route to exactly the same prefix ischosen
Onlyonerouteto2.2/16canbechosen
Buttherecanbedifferentroutesto2.2.2/24and2.2/16
Routes are com ared a ainst each other usin thefollowing sequence of criteria, until only one route
remains:0. Highestweight(Ciscoproprietary)
1. HighestLOCALPREF
2. ShortestASPATH
22
3. LowestMED,iftakenseriouslybythisnetwork
4. EBGP>IBGP
5. ShortestpathtoNEXTHOP,accordingtoIGP
6. LowestBGPidentifier
-
8/3/2019 External Routing BGP
23/91
23
FundamentalExamples
AS xI-BGP
R4
R1
10.1/16 AS=(y)
10.2/16 AS=(y)
10.1/16 AS=(y)
10.2/16 AS=(y)E-BGP E-BGP
R3
1.1.1.1 2.2.2.2
1.1.1.2 2.2.2.1
AS y
10.1/16 10.2 16
Skrivawarandaol
23
In this simple example there are 4 BGP routers. They communicate directly orindirectly via EBGP or IBGP, as shown on the figure.
There are 2 ASs, x and y. We do not show the details of the internals of y. R3 and R4send the BGP messages shown.
In the next slide, we show only the following attributes in the RIBs: destination,path, NEXTHOP
-
8/3/2019 External Routing BGP
24/91
24
R1 has the following RIBs, initially empty:Adj-RIB-In from R3Adj-RIB-In from R2Loc-RIBAdj-RIB-Out to R3
Adj-RIB-Out to R2R1 receives from R3 two announcements, made ofthe routes 10.1/16 AS=(y) and 10.2/16AS=(y). R1 associates the NEXTHOP attribute
R1 prepares to send these new routes to all its IBGP peers by writing them into AdjRIBOut toR2:
Adj-RIB-In from R310.1/16 AS=y NEXT-HOP=1.1.1.210.2/16 AS=y NEXT-HOP=1.1.1.2
Adj-RIB-In from R2Loc-RIB
1.1.1.2 to these routes and writes them in its AdjRIBIn:Adj-RIB-In from R3
10.1/16 AS=y NEXT-HOP=1.1.1.210.2/16 AS=y NEXT-HOP=1.1.1.2
Adj-RIB-In from R2Loc-RIBAdj-RIB-Out to R3Adj-RIB-Out to R2
R1 a lies its decision rocess, and selects both
. - . . .10.2/16 AS=y NEXT-HOP=1.1.1.2
Adj-RIB-Out to R3Adj-RIB-Out to R2
10.1/16 AS=y NEXT-HOP=1.1.1.210.2/16 AS=y NEXT-HOP=1.1.1.2
Since AdjRIBOut to R2 changed, a BGP messageis sent to R2
Similarly, at some time R1 will receive from R2 a=
routes:Adj-RIB-In from R3
10.1/16 AS=y NEXT-HOP=1.1.1.210.2/16 AS=y NEXT-HOP=1.1.1.2Adj-RIB-In from R2Loc-RIB
10.1/16 AS=y NEXT-HOP=1.1.1.210.2/16 AS=y NEXT-HOP=1.1.1.2
Adj-RIB-Out to R3Adj-RIB-Out to R2
.
NEXT-HOP=2.2.2.1 and 10.2/16 AS=y NEXT-HOP=2.2.2.1:
Adj-RIB-In from R310.1/16 AS=y NEXT-HOP=1.1.1.210.2/16 AS=y NEXT-HOP=1.1.1.2
Adj-RIB-In from R210.1/16 AS=y NEXT-HOP=2.2.2.110.2/16 AS=y NEXT-HOP=2.2.2.1
Loc-RIB
24
R1 prepares to send these new routes to all its EBGP peers by writing them into AdjRIBOut.However, the message is not sent to R3 as itwould create a loop in the ASpath.
10.1/16 AS=y NEXT-HOP=1.1.1.210.2/16 AS=y NEXT-HOP=1.1.1.2
Adj-RIB-Out to R3Adj-RIB-Out to R2
10.1/16 AS=y NEXT-HOP=1.1.1.210.2/16 AS=y NEXT-HOP=1.1.1.2
-
8/3/2019 External Routing BGP
25/91
25
R1 applies again its decision process. Now ithas several possible routes to each prefix.The first applicable rule in the decision
process (slide The Decision Process) saysthat if a route is learnt from EBGP it hasprecedence over a route learnt from IBGP.Since all routes in Adj-RIB-In from R2 arelearnt from IBGP and all routes in Ad -RIB-In from R3 are learnt from EBGP, thewinners are the latter, so there is no changein Loc-RIB:
Adj-RIB-In from R310.1/16 AS=y NEXT-HOP=1.1.1.210.2/16 AS=y NEXT-HOP=1.1.1.2
Adj-RIB-In from R210.1/16 AS=y NEXT-HOP=2.2.2.1
. =y - = . . .Loc-RIB
10.1/16 AS=y NEXT-HOP=1.1.1.210.2/16 AS=y NEXT-HOP=1.1.1.2
Adj-RIB-Out to R3Adj-RIB-Out to R2
10.1/16 AS=y NEXT-HOP=1.1.1.210.2/16 AS=y NEXT-HOP=1.1.1.2
Since there is no change in Loc-RIB there is
25
no change in Adj-RIB-Out and therefore nomessage is sent by R1.
-
8/3/2019 External Routing BGP
26/91
26
AS x I-BGP R21 I-BGP
I-BGP
FundamentalExamples,continued
R4
R1
10.1/16 AS=(y)10.2/16 AS=(y)
E-BGP E-BGP
R3
1.1.1.1 2.2.2.2
1.1.1.2 2.2.2.1
3.3.3.1
3.3.3.2
10.2/16 AS=(y)
AS y
10.1/16 10.2 16
26
.TCP connections with each other (same in AS y, but not shown on figure).
An IGP (for example OSPF) also runs on R1, R21 and R22. All link costs are equal to 1.
The announcements made by R3 and R4 are different, as shown on the figure.
-
8/3/2019 External Routing BGP
27/91
27
Here is a possible sequence of messages and the resultingstates of RIBs, at R1, after message is processed:
R1 receives message 10.1/16 AS=(y) from R3 over E_BGP:Adj-RIB-In from R3
10.1/16 AS=y NEXT-HOP=1.1.1.2
Adj-RIB-In from R22Adj-RIB-In from R21Loc-RIB
10.1/16 AS=y NEXT-HOP=1.1.1.2Adj-RIB-Out to R3Adj-RIB-Out to R22
- -
Assume R21 also received the EBGP messages shown onthe figure and did its job. R1 receives message 10.2/16AS=y, NEXT-HOP=3.3.3.1 from R21 over IBGP:Adj-RIB-In from R3
10.1/16 AS=y NEXT-HOP=1.1.1.2
Adj-RIB-In from R2210.2/16 AS=y, NEXT-HOP=2.2.2.1
Adj-RIB-In from R2110.2/16 AS=y, NEXT-HOP=3.3.3.1
Loc-RIB10.1/16 AS=y NEXT-HOP=1.1.1.2
- -
R1 applies its decision process, accepts the route andsends it to R22 and R21Adj-RIB-In from R3
10.1/16 AS=y NEXT-HOP=1.1.1.2Adj-RIB-In from R22Adj-RIB-In from R21Loc-RIB
10.1/16 AS=y NEXT-HOP=1.1.1.2Adj-RIB-Out to R3Adj-RIB-Out to R22
10.1/16 AS=y NEXT-HOP=1.1.1.2Adj-RIB-Out to R21
10.1/16 AS= NEXT-HOP=1.1.1.2
. = - = . . .Adj-RIB-Out to R3Adj-RIB-Out to R22
10.1/16 AS=y NEXT-HOP=1.1.1.2Adj-RIB-Out to R21
10.1/16 AS=y NEXT-HOP=1.1.1.2
The decision process now has to choose between tworoutes with same destination prefix 10.2/16. Both werelearnt from IBGP, so we apply criterion 5 in slide TheDecision Process.The distance, computed by the IGP, to 2.2.2.1 is 3 and thedistance to 3.3.3.1 is 2. Thus the route that has NEXT-
Assume R22 also received the EBGP messages shown onthe figure and did its job. R1 receives message 10.2/16
AS=y, NEXT-HOP=2.2.2.1 from R22 over IBGP, and thedecision process accepts it:
Adj-RIB-In from R310.1/16 AS=y NEXT-HOP=1.1.1.2
Adj-RIB-In from R2210.2/16 AS=y, NEXT-HOP=2.2.2.1
Adj-RIB-In from R21Loc-RIB
10.1/16 AS= NEXT-HOP=1.1.1.2
. . .Adj-RIB-In from R3
10.1/16 AS=y NEXT-HOP=1.1.1.2Adj-RIB-In from R22
10.2/16 AS=y, NEXT-HOP=2.2.2.1Adj-RIB-In from R21
10.2/16 AS=y, NEXT-HOP=3.3.3.1Loc-RIB
10.1/16 AS=y NEXT-HOP=1.1.1.210.2/16 AS=y NEXT-HOP=3.3.3.1
Adj-RIB-Out to R3Adj-RIB-Out to R22
10.1/16 AS=y NEXT-HOP=1.1.1.2Adj-RIB-Out to R21
27
10.2/16 AS=y NEXT-HOP=2.2.2.1Adj-RIB-Out to R3Adj-RIB-Out to R22
10.1/16 AS=y NEXT-HOP=1.1.1.2Adj-RIB-Out to R21
10.1/16 AS=y NEXT-HOP=1.1.1.2
Since the new message is learnt from IBGP it is not putinto any AdjRIBOut
10.1/16 AS=y NEXT-HOP=1.1.1.2
Since the new message is learnt from IBGP it is not putinto any AdjRIBOut.
-
8/3/2019 External Routing BGP
28/91
28
Questions
What is the difference between IBGP and IGP ?
What is the difference between IBGP and EBGP ?
What is the difference between a RIB and a Routing Table ?
28
-
8/3/2019 External Routing BGP
29/91
29
Howareroutesinjectedinto BGP
BGP propagates route information, but how is this
Two methods
Staticconfiguration:tellthisBGProuterwhicharetheprefixesownedby
thisdomain
ImportfromIGP:tellthisroutertocopyalltheprefixesthattheIGPhas
earn
AssumestheIGPeitherdoesnotpropagateexternalprefixes,orhasawayto
differentiatethem
SuchroutesaresenttoEBGPneighboursonly,withORIGIN=IGP
29
-
8/3/2019 External Routing BGP
30/91
30
2.HowForwardingEntrieslearntbyBGParewritten
intoRoutingTables
So far, we have seen how BGP routers learn about all the
.
routers in their AS about these prefixes ( write forwarding
entries in slide Inside BGP ). This is the topic of this
section.
There are two possible ways for this, usually mutually
exc us ve:
Redistribution: routes learnt by BGP are passed to IGP (ex:OSPF)
CalledredistributionofBGPintoOSPF
OSPF ro a atestheroutesusin t e4LSAstoallroutersinOSPFcloud
30
Notfoundmuchinpractice
Injection: routes learnt by BGP are written into the forwarding
table of this router
Routesdonotpropagate;thishelpsonlythisrouter
-
8/3/2019 External Routing BGP
31/91
31
RedistributionExample
AS xE-BGPR5 R6
AS z
R5 advertises 18.1/16 to R6 via EBGP E-BGP
R1
R218.1/16 I-BGP
IGP(OSPF)
IGP(OSPF)
2.2.2.2
AS y
R6 transmits it to R2 via IBGPTCPconnectionbetweenR6andR2
(redistributeBGPintoIGP) R6 injects 18.1/16 into IGP(OSPF)
OSPFpropagates18.1/16(type4LSA)andupdatesforwardingtables
AfterOSPFconver es,R1,R2nowhavearouteto18.1/6R2
R4
31
advertisesroutetoR4viaEBGP
(synchronize with IGP) R2 must wait for the OSPF entryto 18.1/6 before advertising via EBGP
Packet to 18.1/16 from AS y finds forwarding tableentries in R2, R1 and R6
-
8/3/2019 External Routing BGP
32/91
32
ExamplewithReDistributionby
___,
F
learns
from
G
the
route
D2
D1
n1
CredistributestheexternalrouteD2:n2intoOSPF
y____, earns erou e :n ; y____ earns erou e :n ;
selectsD2:n2anddoesnotredistributeittoOSPF
by___,BlearnstherouteD2:n2
by___,AlearnstherouteDX:D2:n2
by___,Llearnstherouteton2viaC
D1 = EPFL D2 = UCB
n1
D1: n1
n2
A C
FD2 : n2
G
32
DX DYD2 : n2DY D2: n2
D1: n1B
D EL
physical link
TCP connectionsolution
-
8/3/2019 External Routing BGP
33/91
33
ReDistributionisConsideredHarmful
In practice, operators avoid redistribution of BGP into IGP
ConvergencetimeafterfailuresislargeifIGPhasmanyroutingtableentries
Therefore, injection is used instead
Injection assumes that routers in the AS employ recursivetable
lookup
WhenIPpacketissubmittedtorouter,theforwardingtablemayindicatea
NEXTHOP
which
is
not
on
link
with
router
Asecondtablelookupneedstobedonetoresolvethenexthopintoanon
linkneighbour
inpractice,secondlookupmaybedoneinadvance notinrealtime bypre
33
processingtheroutingtable
-
8/3/2019 External Routing BGP
34/91
34
Example:RecursiveTableLookup
At R1, data packet to 10.1.x.y is received
Q:whatarethenextevents?
Forwarding Table at R1
R1
To NEXT-HOP ayer- a r10.1/16 2.2.2.63 N/A
2.2.2.63 2.2.2.33 x09:F1:6A:33:76:21
2.2.2.33 2.2.2.6310.1/16R2
34
2.2.2.93
solution
-
8/3/2019 External Routing BGP
35/91
35
InjectionExample
AS xE-BGPR5 R6
AS z
R5 advertises 18.1/16, NEXT-HOP = 2.2.2.2 E-BGP
R1
R218.1/16 I-BGP
IGP
IGP(OSPF)
2.2.2.2
AS y
to R6 via EBGP
R6injects18.1/16, NEXT-HOP = 2.2.2.2 intoitslocalforwardingtable(doesnotredistributeinto
OSPF)
R2 learns route from R6 via IBGP
- =
R4
35
. , . . .
itslocalforwardingtable
Data packet to 18.1.2.3 is received by R2
RecursivetablelookupatR2canbeused
Q:thereisaproblematR1:howcanwesolveit?solution
-
8/3/2019 External Routing BGP
36/91
36
InjectioninPracticeRequiresallRouterstoRunBGP
AS xE-BGP
R2
R5 R6
18.1/16 I-BGPIGP
2.2.20.12.2.2.2
AS z
Practical solution often deployed
AllcoreroutersalsorunIBGP(inadditiontoIGP)
E-BGP
R4
R1 IGP
AS y
RouteslearntfromBGPareinjectedintolocal
forwarding
tableRecursivetablelookupisdoneatallrouters
Q:repeatthesequenceofpreviousslidewiththisnew
assumption
36
IGP handles only internal networks very few
solution
-
8/3/2019 External Routing BGP
37/91
37
Questions
What is the difference between injection and redistribution ?
Can BGP routes be learnt by a non BGP router ?
What is recursive table lookup ? Where is it needed ?
37
-
8/3/2019 External Routing BGP
38/91
38
3.OtherBellsandWhistles
MULTIEXITDISC(MED)
packet to 10.1.2.3
AS x
R2R1
10.1/16 MED=1010.1/16 MED=50
10.2/16 MED=10E-BGP E-BGP
. . .
1.1.1.1 2.2.2.2
AS y
R4
.
10.1/16 10.2/16
R3
38
One AS connected to another over several links
ex:multinationalcompanyconnectedtoworldwideISP
ASyadvertisesitsprefixeswithdifferentMEDs(low=preferred)
IfASxacceptstouseMEDsputbyASy:trafficgoesonpreferredlink
-
8/3/2019 External Routing BGP
39/91
39
MEDExample
Q1: by which mechanisms will R1 and R2 make sure that
Q2: router R3 crashes; can 10.1/16 still be reached ? explain the
sequence of actions.
solution
39
-
8/3/2019 External Routing BGP
40/91
40
MEDQuestion
Q1: Assume now ASx and ASy are peers (ex: both are ISPs).
.
Q2: By which mechanisms can ASx pick the nearest route to ASy
?
solution
40
-
8/3/2019 External Routing BGP
41/91
41
LOCALPREF
AS x
E-BGP
R1 R2
R6
I-BGP
I-BGP E-BGP
E-BGP pref=10
pre =
Used inside an AS to select a bestAS
pathAssigned by border router when receiving route over E
BGP
PropagatedwithoutchangeoverIBGP
41
Example
R6associatespref=100,R2pref=10
R1choosesthelargestpreference
bgp default local-preference pref-value
-
8/3/2019 External Routing BGP
42/91
42
LOCALPREFExample
Q1: The link AS2AS4 is expensive. How should AS 4 set localprefs on routesreceived from AS 3 and AS 2 in order to route traffic preferably through AS 3 ?
: xp a n t e sequence o events or , an .
AS 1
AS1: 10.1/1610.1/16
AS1: 10.1/16
AS 3
AS 4R1R2
R3
42
AS 5
solution
-
8/3/2019 External Routing BGP
43/91
-
8/3/2019 External Routing BGP
44/91
44
Weight
This is a route attribute given by Cisco or Zebra router
Neverpropagatedtootherrouters,eveninthesamecloud
Thereforethereisnoweightattributeinrouteannouncements
44
-
8/3/2019 External Routing BGP
45/91
45
RouteFlapDampening
Route modification propagates everywhere
successiveUPDATEandWITHDRAW
causedforexamplebyBGPspeakerthatoftencrashesandreboots
Solution:
decisionprocesseliminatesflappingroutes
How
withdrawnroutesarekeptinAdjRINin
ifcomesupagainsoon(ie:flap),routereceivesapenalty
ifpenalty suppresslimitrouteisnotselected
45
penaltyfadesoutexponentially,seenextslide
-
8/3/2019 External Routing BGP
46/91
46
RouteFlapDampening
suppress-limit
e
reuse-limit
time
t1 t2
46
Route suppressed att1, restored att2
-
8/3/2019 External Routing BGP
47/91
47
AvoidIBGPMesh:Confederations
E-BGP
I-BGP I-BGP I-BGP
E-BGP
AS decomposed into subAS
privateASnumber
z
E-BGPE-BGP E-BGP
47
similartoOSPFareas
IBGPinsidesubAS(fullinterconnection)
EBGPbetweensubAS
-
8/3/2019 External Routing BGP
48/91
48
AvoidIBGPMesh:Routereflectors
I-BGP
I-BGP
I-BGP I-BGP I-BGP
I-BGP
RR RR RR
cluster 1 cluster 2 cluster 3
Cluster of routers
oneIBGPsessionbetweenoneclientandRR
CLUSTER_ID
z
E-BGPE-BGP E-BGP
48
Route reflector
readvertisesaroutelearntviaIBGP
toavoidloops
ORIGINATOR_IDattributeassociatedwiththeadvertisement
-
8/3/2019 External Routing BGP
49/91
49
IBGPconfiguration
lo0lo0I-BGP
I-BGP
IBGP configured on loopback interface (lo0)
AS z
49
interfacealwaysup
IPaddressassociatedwiththeinterface
IGProutingguaranteespacketforwardingtotheinterface
-
8/3/2019 External Routing BGP
50/91
50
AvoidEBGPmesh:Routeserver
E-BGP
50
t nterconnect on po nt
Instead ofn(n1)/2 peer to peer EBGP connections
n connections to Route Server
To avoid loops ADVERTISER attribute indicates which router inthe AS generated the route
-
8/3/2019 External Routing BGP
51/91
51
Communities
Other attributes can be associated with routes in order to
.
Predefined:Example:NOEXPORT(awellknown,predefinedattribute)
seelaterforanexample
DefinedbyoneAS(alabeloftheformASN:xwhereAS=ASnumber,x=a2
bytenumber)
51
-
8/3/2019 External Routing BGP
52/91
52
NOEXPORT
Written on EBGP by one AS, transmitted on IBGP by accepting AS, notforwarded
Example: AS2 has different routes to AS1 but AS2 sends only one aggregateroute to AS3
simplifiestheaggregationrulesatAS2
Whatistheroutefollowedbyapacketsentto2.2.48receivedbyR4?
2.2.0/17 NO-EXPORT
2.2.0/17
.
2.2/16R3
R4
52
2.2.128/17
2.2.128/17 NO-EXPORT2.2/16
R2
solution
-
8/3/2019 External Routing BGP
53/91
53
C.Examples
rules for
Importpolicy(acceptrouteornot,ifrequiredmodify/add/deleteattributes)
Exportpolicy(exportornotaroute,decidewhichattributevalue)
We illustrate two scenarios:
Dual Homing
53
-
8/3/2019 External Routing BGP
54/91
54
Ex1: StubArea
Operator AS
R1
R2
BGP not needed between Client and Operator
No AS number for client
R2 learns all prefixes in Client by static configuration or RIP on link R1R2
Client AS
54
Example: EPFL and Switch
what if R1 fails ?
-
8/3/2019 External Routing BGP
55/91
55
Ex2:StubArea,DualHomingtoSingleProvider
AS x
R2R1
10.1/16 MED=50
Provider
R4
.
10.2/16 MED=5010.2/16 MED=10
10.1/16 10.2/16
- -
R3
Client
With numbered Client AS
UseMEDtosharetrafficfromISPtoClientontwolinks
UseClientIGPconfigurationtosharetrafficfromClienttotwolinks
y
55
Q1:isitpossibletoavoiddistributingBGProutesintoClientIGP?
Q2:isitpossibletoavoidassigninganASnumbertoClient?
Q3:isitpossibletoavoidBGPbetweenClientandProvider?
solution
-
8/3/2019 External Routing BGP
56/91
56
Ex3:StubArea,DualHomingtoSeveralProviders
AS x AS y
AS z
R4
E-BGP E-BGP
R3
Provi ers
Client has own address space and AS number
Q: how can routes be announced between AS 100 and AS x ? AS x and AS z ?
AS 100
2.0/17 .ent
56
Q: assume Client wants most traffic to favour AS x. How can that be done ?
solution
-
8/3/2019 External Routing BGP
57/91
57
Ex4:HotPotatoRouting
Customer 1
ISP1R11 R12
ISP2R21 R22
Customer 2
Packets from Customer 2 to Customer 1BothR21andR22havearoutetoCustomer1
ShortestpathroutingfavoursR21
Q1:bywhichmechanismisthatdone?
Q2: what is the path followed in the reverse direction ?
57
solution
-
8/3/2019 External Routing BGP
58/91
58
D.Illustrations: TheSwitchNetwork
www.switch.ch
58
-
8/3/2019 External Routing BGP
59/91
59
AnInterconnectionPoint
59
-
8/3/2019 External Routing BGP
60/91
60
60
-
8/3/2019 External Routing BGP
61/91
61
Type Next HOP MED Origin Community RRC ID
A128.178.0.0/15
2003-10-0205:05:49Z
129.250.0.232
129.250.0.232
9 Not defined2914 1299559
2914:4202914:20002914:3000
RIPE NCC
rom www.ris.ripe.net: all routes to 128.178.0.0/15 on RIPE Route Collectors
A128.178.0.0/15
2003-10-0206:16:00Z
193.10.252.5
193.10.252.5
0 IGP2603 33561299 559
2603:6663356:23356:863356:5073356:6663356:2076
Netnod
A128.178.0.0/15
2003-10-0206:16:17Z
194.68.48.1 194.68.48.1 0 IGP12381 16532603 20965559
12381:1653 Netnod
A128.178.0.0/15
2003-10-0206:16:37Z
194.68.48.1 194.68.48.1 0 IGP12381 16532603 3356
1299 559
12381:1653 Netnod
A128.178.0.0/15
2003-10-0206:21:08Z
193.10.252.5
193.10.252.5
0 IGP2603 20965559
2603:2222603:66620965:155
Netnod
A128.178.0.0/15
2003-10-0206:21:17Z
194.68.48.1 194.68.48.1 0 IGP12381 16532603 20965559
12381:1653 Netnod
61
A128.178.0.0/15
2003-10-0207:24:06Z
129.250.0.232
129.250.0.232
9 Not defined2914 3549559
2914:420
P r e f ixT i m eP e e rA S p a th
-
8/3/2019 External Routing BGP
62/91
62
TheWorldseenfromEPFL
62
http://www.ris.ripe.net/bgpviz/
-
8/3/2019 External Routing BGP
63/91
63
Somestatistics
Source: http://www.cidrreport.org
Address prefixes
ASs
63
-
8/3/2019 External Routing BGP
64/91
64
Numberofhosts
64
-
8/3/2019 External Routing BGP
65/91
65
65
-
8/3/2019 External Routing BGP
66/91
66
Exercise
What ASs does EPFL receive service from ?
What ASs does Switch receive service from ?
Find the names of the networks that have these AS numbers
66
-
8/3/2019 External Routing BGP
67/91
67
Exercise
Lookup http://rpsl.info.ucl.ac.be. to find out the relationships
How does the software on this site decide whether a
relationship is client, provider or peer ?
67
-
8/3/2019 External Routing BGP
68/91
68
FurtherReading
Slow convergence after route suppression BGP path
,
convergence. Is in the nature of path vector routing with
explicit suppression.
CraigLabovitz,AbhaAhuja,AbhijitBose,FarnamJahanian:DelayedInternet
routingconvergence.IEEE/ACMTrans.Netw.9(3):293306(2001)
oute ap ampen ng s ows own convergence
ZhuoqingMorley
Mao,
Ramesh
Govindan,
George
Varghese,
Randy
H.
Katz:
Routeflapdampingexacerbatesinternetroutingconvergence.SIGCOMM
2002:221233
Path vector + policy may suffer from incompatibilities (loops)
68
Thestablepathsproblemandinterdomainrouting
Griffin,T.G.;Shepherd,F.B.;Wilfong,G.
ACM/IEEEToNApril2002, Page(s):232243
-
8/3/2019 External Routing BGP
69/91
69
References
Timothy Griffins home page at Intel
C. Huitema, Le Routage dans lInternet
John W. Stewart III BGP 4
www.ris.ripe.net: AS paths
www.c rrepor .org aggrega on s a s cs
www.caida.org map of Internetrpsl.info.ucl.ac.be relations between ASs
69
-
8/3/2019 External Routing BGP
70/91
70
Solutions
70
-
8/3/2019 External Routing BGP
71/91
71
PathVectorRouting
Q. Explain how E can choose the best paths to n1 and n2A.EreceivestheroutesBAn1andDCAn1.EselectsasbestroutestheoneswithshorterAS ath.
Q. How can loops be avoided ?A:BGProutersrecognizeloopingannouncementsbytherepetitionofthesameASinthepath.Suchannouncementsarediscarded
back
B
En1, n2
A:n1,n2
B A:n1,n2
B:n5 dest AS path
n1 B A
n2 B A
n3 D C
n4 D
a e nn5
n4
71
A
CA:n1,n2
C A:n1,n2
C:n3
D
D C A:n1,n2
D C: n3
D: n4
n5 B
n3
-
8/3/2019 External Routing BGP
72/91
72
Q1: Which of the following announcements do you think router D willsend to router E ?1. D>E: D2X:n1
2. D>E: D1X:n1
A:1only;2cannotbesentbecauseoverIBGPwedonotrepeataroutelearntromanot er spea er nt esame
Q2: Assume that in the figure below the router R does notrun BGP. Is thispossible ?A: yes.
A: no; C and F are not directly connected (are not onlink)
D1 D2A B
X:n1 X:n1
E-BGPback
72
D4 D5
D3
G H
E F
E-BGP
I-BGP R
-
8/3/2019 External Routing BGP
73/91
73
AggregationExample2
197.8.2.0/24
AS2
AS3 AS4
197.8.3.0/24
197.8.2.0/23
197.8.3.0/24
197.8.2.0/23
n2
n4
Q:what
happens
to
packets
from
n4
to
n2
?
A:TherearetworoutingentriesinAS4routers:onefor197.8.2.0/23 andonefor197.8.3.0/24. Longestprefixmatchinthepacketforwardingalgorithmensuresthatpacketston2goonthedirectroute(senttoAS2).
73
IfAS4injectsonlytheaggregaterouteintoitslocalroutingtables,whatistheanswernow?
Thereisnowonlyoneentry(197.8.2.0/23 )andallpacketston2aresenttoAS3back
-
8/3/2019 External Routing BGP
74/91
74
AggregationExample3
197.8.2.0/24
AS2
AS3 AS4
197.8.3.0/24
197.8.2.0/23 197.8.2.0/23
197.8.3.0 24 AS5 AS6
197.8.3.0/24n2
n4
AS4 receives197.8.2.0/23 AS_PATH: 3 {1 2}
197.8.3.0/24 AS_PATH: 6 5 2
197.8.3.0/24
74
.A. they go the long wayAssume now that only shortest AS paths routes are injected into routing tablesQ: what happens to packets from n4 to n2?
A: they go via AS3
back
-
8/3/2019 External Routing BGP
75/91
75
ExampleWithoutAggregation
197.8.2.0/24 197.8.0.0/23 197.8.0.0/23
AS2
AS3 AS4
197.8.3.0/24
197.8.3.0/24
197.8.2.0/24
197.8.3.0/24
197.8.2.0/24
197.8.3.0/24
Q: If AS3 does not aggregate, what are the routes announced by AS 4 ?Is there any benefit ?
A:
197.8.0.0/23 AS_PATH: 4 3
75
. . . _
197.8.3.0/24 AS_PATH: 4 2
A: there is no benefit since all routes go via AS 4 anyhow. AS4 shouldaggregate.back
-
8/3/2019 External Routing BGP
76/91
76
NEXTHOP
AS xE-BGP R6
AS z
-
R1 R2
R5I-BGP
I-BGP
AS y10.1/16 10.2/16
R3 R4
76
R3 advertises 10.2/16 to R1, NEXTHOP = R4 IP address
R6 advertises 10.2/16 to R5, NEXTHOP = R6 IP address
Q. where is such a scenario likely to happen ?
A: in interconnection points with many providers interconnected on one
LAN back
-
8/3/2019 External Routing BGP
77/91
77
MEDExample
Q1: by which mechanisms will R1 and R2 make sure that
A:
R1andR2exchangetheirroutestoAXyviaIBGP
R1has2routesto10.1/16,onelearntbyEBGP(MED=10),onelearntbyI
BGP(MED=5=);preferstheformer
. ,
Q2: router R3 crashes; can 10.1/16 still be reached ? explain thesequence of actions.
A:
R1clearsroutestoASylearntfromR3(keepalivemechanism)
77
R2isinformedoftheroutesuppressionbyIBGP
R2hasnowonly1routeto10.1/16and1routeto10.2/16;
trafficto10.1/16nowgoestoR2 back
-
8/3/2019 External Routing BGP
78/91
78
MEDQuestion
Q1: Assume now ASx and ASy are peers (ex: both are ISPs). Explain why ASx
is not interested in taking MED into account.
A: ASx is interested in sending traffic to ASy to the nearest exit, avoiding
transit inside ASx as much as possible. Thus ASx will choose the nearest
route to ASy, and will ignore MEDs
Q2: By which mechanisms can ASx pick the nearest route to ASy ?
A: it depends on the IGP. With OSPF: all routes to ASy are injected into OSPF
by means type 5 LSAs. These LSAs say: send to router R3 or R4. Every OSPF
router inside ASx knows the cost (determined by OSPF weights) of the pathfrom self to R3 and R4. Packets to 10.1/16 and 10.2/16 are routed to the
nearest among R3 and R4 (nearest = lowest OSPF cost).
78
-
8/3/2019 External Routing BGP
79/91
79
LOCALPREFExample
Q1: The link AS2AS4 is expensive. How should AS 4 set localprefs on routesreceived from AS 3 and AS 2 in order to route traffic preferably through AS 3 ?
all routes received from AS 2
AS 1
AS1: 10.1/1610.1/16AS1: 10.1/16 Q2: Explain the sequence of events
for R1, R2 and R3
AS 3
AS 4R1R2
R3
:R1 receives the route AS2 AS1 10.1/16
over E-BGP; sets LOCAL-PREF to 50R2 receives the route AS3 AS1 10.1/16over E-BGP; sets LOCAL-PREF to 100
R3 receives AS2 AS1 10.1/16, LOCAL-PREF=50 from R1 over I-BGP and
AS3 AS1 10.1/16, LOCAL-PREF=100from R1 over I-BGPAS3 AS1: 10.1/16
79
AS 5
se ec s . , -PREF=100 and installs it into local-RIB
R3 announces only AS3 AS1 10.1/16 toAS 5
back
-
8/3/2019 External Routing BGP
80/91
80
LOCALPREFQuestion
Q: Compare MED to LOCALPREF
MEDisusedbetweenASs(i.e.overEBGP);LOCALPREFisusedinsideone
AS(overIBGP)
MEDisusedtotelloneproviderASwhichentrylinktoprefer;LOCALPREFisusedtotelltherestoftheworldwhichASpath wewanttouse,bynotannouncin theotherones.
back
80
-
8/3/2019 External Routing BGP
81/91
81
ExamplewithReDistributionby
IBGP,
F
learns
from
G
the
route
to
D2
D1
n1
CredistributestheexternalrouteD2:n2intoOSPF;
y , earns erou e :n ; y earns erou e :n ;
selectsD2:n2anddoesnotredistributeittoOSPF
byIBGP,BlearnstherouteD2:n2fromC
byEBGP,AlearnstherouteDX:D2:n2
byOSPF,Llearnstherouteton2viaC
I-BGP - internal BGP
E-BGP - external BGP
D1 = EPFL D2 = UCB
n1
D1: n1
n2
A C
FD2 : n2
G
81
DX DYD2 : n2DY D2: n2
D1: n1B
D EL
physical link
TCP connectionback
-
8/3/2019 External Routing BGP
82/91
82
Example:RecursiveTableLookup
At R1, data packet to 10.1.x.y is received
Q:whatarethenextevents?
A:first,thenexhop2.2.2.63isfound;asecondlookupfor2.2.2.63isdone;
thepacketissenttoMACaddressx09:F1:6A:33:76:21
R1
To NEXT-HOP ayer- a r10.1/16 2.2.2.63 N/A
2.2.2.63 2.2.2.33 x09:F1:6A:33:76:21
2.2.2.33 2.2.2.63
10.1/16R2
82
2.2.2.93
back
-
8/3/2019 External Routing BGP
83/91
83
AvoidRedistribution:CombineRecursiveLookup
andNEXTHOP
AS xE-BGPR5 R6
AS z
Data packet to 18.1.2.3 is received by R2 E-BGP
R1
R218.1/16 I-BGP
IGP
IGP(OSPF)
2.2.2.2
AS y
: ere sapro ema : owcanweso ve
A:theproblemis:PacketissentbyR2towardsR1,
whichis
the
neighbour
towards
2.2.2.2.
At
R1,
there
is
noforwardingentryto18.1/16 blackhole!Asolutionwouldbetouseloosesourcerouting:R2adds2.2.2.2asloosesourceroutinginfointopacket.Anothersolutionislabelswitching(seeMPLSmodule)alsocalledtagswitching.R2establishesalabelswitched
R4
83
pathto2.2.2.2andforwardsthepacketonthispath.
Inpracticehowever,anothersolution,asshownnext.
back
-
8/3/2019 External Routing BGP
84/91
84
AvoidRedistribution:PracticalSolution
AS xE-BGP
R2
R5 R6
18.1/16 I-BGPIGP
2.2.20.12.2.2.2
AS z
Q:repeatthesequenceofpreviousslidewiththisnewassumption
R5advertises18.1/16, NEXT-HOP = 2.2.2.2 toR6viaEBGP
R6transmits18.1/16, NEXT-HOP = 2.2.2.2 to R1andR2via
E-BGP
R4
R1 IGP
AS y
IBGP
R6injects18.1/16, NEXT-HOP = 2.2.2.2 intoitslocalforwardingtableR2injects18.1/16, NEXT-HOP = 2.2.2.2 intoitslocalforwardingtable
Independently,IGPfindsthat,atR2,packetsto2.2.10.1shouldbesenttoR1
Datapacketto18.1.2.3isreceivedbyR2
AtR2,recursivetablelookupdeterminesthatpacketshouldbeforwardedto
84
R1
AtR1,recursivetablelookupdeterminesthatpacketshouldbeforwardedtoR6
AtR6,recursivetablelookupdeterminesthatpacketshouldbeforwardedto2.2.2.2
back
-
8/3/2019 External Routing BGP
85/91
85
NOEXPORT
Q:Whatistheroutefollowedbyapacketsentto2.2.48receivedbyR4?
A:the acketissentviaR3andR1
2.2.0/17 NO-EXPORT
2.2.0/17
.
2.2/16R3
R4
85
2.2.128/17
2.2.128/17 NO-EXPORT2.2/16
R2
back
-
8/3/2019 External Routing BGP
86/91
86
Sol.Ex2:StubArea,DualHomingtoSingleProvider
AS x
R2R1
10.1/16 MED=50
Provider
R4
.
10.2/16 MED=5010.2/16 MED=10
10.1/16 10.2/16
- -
R3
Client
Q1:is
it
possible
to
avoid
distributing
BGP
routes
into
Client
IGP
?
A:yes,forexample:configureR3andR4asdefaultroutersinClientAS;trafficfromClientASisforwardedtonearestofR3andR4.IfR3orR4fails,totheremainingone
Q2:isitpossibletoavoidassigninganASnumbertoClient?
A:Yes itissufficienttoassi ntoClienta rivateASnumber:Providertranslatesthis
y
86
numbertoitsown.
Q3:isitpossibletoavoidBGPbetweenClientandProvider?
A:Yes,byrunningaprotocollikeRIPbetweenClientandProviderandredistributingClientroutesintoProviderIGP.ThusProviderpretendstotherestoftheworldthattheprefixesofClientareitsown. back
-
8/3/2019 External Routing BGP
87/91
87
Sol.Ex3:StubArea,DualHomingtoSeveralProviders
AS x AS y
AS z
R4
E-BGP E-BGP
R3
Provi ers
Client has own address space and AS number
Q: how can routes be announced between AS 100 and AS x ? AS x and AS z ?A: R3 announces 2.0 17 and 2.0 16 traffic from AS x to 2.0 17 will flow via AS x if
AS 100
2.0/17 .ent
87
R3 fails, it will use the longer prefix and flow via Asy.ASx announces 2.0/17 and 2.0/16 to AS z
Q: assume Client wants most traffic to prefer AS y. How can that be done ?A: R3 announces an artificially inflated path: 100 100 100 100 : 2.0/17. AS z willfavour the path via AS y which has a shorter AS path length back
-
8/3/2019 External Routing BGP
88/91
88
Sol.Ex4:HotPotatoRouting
Customer 1
ISP1R11 R12
ISP2R21 R22
Customer 2
Packets from Customer 2 to Customer 1BothR21andR22havearoutetoCustomer1
ShortestpathroutingfavoursR21
Q1:bywhichmechanismisthatdone?
88
: o ceo t e estroute cr ter a ,assum nga routers n run
Q2: what is the path followed in the reverse direction ?
A:seepicture.Notetheasymmetricroutingback
-
8/3/2019 External Routing BGP
89/91
89
Exercise
What ASs does EPFL receive service from ?
,
What ASs does Switch receive service from ?
fromthepreviousroutesweseethatthereareatleast:
AS1299
AS20965
AS3549
Find the names of the networks that have these AS numbersfromwhoisonwww.ripe.net:
AS1299:Telianet
AS20965:Geant
89
AS3549:GlobalCrossing
-
8/3/2019 External Routing BGP
90/91
90
Exercise
Lookup http://rpsl.info.ucl.ac.be. to find out the relationships
How does the software on this site decide whether a
relationship is client, provider or peer ?
ASXisclientofSwitchifASXacceptsANYpathandannouncesonlyself(AS
X)
ASXisproviderofSwitchifASXannouncesANYpathandacceptsonlyAS
SwitchASXisapeerifASXacceptsandannouncesonlyasmallsetofroutes
90
-
8/3/2019 External Routing BGP
91/91
91