BGP: Introduction and Issues
description
Transcript of BGP: Introduction and Issues
Advanced Networks 1
BGP: Introduction and Issues
Advanced Networks 2
What Is BGP?
Border Gateway Protocol BGP-4Border Gateway Protocol BGP-4
The de-facto interdomain routing protocolThe de-facto interdomain routing protocol
BGP includes specifications:BGP includes specifications:• Which information gets advertised and howWhich information gets advertised and how
BGP includes a routing protocol: BGP includes a routing protocol: • Establishes and uses a routing tableEstablishes and uses a routing table
Internal Gateway Protocol (I-BGP in the book)Internal Gateway Protocol (I-BGP in the book)
Advanced Networks 3
Why Is There Such Fuss about BGP?
BGP dictates routing at the AS levelBGP dictates routing at the AS level• Absence of understanding: poor performanceAbsence of understanding: poor performance
BGP is complicatedBGP is complicated• Designed to be flexibleDesigned to be flexible• Involves multiple fieldsInvolves multiple fields
Understanding BGP behavior is not intuitiveUnderstanding BGP behavior is not intuitive• Implementation and business policiesImplementation and business policies
The routing of the Internet relies on BGPThe routing of the Internet relies on BGP
Advanced Networks 4
Some Open Questions
How well does BGP work now?How well does BGP work now?
How can I manage a BGP network?How can I manage a BGP network?
How secure and robust is BGP?How secure and robust is BGP?• Cyber-terrorismCyber-terrorism
How would we re-design BGP now?How would we re-design BGP now?
How well will BGP scale for our future How well will BGP scale for our future needs?needs?
Advanced Networks 5
Roadmap
Introduction to BGPIntroduction to BGP
Highlights of BGP issuesHighlights of BGP issues
Goal: instigate interest in BGPGoal: instigate interest in BGP
Advanced Networks 6
Some Basic Numbers
• 17,000 Autonomous Systems approx.17,000 Autonomous Systems approx.• Corporate NetworksCorporate Networks• ISP Internal NetworksISP Internal Networks• National Service ProvidersNational Service Providers
• Identified by ASN a 16 bit valueIdentified by ASN a 16 bit value• Assigned by IANAAssigned by IANA
• Superlinear growth (Huston, Siganos et al.Superlinear growth (Huston, Siganos et al.))
Advanced Networks 7
How A BGP graph Looks Like
Each AS has Each AS has designated BGP designated BGP routersrouters
BGP routers of an BGP routers of an AS communicate AS communicate internally with internally with another protocol another protocol (IGP)(IGP)
AS 1
AS 2
AS 3
AS 4
AS 5
Advanced Networks 8
IP Addresses and Prefixes
IP addresses have 32 bits: 4 octets of bits IP addresses have 32 bits: 4 octets of bits (IPv4)(IPv4)
A prefix is a group of IP addressesA prefix is a group of IP addresses
128.32.101.5 is an IP address (32 bits)128.32.101.5 is an IP address (32 bits)
128.32.0.0/16 is a prefix of the 16 first bits:128.32.0.0/16 is a prefix of the 16 first bits:• 128.32.0.0 – 128.32.255.255 (2^16 addresses)128.32.0.0 – 128.32.255.255 (2^16 addresses)
128.32.4.0/24 is a prefix of the 24 first bits - 128.32.4.0/24 is a prefix of the 24 first bits - longerlonger
Advanced Networks 9
Routing is Based on Prefixes
A BGP Routing table has prefixes for entriesA BGP Routing table has prefixes for entries
For a IP address of a packet, find For a IP address of a packet, find longest matchlongest match
Example: packet IP 128.32.101.1Example: packet IP 128.32.101.1
128.1.1.4 matches the first 8 bits – no match!128.1.1.4 matches the first 8 bits – no match!
128.32.0.0/16 match for 16 bits128.32.0.0/16 match for 16 bits
128.32.101.0/24 is a longer match 128.32.101.0/24 is a longer match
Advanced Networks 10
Prefix Matching in More Detail
For a IP address of a packet, find For a IP address of a packet, find longest matchlongest matchExample: Compare Example: Compare • packet IP 128.32.101.1packet IP 128.32.101.1• With 128.32.0.0/16With 128.32.0.0/16• IP : 01000000. 001000000. 01100101 .00000001IP : 01000000. 001000000. 01100101 .00000001• Mask : 11111111. 111111111. 00000000 .00000000Mask : 11111111. 111111111. 00000000 .00000000• AND : 01000000. 001000000. 00000000 .00000000AND : 01000000. 001000000. 00000000 .00000000• Prefix : 01000000. 001000000. 00000000. 00000000Prefix : 01000000. 001000000. 00000000. 00000000• Equal? YesEqual? Yes
Advanced Networks 11
Advertising Routing Information
Each AS advertises what it can reach from Each AS advertises what it can reach from each BGP routereach BGP router
Policies I: filter what you advertisePolicies I: filter what you advertise
Policies II: filter from what you hear Policies II: filter from what you hear advertised advertised
Build up a BGP routing tableBuild up a BGP routing table• Remember which prefix you hear from which linkRemember which prefix you hear from which link
Advanced Networks 12
What Does a Routing Table Look Like?
Origin AS “owns” the addressOrigin AS “owns” the addressRouting tables can have peculiaritiesRouting tables can have peculiarities
Prefix Origin AS Path
128.32.0.0/16 123 14 56 123
123 34 101 203 123
128.32.101.0/24 15 50 15 15
Advanced Networks 13
Route Advertising
Distance Vector style protocolDistance Vector style protocol
Hear advertisements: IP prefix, AS-pathHear advertisements: IP prefix, AS-path
Filter if desired (i.e. ignore)Filter if desired (i.e. ignore)
Append yourself: IP prefix, myAS+AS-pathAppend yourself: IP prefix, myAS+AS-path
Forward to appropriate ASs Forward to appropriate ASs
Advanced Networks 14
Basic AS relationships
Customer – ProviderCustomer – Provider• Customer pays Provider for serviceCustomer pays Provider for service• The Customer is always rightThe Customer is always right
Peer to Peer: mutual cooperationPeer to Peer: mutual cooperation• Ex. MCI and AT&TEx. MCI and AT&T
Sibling-SiblingSibling-Sibling• Ex. AT&T research and AT&T wirelessEx. AT&T research and AT&T wireless
Advanced Networks 15
The Internet as a Directed Graph
Every edge is Every edge is bidirectionalbidirectional
Business relationships Business relationships are representedare represented
Provider Customer
Peer Peer
Advanced Networks 16
The Initial Idea
Data flows between customers-providersData flows between customers-providers
Top level providers are peersTop level providers are peers• They exchange information to ensure connectivityThey exchange information to ensure connectivity
What can possibly go wrong?What can possibly go wrong?
Advanced Networks 17
And then came the rain…
Thousands of ASsThousands of ASs
Complicated relationshipsComplicated relationships
Multiple providers for one AS!!Multiple providers for one AS!!• MultihomingMultihoming
Traffic engineeringTraffic engineering• I want to use multiple paths and load balanceI want to use multiple paths and load balance
Advanced Networks 18
Example: The Intended Use
Provider Customer
Peer Peer
Advanced Networks 19
BGP Graph and Routing Policies
Up then down: 1, 10, 100, 200, 13, 4Up then down: 1, 10, 100, 200, 13, 4No valleys, no up-down-up, no more than 1 peer-peer No valleys, no up-down-up, no more than 1 peer-peer
10
1
100 200
11
4
12 13
2 3
Advanced Networks 20
The Rules of BGP Routing
Transit traffic: traffic that does not go to my Transit traffic: traffic that does not go to my customers (or their customers)customers (or their customers)
A provider carries any traffic to, from A provider carries any traffic to, from customercustomer
Peers exchange traffic Peers exchange traffic onlyonly if between their if between their customerscustomers
Advanced Networks 21
Implementing BGP Rules
A customer advertises whatever she wants A customer advertises whatever she wants
A provider forwards everything from customerA provider forwards everything from customer• So that world now where customer IPs areSo that world now where customer IPs are
A provider advertises whatever customer wants to A provider advertises whatever customer wants to customercustomer
A peer hears but does not advertise further prefixes A peer hears but does not advertise further prefixes from a peerfrom a peer
A peer advertises only its customers to a peerA peer advertises only its customers to a peer
Advanced Networks 22
Some Simple Policies: Transitivity
• A customer should not be transit for its ProvidersA customer should not be transit for its Providers• For this: ASX should not advertise ISP1 advertisementsFor this: ASX should not advertise ISP1 advertisements
ISP 1 ISP 2
AS X
Not allowed
Advanced Networks 23
Basic AS Relationships
Customer – Provider: Customer – Provider: customer pays and is always rightcustomer pays and is always right
Peer to Peer: Peer to Peer: Exchange traffic only between their customersExchange traffic only between their customers
Sibling-Sibling: Sibling-Sibling: Exchange traffic at willExchange traffic at will
10
1
100 200
11
4
12 13
2 3
Provider Customer
PeerPeer
Advanced Networks 24
How BGP Policy Restricts Routing
Routing rules:Routing rules:• Provider accept everythingProvider accept everything• Peer only if it is for its Peer only if it is for its
customerscustomers
Path Properties:Path Properties:• Up then downUp then down• No up-down-up, at most 1 No up-down-up, at most 1
peer-peer stepspeer-peer steps
Provider Customer
10
1
100 200
11
4
12 13
2 3
Peer Peer
Advanced Networks 25
How Policies Affect Routing
A Provider will get rid of A Provider will get rid of traffic as soon as traffic as soon as possible,possible,
But a Provider will carry But a Provider will carry the traffic for its the traffic for its customercustomer
Did anyone say traffic is Did anyone say traffic is asymmetric?asymmetric?
Customer 1
ISP1
ISP2Customer 2
Advanced Networks 26
BGP Path-Length Asymmetry
Consider number of AS traversed by a pathConsider number of AS traversed by a pathAsymmetry: 46% of pairs differ by at least one AS hopAsymmetry: 46% of pairs differ by at least one AS hop
[Siganos 01][Siganos 01]
Advanced Networks 27
Determining The Logical Graph
The business relationships are criticalThe business relationships are critical
How can I find the relationships?How can I find the relationships?1.1. Infer relationships from routing tablesInfer relationships from routing tables
2.2. IRR database: manually maintained – error proneIRR database: manually maintained – error prone
Advanced Networks 28
Two Inference Algorithms
Inference algorithm Inference algorithm [Gao 00][Gao 00]
• Using 1 routing tableUsing 1 routing table• Exploit the up-down path propertyExploit the up-down path property
in a routing path, assume highest degree node as peakin a routing path, assume highest degree node as peak
Inference using multiple tables Inference using multiple tables [Subramanian02][Subramanian02]
• Use multiple points of observation to improve resultsUse multiple points of observation to improve results
Advanced Networks 29
Things Become Interesting:Traffic Engineering
How can I pick a route?How can I pick a route?Local Preference: path Local Preference: path attributeattributeAS2 wants to prefer fast AS2 wants to prefer fast thick linkthick linkAdvertisement from right Advertisement from right router of AS2 has higher router of AS2 has higher Local PreferenceLocal PreferenceAny BGP router in AS2 will Any BGP router in AS2 will prefer the prefer the
AS 1
AS 2
208.1.1.0/24
LP 100LP 80
slow
Advanced Networks 30
Load Balancing - Appetizer
I want to share traffic between my two I want to share traffic between my two providersproviders
How can I do this?How can I do this?
Advanced Networks 31
Load Balancing: Long Prefix Match Takes All!
Customer
ISP 1 ISP 2
ISP 3
138.39.1/24
138.39/16138.39.1/24
138.39.1/24
138.39/16
138.39.1/24
Advanced Networks 32
So How Can I Balance the Load?
Ask my provider to not aggregate my prefixAsk my provider to not aggregate my prefix• Will this work?Will this work?
Split my prefix in twoSplit my prefix in two• 138.39.1.0/24138.39.1.0/24• A: 138.39.1.31/28A: 138.39.1.31/28
• B: B: 138.39.1.32/28138.39.1.32/28
Advertise only one part to ISP2Advertise only one part to ISP2ISP2 traffic destined for prefixes in AISP2 traffic destined for prefixes in AISP1 traffic destined for prefixes in BISP1 traffic destined for prefixes in B
Advanced Networks 33
Summary Up to Now
BGP-4 is the de facto protocol for BGP-4 is the de facto protocol for interdomain routinginterdomain routing
BGP was developed to achieve:BGP was developed to achieve:• Flexible policy implementationFlexible policy implementation• Scalability via route aggregation given CIDRScalability via route aggregation given CIDR
There are many open issuesThere are many open issues• BGP is a hot research topicBGP is a hot research topic
Advanced Networks 34
The Growth of BGP Table
Advanced Networks 35
The BGP Growth: The Truth
Growth flattened Growth flattened outout
Why?Why?• Better Better
managementmanagement• Dot-com crash?Dot-com crash?
Advanced Networks 36
Routing Table Variation
Larger ASes have significantly larger tablesLarger ASes have significantly larger tables
Advanced Networks 37
Update Activity Per Prefix
Measure rate of announcements + Measure rate of announcements + withdrawals + path updateswithdrawals + path updates
Compare relative update rate per prefixCompare relative update rate per prefix
length to the relative number of length to the relative number of prefixes of that lengthprefixes of that length>1 implies higher than average update >1 implies higher than average update
rate (less stable)rate (less stable)<1 implies lower than average update <1 implies lower than average update
rate(more stable)rate(more stable)
Advanced Networks 38
Measured Update Rate
Bursty!Bursty!
Advanced Networks 39
BGP robustness
Measuring the BGP updatesMeasuring the BGP updates
Advanced Networks 40
Analyzing Messages By Content
Aggregated per 30 secondsAggregated per 30 seconds
Advanced Networks 41
Initial Observations
Updates show daily and weekly periodicityUpdates show daily and weekly periodicityThere is no evidence BGP disturbance:There is no evidence BGP disturbance:• The Baltimore tunnel train 18 July that destroyed The Baltimore tunnel train 18 July that destroyed
Internet linesInternet lines• Sept 11 attackSept 11 attack
There are some spikes at:There are some spikes at:• 19 July19 July• 18-22 September18-22 September
Advanced Networks 42
BGP Updates Correlations
Advanced Networks 43
BGP Under Attack
Advanced Networks 44
Router CPU Activity Correlates…
Advanced Networks 45
The Attack of The Worm
Advanced Networks 46
Classification of Instabilities
Advanced Networks 47
Isolating Instability: 1 unstable peer
Advanced Networks 48
Detecting abnormal BGP activity
Advanced Networks 49
The Worm Activity
Advanced Networks 50
The Worm Correlates Again…
Advanced Networks 51
Advanced Networks 52
Advanced Networks 53
Advanced Networks 54
Advanced Networks 55
Advanced Networks 56
Advanced Networks 57
Summary of BGP Instability
Globally correlated BGP instability is not Globally correlated BGP instability is not uncommonuncommon
Some causes are well understood Some causes are well understood (misconfiguration, bad path announcements)(misconfiguration, bad path announcements)
Some others are less well understood, and Some others are less well understood, and more worrisome:more worrisome:• wormsworms
Advanced Networks 58
BGP: Up Close and Personal
Establishing a connectionEstablishing a connection
MessagesMessages
Path AttributesPath Attributes
Advanced Networks 59
Establishing A BGP Session
BGP uses TCP connectionsBGP uses TCP connections• For reliabilityFor reliability
A BGP session is between two routersA BGP session is between two routers• Typically directly connected (Ethernet, FDDI)Typically directly connected (Ethernet, FDDI)
Routers establish a BGP sessionRouters establish a BGP session• Authentication and set-upAuthentication and set-up• Update and withdrawalsUpdate and withdrawals• If disconnected, all paths are invalidatedIf disconnected, all paths are invalidated
Advanced Networks 60
Messages
First open TCP connectionFirst open TCP connection• Identification and authenticationIdentification and authentication
BGP messagesBGP messages• OPEN: set-up, negotiate timer for keep-aliveOPEN: set-up, negotiate timer for keep-alive• UPDATE: routing changesUPDATE: routing changes• NOTIFICATION: termination, and error messagesNOTIFICATION: termination, and error messages• KEEPALIVE: confirm that connection is active KEEPALIVE: confirm that connection is active
Advanced Networks 61
UPDATE Message
Advertise reachability informationAdvertise reachability information
Withdraw paths to prefixesWithdraw paths to prefixes
Update information prefixesUpdate information prefixes
Introduce new prefixesIntroduce new prefixes
Modify important path attributes for new Modify important path attributes for new prefixes and the related pathsprefixes and the related paths
Advanced Networks 62
Standard Path Attributes
Attribute: Type, Length, ValueAttribute: Type, Length, Value
Origin: where did I hear this fromOrigin: where did I hear this from• BGP (external) or IGP (internal)BGP (external) or IGP (internal)
AS Path: sequence of ASsAS Path: sequence of ASs
Flexible handling of loopsFlexible handling of loops• Recovering from disconnected ASs!Recovering from disconnected ASs!
Next Hop: set explicitly who the next router Next Hop: set explicitly who the next router should be (possibly a non BGP speaker)should be (possibly a non BGP speaker)
Advanced Networks 63
Multi-Exit Discriminator (MED)
•Indication to external peers of the preferred path into the AS•Lowest Med Preferred
MED 10MED 10
MED 50MED 50
AS 1
AS 2
Advanced Networks 64
Note for MED
One AS sets the valuesOne AS sets the values
Another AS interprets and uses themAnother AS interprets and uses them
Thus:Thus:• Cooperative ASesCooperative ASes• Only between two ASes (1 hop scope)Only between two ASes (1 hop scope)
MED is meaningless in the next hopMED is meaningless in the next hop
MED can be used only if both routes are MED can be used only if both routes are advertised from the same ASadvertised from the same AS
Advanced Networks 65
Local Preference
Choosing paths Choosing paths internally internally Within an AS:Within an AS:• Set Local Set Local
Preference to pick Preference to pick the path you want the path you want to send data toto send data to
The higher Local The higher Local Preference is Preference is preferredpreferred
AS 1AS 2
L2
L1
AS3
Here MED can not be used since we have different AS
Advanced Networks 66
Aggregation of updates
AS want to aggregate as much as possibleAS want to aggregate as much as possible• Reduce routing stateReduce routing state• Reduce information that needs to be exchangedReduce information that needs to be exchanged
Main idea: send one update instead of twoMain idea: send one update instead of two• All other attributes are the same (path, preferences etc)All other attributes are the same (path, preferences etc)• The prefixes have to be subsets, or adjacentThe prefixes have to be subsets, or adjacent
subset adjacent
Advanced Networks 67
Atomic Aggregate
Sometimes we aggregate paths that are Sometimes we aggregate paths that are different (ie different AS sequence)different (ie different AS sequence)
Atomic aggregate shows that some of the Atomic aggregate shows that some of the destinations in this prefix are not necessarily destinations in this prefix are not necessarily following the same pathfollowing the same path
This does not allow other routers to de-This does not allow other routers to de-aggregate the path, thus creating entries that aggregate the path, thus creating entries that should not appearshould not appear
Advanced Networks 68
Atomic Aggregate
AS 2 thinks that all 138.39/16 follow the 3 1 4 pathAS 2 thinks that all 138.39/16 follow the 3 1 4 pathAS 5
AS 1AS 2
AS 3
138.39.1/24
138.39/16138.39.1/24
138.39/16 : 1 4
AS 4 138.39/16
138.39/16 : 3 1 4
Advanced Networks 69
BGP Route Selection Process
1.1. Maximum prefix length matchMaximum prefix length match2.2. Highest Local PriorityHighest Local Priority3.3. Shortest AS PathShortest AS Path4.4. Lowest MED (if routes through same AS)Lowest MED (if routes through same AS)5.5. Min Cost Next hop router (consulting IGP)Min Cost Next hop router (consulting IGP)6.6. Prefer external to internal routesPrefer external to internal routes
1.1. Pick lowest BGP identifier among many E-BGPPick lowest BGP identifier among many E-BGP2.2. Pick lowest BGP identifier among many I-BGPPick lowest BGP identifier among many I-BGP
Advanced Networks 70
Advanced Networks 71
Internal BGP (I-BGP)
Communication between routers of an ASCommunication between routers of an ASI-BGP very similar to E-BGP except:I-BGP very similar to E-BGP except:• Different advertising rulesDifferent advertising rules
Do not re-advertise a path internallyDo not re-advertise a path internally• I-BGP 1 -> I-BGP 2 -X- I-BGP3I-BGP 1 -> I-BGP 2 -X- I-BGP3
But readvertise (in -out, out -in):But readvertise (in -out, out -in):• I-BGP 1 -> I-BGP 2 -> E-BGP1I-BGP 1 -> I-BGP 2 -> E-BGP1• E-BGP 1 -> I-BGP 2 -> I-BGP1E-BGP 1 -> I-BGP 2 -> I-BGP1
Advanced Networks 72
I-BGP Re-Advertising
B will not re-ad. to C B will not re-ad. to C what it hears from Awhat it hears from ABut it will re-ad to DBut it will re-ad to DWhy?Why?Paths are identified Paths are identified by AS, and internally by AS, and internally you have the same you have the same ASAS• To avoid routing loopsTo avoid routing loops
E-BGPI-BGP
A B
C
D
Advanced Networks 73
I-BGP Mesh
I-BGP routers form a fully connected meshI-BGP routers form a fully connected mesh
(clique)(clique)• Scalability becomes an issueScalability becomes an issue
The full mesh is independent of physical The full mesh is independent of physical connectivityconnectivity
Advanced Networks 74
A Subtle Difference I-BGP vs E-BGP
E-BGP: routers communicate using the IP of E-BGP: routers communicate using the IP of the physical interface (link)the physical interface (link)• Link based reliabilityLink based reliability
I-BGP: routers have “virtual or loopback” I-BGP: routers have “virtual or loopback” interfaceinterface• Even when link fails, routers may be reachableEven when link fails, routers may be reachable• Node based reliabiityNode based reliabiity
Advanced Networks 75
Static vs Dynamic Configuration
In practice, many customers do not speak In practice, many customers do not speak BGPBGP
Do not have an AS numberDo not have an AS number
They are configured staticallyThey are configured statically
Advanced Networks 76
One vs Many Providers
Single homed vs multihomedSingle homed vs multihomed
Customers for reliability and performance Customers for reliability and performance connect to many providersconnect to many providers
Difference:Difference:• Single homed: easy to manageSingle homed: easy to manage• Multihomed: trickyMultihomed: tricky
Route aggregationRoute aggregation Load balancingLoad balancing
Advanced Networks 77
Multihoming
How can I use my multiple connections How can I use my multiple connections efficiently?efficiently?
Multihoming is quite widespreadMultihoming is quite widespread
Users take it up to themselves [Huston]Users take it up to themselves [Huston]
Consequence: non-aggregatable stateConsequence: non-aggregatable state
Advanced Networks 78
Two routers two links
Multiplex traffic at link or IP layerMultiplex traffic at link or IP layer
Use Next Hop to point to virtual router IPUse Next Hop to point to virtual router IP• Second look up: how can I reach virtual IP?Second look up: how can I reach virtual IP?• Pick one of the two links randomly or staticallyPick one of the two links randomly or statically• Furthermore, when one link is down the other one is Furthermore, when one link is down the other one is
chosenchosen
Advanced Networks 79
Multihoming with One Routers 1 ISP
Customer can advertise Customer can advertise different prefixes on each different prefixes on each linklink• Reliability?Reliability?
Use Multi-Exit-DiscriminatorUse Multi-Exit-Discriminator
Use Local PreferenceUse Local Preference• ISP to pick linkISP to pick link• Customer’s IBGP to pick routerCustomer’s IBGP to pick router
C A
ISP 1
P1 P2
B
Advanced Networks 80
Issues
The mechanisms are there, but they depend The mechanisms are there, but they depend on many factorson many factors• How much traffic each prefix generates?How much traffic each prefix generates?
Balancing incoming and outgoing trafficBalancing incoming and outgoing trafficDynamically adapting to changing conditionsDynamically adapting to changing conditionsTechnical issues:Technical issues:• Some ISPs do not accept very long prefixesSome ISPs do not accept very long prefixes
Longer than they would be in classful routingLonger than they would be in classful routing Longer than 19 for new prefixesLonger than 19 for new prefixes
Advanced Networks 81
Multihoming with Two Routers 1 ISP
Similar case for Provider to Similar case for Provider to CustomerCustomerFor Customer to Provider:For Customer to Provider:• A could alternate pathsA could alternate paths
Reordering of packetsReordering of packets• ISP 1 could advertise different ISP 1 could advertise different
addresses on each linkaddresses on each link I.e. 1: ISP customersI.e. 1: ISP customers 2: Default (everybody 2: Default (everybody
else)else)
BC
A
ISP 1
P1 P2
Internet
ISP 1Customers
Advanced Networks 82
Multihoming With Two Providers
Customer
ISP 1 ISP 2
ISP 3
138.39.1/24
138.39/16138.39.1/24
138.39.1/24
138.39/16
138.39.1/24
Advanced Networks 83
Two Providers Multihoming: Getting Address Space
Given two ISPGiven two ISP
Get space from one (we saw before)Get space from one (we saw before)
Get space from bothGet space from both• Advertise only related prefix to ISPAdvertise only related prefix to ISP
Aggregation but not reliabilityAggregation but not reliability• Advertise both prefixes to ISPsAdvertise both prefixes to ISPs
No aggregation but reliabilityNo aggregation but reliability
Get space independently of bothGet space independently of both• Max flexibility, not reliabilityMax flexibility, not reliability• If too narrow of prefix, may not propagate, no connectivityIf too narrow of prefix, may not propagate, no connectivity
Advanced Networks 84
I-BGP Scalability
Full mesh is not scalable: Full mesh is not scalable: O(N^2) IBGP sessionsO(N^2) IBGP sessions
Approaches to scalable I-BGPApproaches to scalable I-BGP• Hierarchical structure: Route reflectorsHierarchical structure: Route reflectors• Divide and conquer: ConfederationsDivide and conquer: Confederations
Advanced Networks 85
Route Reflection
Explicitly allow some I-Explicitly allow some I-BGP routers to BGP routers to readvertisereadvertise
Route reflectors: Route reflectors: represent other routersrepresent other routers
Hierarchical structure Hierarchical structure avoids loops and avoids loops and problemsproblems
B
AC
D E
Advanced Networks 86
Confederations
Decompose an AS to Decompose an AS to sub-ASsub-AS
Externally: one ASExternally: one AS
Internally: like E-BGP Internally: like E-BGP (E-I-BGP)(E-I-BGP)
Loop avoidance:Loop avoidance:• AS-CONFED-SETAS-CONFED-SET• AS-CONFED-SEQUENCEAS-CONFED-SEQUENCE
B
AC
D E
Advanced Networks 87
Confederation BGP Rules
Differences of BGP between sub-ASesDifferences of BGP between sub-ASes
Local-Preference is transitiveLocal-Preference is transitive• Recall in BGP it is notRecall in BGP it is not
NEXT-HOP attribute is forwardedNEXT-HOP attribute is forwarded
Path within AS is monitored with sub-AS no.Path within AS is monitored with sub-AS no.• AS-CONFED-SEQAS-CONFED-SEQ• AS-CONFED-SEQUENCEAS-CONFED-SEQUENCE
Advanced Networks 88
Handling the Dynamic Nature
Advanced Networks 89
To Refresh or not to Refresh?
BGP uses hard state:BGP uses hard state:
BGP routers consider a path is “usable” BGP routers consider a path is “usable” • until explicitly withdrawnuntil explicitly withdrawn• the session failsthe session fails
How do I detect if a connection failed?How do I detect if a connection failed?• Keep-alive messagesKeep-alive messages
Advanced Networks 90
Path Updates Frequency
Send updates of a path no sooner 30 secSend updates of a path no sooner 30 secWhy?Why?• Stability Stability • Overhead reductionOverhead reduction
Side-effectsSide-effects• Convergence can take longerConvergence can take longer
What is the right interval?What is the right interval?• Recent studies say that 30s is too longRecent studies say that 30s is too long
Advanced Networks 91
Route Flapping and Damping
Flapping: constant alternating updatesFlapping: constant alternating updates
It can happen!It can happen!
Route update dampening:Route update dampening:• Consider stability of path before using itConsider stability of path before using it
How store “penalty” value for each pathHow store “penalty” value for each path
Issue: router needs to remember withdrawn Issue: router needs to remember withdrawn pathspaths
Advanced Networks 92
Overview up to Now
BGP is Distance VectorBGP is Distance Vector
BGP uses TCP and hard-stateBGP uses TCP and hard-state
Routing updates are “delayed” and batchedRouting updates are “delayed” and batched
Route dampening to alleviate instabilitiesRoute dampening to alleviate instabilities
Advanced Networks 93
End
Advanced Networks 94
Current Research: the AS Topology
Characterize the topology using power-laws Characterize the topology using power-laws (Faloutsos 99, Siganos et al 01)(Faloutsos 99, Siganos et al 01)
Modeling the evolution of the topologyModeling the evolution of the topology (Barabasi, Siganos01)(Barabasi, Siganos01)
Advanced Networks 95
Ongoing Research: AS paths
107 Gb of AS paths over 3 years107 Gb of AS paths over 3 years
Exponential growth, but distances remain the Exponential growth, but distances remain the same same
Inflation due to policy:Inflation due to policy:• 20% of paths are larger than they could20% of paths are larger than they could
Significant Routing Asymmetry:Significant Routing Asymmetry:• 40% paths by at least one hop40% paths by at least one hop
Advanced Networks 96
Near Future Research Plans
Mine the collected paths for patternsMine the collected paths for patterns
How stable were the paths?How stable were the paths?
Can we identify “illegal” paths?Can we identify “illegal” paths?
Identify pathologies (ie. loops) Identify pathologies (ie. loops)
Advanced Networks 97
Overview of Plans for Research
How well does BGP work now?How well does BGP work now?
How secure and robust is BGP?How secure and robust is BGP?• Cyber-terrorism: how much damage can be done?Cyber-terrorism: how much damage can be done?
How would we design BGP now?How would we design BGP now?• People are asking this questionPeople are asking this question
How well will BGP scale?How well will BGP scale?
How can we manage BGP (avoid human errors)?How can we manage BGP (avoid human errors)?
Approach:Approach:• Analytical and simulations with SSFNETAnalytical and simulations with SSFNET
Advanced Networks 98
Conclusions
BGP is an open and exciting topicBGP is an open and exciting topic
The community knows very littleThe community knows very little
Big ticket items:Big ticket items:• Measurments and modelingMeasurments and modeling• Robustness, security Robustness, security • Network Management: traffic engineeringNetwork Management: traffic engineering• ScalabilityScalability
Advanced Networks 99
Multihoming With Two Providers
Customer
ISP 1 ISP 2
ISP 3
138.39.1/24
138.39/16138.39.1/24
138.39.1/24
138.39/16
138.39.1/24
Advanced Networks 100
Policies on Transitivity
NontransitA customer should notBe transit for its Providers
Isp 1 Isp 2
AS X
Not allowed
TransitAS 1
AS 2
AS 3 AS 4
Advanced Networks 101
More BGP attributes
•Communities•Confederations•Route Reflectors
Advanced Networks 102
Convergence
Advanced Networks 103
Multi-Exit Discriminator(MED)
•Indication to external peers of the preferred path into the AS•Lowest Med Preferred
Advanced Networks 104
Note in MED
One AS sets the valuesOne AS sets the values
Another AS interpets and uses themAnother AS interpets and uses them
Thus:Thus:• Cooperative ASesCooperative ASes• Only between two ASes (1 hop scope)Only between two ASes (1 hop scope)
MED is meaningless in the next hopMED is meaningless in the next hop
MED can be used only if both routes are MED can be used only if both routes are advertised from the same ASadvertised from the same AS
Advanced Networks 105
Local Preference
Choosing paths internally Choosing paths internally
Within an AS:Within an AS:• Set Local Preference to pick the path you want to Set Local Preference to pick the path you want to
send data tosend data to
The higher Local Preference is preferredThe higher Local Preference is preferred
Advanced Networks 106
Atomic Aggregate
Sometimes we aggregate paths that are Sometimes we aggregate paths that are different (ie different AS sequence)different (ie different AS sequence)
Atomic aggregate shows that some of the Atomic aggregate shows that some of the destinations in this prefix are not necessarily destinations in this prefix are not necessarily following the same pathfollowing the same path
Advanced Networks 107
Aggregator
Notify that an aggregation took placeNotify that an aggregation took place• Which ASWhich AS• Which routerWhich router
For management and traceback purposesFor management and traceback purposes