Upload
verne
View
29
Download
0
Embed Size (px)
DESCRIPTION
CS672: MPLS Architecture, Applications and Fault-Tolerance. Stub-AS Routing Options. Provider may use one of the following options to learn about customer routes: Static routing IGP BGP Customer may use one of the following options: Default routing IGP BGP. Multihomed Stub AS Routing. - PowerPoint PPT Presentation
Citation preview
CS 672
1
Summer 2003
CS672: MPLS Architecture, Applications and Fault-Tolerance
CS 672
2
Summer 2003
Stub-AS Routing Options
• Provider may use one of the following options to learn about customer routes:• Static routing• IGP• BGP
• Customer may use one of the following options:• Default routing• IGP• BGP
CS 672
3
Summer 2003
Multihomed Stub AS Routing
• Provider may use one of the following options to learn about customer routes:• IGP• BGP (preferable for better load balancing)
• Customer may use one of the following options:• IGP• BGP (preferable for better load balancing)
CS 672
4
Summer 2003
Transit AS Routing
• In addition to advertising its own routes, a transit AS also advertises routes learned from other AS’s.• Upon learning routes advertised by a transit AS, other AS’s direct traffic toward
transit AS for certain routes.• A transit AS uses BGP-4 for routing between other AS’s
CS 672
5
Summer 2003
Transit AS
AS 1
destinations (d1,d2,d3) destinations (d4,d5,d6)
AS 2
AS 3
destinations (d7,d8,d9)
BGPBGP (d4,d5,d6)
(d1,d2,d3)(d1,d2,d3,…, d8,d9)
CS 672
6
Summer 2003
Guidelines for BGP Usage
• The Internet may be considered as an interconnection of transit, multihomed (non-transit), and stub AS’s.• Single- and Multihomed Stub Autonomous Systems
may use protocols other than BGP (e.g., EGP, IGP, static routes) however, use of BGP for advertising reachability information is recommended
• Transit Autonomous Systems use BGP-4 for distributing routing information between multiple transit AS’s.
• Using BGP inside an AS• BGP is mainly used for exchanging routing information between autonomous systems (inter-AS)• However, BGP can be used to carry routing information across inside the AS
CS 672
7
Summer 2003
Introduction to BGP-4
• Border Gateway Protocol (BGP) is an an exterior gateway protocol• main function of BGP is to allow exchange of routing information between BGP peers in different AS’s.• routers that run BGP are known as BGP speakers.• BGP version 4 (BGP-4) is the de-facto standard for inter-AS routing• BGP-4 obsoletes the earlier versions 1-3
• BGP can also be used inside of an AS (e.g., as a pipe) to carry external routing information across the AS.• Use of BGP inside an AS protects non-BGP speakers from potentially large number of external routing
information.• Provides better control in selecting the exit and entrance points for the AS’s traffic.
CS 672
8
Summer 2003
Motivations for BGP-4
• Existing IGP (e.g., OSPF, IS-IS, RIP) protocols are not designed for routing in large global networks. Some of the factors include:
• Lack of mechanism to partition large networks into politically independent technical administrations (e.g., governments, institutions etc.)
• Count to infinity limitation of distance vectors protocols such as RIP• Excessive control traffic generated by periodic updates of entire routing
table (e.g., RIP).
CS 672
9
Summer 2003
Motivations for BGP-4
• Lack of mechanism to suppress excessive control traffic generated due unstable links flaps (i.e., up/down events) in link state protocols (e.g., OSPF)• The processing and path recompilations due to excessive control traffic can easily
overload control processor in the router• Lack of support for route aggregation and CIDR
• Growth of table size becomes unmanageable in large networks• Lack of effective mechanism to enforce policies (e.g., selection of
routes,control of route redistribution)
CS 672
10
Summer 2003
BGP Routing Model
• BGP is a path vector protocol because it exchanges complete AS path information between peers.• A BGP speaker can constructs a graph of autonomous systems interconnection based on the exchanged routing
information• The use of full path information enables:
• Detection of BGP speaker routing loops• Elimination of count-to-infinity problems associated with distance vector protocols• Enforcement of policies based on configurations
Provides effective mechanisms for route selection and controlling redistribution of routing information.• BGP supports CIDR and aggregation of routing information
• Reduction of table size• Scalability
CS 672
11
Summer 2003
AS Topology Graph
Vertex – represents an ASPath (or edge) – represents interconnection between two AS.Route – collection of path information form a route.
AS1
AS2
AS3
AS4
Path
Routing Flow
Traffic flow
Route – (AS1, AS2, AS3)
CS 672
12
Summer 2003
BGP Session
• BGP uses TCP for reliable delivery of its messages• For establishing connection with neighbors, BGP uses TCP port 179• Before any routing exchange can take place, a TCP connection must be established
between two BGP peers• To establish TCP connection, BGP uses TCP port 179
• After TCP connection establishment, BGP session parameters are negotiated.• After BGP session parameters have been negotiated:
• during the initial update the complete entire routing table information is exchanged between neighbors• afterwards, only incremental updates take place.
CS 672
13
Summer 2003
External BGP Session
• BGP speakers may reside in the same AS or different AS’s• A BGP session between two speakers in different AS’s is known as
external BGP (eBGP) session.• An eBGP session requires that the two BGP peers be directly connected
(e.g., shared data between two AS’s)• Cisco routers have removed the requirement of physical connectivity for
eBGP session.
CS 672
14
Summer 2003
Internal BGP Session
• A session between two speakers in the same AS is known as internal BGP (iBGP) session.
• An eBGP session can be established between directly or indirectly connected BGP speakers.
CS 672
15
Summer 2003
eBGP and iBGP Sessions
• How does a BGP speaker know whether a BGP session internal or external?• During BGP session establishment, BGP peers exchange AS numbers. • Therefore, determination of a BGP session as iBGP or eBGP is based on
comparison of AS numbers. • If the AS numbers are same, the session is iBGP.• Otherwise, eBGP.
CS 672
16
Summer 2003
AS 300
AS 200
R1
R2
R3
R4
R6 R7R5
iBGP peers
eBGP peers
iBGP peersiBGP peers
CS 672
17
Summer 2003
BGP Messages
• Each BGP message has a fixed size header that contains following fields:• Marker• Length• Type (i.e., BGP message type)
• BGP defines following message types:• Open• KeepAlive• Notification• Update
CS 672
18
Summer 2003
BGP Message Fixed Header
Length (2 byte) Type (1 byte)
0 7 15 23 31
Marker (16 byte)
Total size of the fixed header = 16+2+1 = 19 Byte
CS 672
19
Summer 2003
BGP Open Message
• After establishing TCP connection, each speaker sends a BGP Open message• BGP Open contains fields such as:
• Version• My Autonomous System• Hold Time• BGP Identifier• Optional Parameters
• If the values of the parameters are acceptable, the receiving side sends back KeepAlive message as an acknowledgement.
• Upon receipt of KeepAlive, other messages (e.g., Update, KeepAlive etc.) are exchanged.
CS 672
20
Summer 2003
BGP Open Message
0 7 15 23 31
Version (1 byte)
My Autonomous System (2 byte)
BGP Identifier (4 byte)
Op Parameter Len (1 byte)
TLV Encoded Optional Parameters
CS 672
21
Summer 2003
BGP KeepAlive Message
• BGP peers send periodic KeepAlive messages to avoid Hold timer expiration• For example, every 1/3 of Hold Timer period a KeepAlive message is sent
• The two BGP peers may negotiate to not send any KeepAlive. For example,• If Hold Time = 0, KeepAlive is never sent.
• KeepAlive message only contains fixed length header (19 bytes)
CS 672
22
Summer 2003
BGP Notification Message
• Whenever an error condition is encountered, BGP sends a Notification message.• Following transmission of a notification message, the associated TCP
connections is immediately closed.• In addition to the fixed sized header, Notification message contains following
fields:• Error Code (e.g., 1= Message Hdr Error, 2=Open Msg Error, …)• Error Subcode• Data to help troubleshooting the error.
CS 672
23
Summer 2003
OpenConfirm
Established
OpenSent
Active Connect
Idle
1,9,11,12
2-8,10,13(see note)
2,4,6,8-132,4,6,8-13
1
2,3,5-13
7
5
1,7
1
1,9
2-8,10,12,13
1,5
4
3 3
10
11
BGP Events:
1- BGP Start 8- Hold Timer Expired2- BGP Stop 9- Keep Alive Timer Expired3- BGP Transport Connection Open 10- Receive Open Message4- BGP Transport Connection Closed 11- Receive Keep Alive Message5- BGP Transport Connection Failed 12- Receive Update Message6- BGP Transport Connection Fatal Error 13-Receive Notification Message7- Connect Retry Timer Expired Note: Whenever BGP transitions Established to Idle state, it closed the TCP connectionand withdraws all routes learned on that connection.
CS 672
24
Summer 2003
BGP Update Message
• Update is the most important BGP message because it is used for exchanging routing information between BGP peers.
• Based on routing information exchanged via Update messages, BGP speakers construct graph of the AS’s topology. In short, BGP Update contains all the required information that enables BGP speakers to perform loop-free-routing.
• In addition to mandatory fixed-sized header, BGP Update may contain one or more of the following optional fields:• Network Layer Reachability Information (NLRI)• Withdrawn Routes• Path Attributes
CS 672
25
Summer 2003
Length (1 byte) Prefix (1 byte)
<length, prefix>
Unfeasible Routes Length (2 bytes)
Length (1 byte) Prefix (1 byte)
<length, prefix>
Total Path Attribute Length (2 bytes)
Withdrawn Routes (variable length)
Path Attributes
(a variable length sequence of path attributes such as AS_PATH, NEXT_HOP etc.
NLRI
Path Attributes
Unfeasible Routes
CS 672
26
Summer 2003
BGP Update Message
• In order to be able to exchange Update message, BGP session must be in established state• Update message may simultaneously
• Advertise single feasible route• But withdraw multiple routes
• What is a route?• A route is an association of the path attributes with one or more IP destination prefixes contained in the NLRI.• It is important to realize that all path attributes (carried in the Path Attribute field) apply to all IP destination
prefixes listed in the NLRI field.• This means, Update message cannot advertise more than one route
CS 672
27
Summer 2003
BGP Update Message
• How come more than one routes can be withdrawn in a single message?• A BGP speaker receiving an Update message can unambiguously can identify a
route to be withdrawn based on an IP destination address listed in the withdrawn field.
• As a result , it is possible to withdraw multiple routes simultaneously.
CS 672
28
Summer 2003
AS Topology Graph
Vertex – represents an ASPath (or edge) – represents interconnection between two AS.Route – collection of path information form a route.
AS1
AS2
AS3
AS4
Path
Routing Flow
Traffic flow
Route – (AS1, AS2, AS3)