E6998-02: Internet Routing: Border Gateway Protocol, Part III
E6998-02: Internet Routing: Border Gateway Protocol, Part III
Announcements
Lectures 1-14 are available. Still looking for a TA. Acknowledgement: some of the slides for this lecture have been inspired by Tim Griffins BGP Tutorial.
How do A, C and D learn about AS2s routes? Ditto for Y, Z, T about AS1s routes? I.E., how are prefixes learned by an ASBR distributed inside the AS?
October 22nd, 2002 Lecture 14 of E6998-02: Internet Routing 3
AS 9
AS 1 A D
C1
C2
C3
AS1 exports C1s prefix to AS2. AS1 accepts C2s prefix from AS2. AS2 accepts C1s prefix from AS1 AS2 does not export any prefixes learned from AS3 to AS1.
Lecture 14 of E6998-02: Internet Routing 10
AS 5
AS 4
C1
October 22nd, 2002
C2
Lecture 14 of E6998-02: Internet Routing
C3
C4
11
12
Imported Routes
Routes arrive from various sources: provider ( customer ( $ ), and own IGP ( ). From provider AS 3 From peer $ $ From customer $ $ $
13
), peer (
),
From provider
$ From peer
From customer $
October 22nd, 2002
$
Lecture 14 of E6998-02: Internet Routing
Exported Routes
Filters ( ) block peer and provider routes! $ $ $ $
To provider $
To peer $
$ To customer $
Lecture 14 of E6998-02: Internet Routing
$
14
15
COMMUNITY
Specified in RFC 1997. Encodes arbitrary properties. E.g., all of customers routes get a specific COMMUNITY. Much of the policy is specified using communities. Optional, Non-transitive. Type=8 List of community values (length is multiple of 4). Each prefix can belong to multiple communities. Each community value is 4 bytes: (e.g., 7018:100) 2 bytes ASN (by convention). 2 bytes administratively defined (no predefined meaning).
16
COMMUNITY, contd
0x00000000 through 0x0000FFFF are reserved. 0xFFFF0000 through 0xFFFFFFFF are reserved. 0xFFFFFF01: NO_EXPORT 0xFFFFFF02: NO_ADVERTISE 0xFFFFFF03: NO_EXPORT_SUBCONFED
Community values have local (intra-AS) meaning. Community values can also have meaning between two neighboring ASes (following bilateral agreement). Terminology: Route Coloring.
17
COMMUNITY Example
When AS3 imports routes, it colors them with the appropriate community string. From customers ( $ ): 3:100. From peers ( ): 3:200. From providers ( ): 3:300. When AS3 exports routes, it picks them according to their community string. To customers: 3:100, 3:200, 3:300 To peers: 3:100 To providers: 3:100
18
AS 2 AS 5 AS 3 128.59.0.0/16 C1
October 22nd, 2002
AS 6
AS 4
legitimate
AS 2 AS 5 AS 3 128.59.0.0/16 C1
October 22nd, 2002
AS 6
AS 4
legitimate
22
$ mcmcmcmc
From customer $
October 22nd, 2002
$
Lecture 14 of E6998-02: Internet Routing
AS 2
Adj-RIB-In-2 Adj-RIB-In-2
Input Policy
Adj-RIB-Out-2 Adj-RIB-Out-2
AS n
Adj-RIB-In-n Adj-RIB-In-n
FIB FIB
Adj-RIB-Out-n Adj-RIB-Out-n
24
Input Policy
Apply input filtering. Routes that are dropped here are not used internally. Nor are they advertised. They are dead! Tweak attributes: Set LOCAL_PREF, add COMMUNITY Select best route. Based on Path Attributes. Create Route table. Populate Forwarding table.
25
26
B learns route to AS2 over E-BGP from K. B learns route to AS2 over I-BGP from C (who learned it from L). Same local pref, as_path length, origin, etc. Obviously should use K!
October 22nd, 2002 Lecture 14 of E6998-02: Internet Routing 27
AS 1
AS 9 AS 3
AS 2
AS 4 9.5.0.0/16
October 22nd, 2002 Lecture 14 of E6998-02: Internet Routing 28
AS 1
LOCAL_PREF=80 LOCAL_PREF=90
AS 9
AS 2
LOCAL_PREF=100
AS 3 AS 4 9.5.0.0/16
October 22nd, 2002 Lecture 14 of E6998-02: Internet Routing 29
Alternatively
Now shortest AS_PATH takes effect!
AS 1
LOCAL_PREF=100 LOCAL_PREF=90
AS 9
AS 2
LOCAL_PREF=80
AS 3 AS 4 9.5.0.0/16
October 22nd, 2002 Lecture 14 of E6998-02: Internet Routing 30
LOCAL_PREF=100
LOCAL_PREF=50
AS 2
31
AS 1
LOCAL_PREF=100
LOCAL_PREF=50
AS 2
32
Back to AS_PATH
Traffic often follows reverse of AS_PATH:
12.2.61.0/24 1 AS 1
12.2.61.0/24 1 2 AS 2 AS 3
12.2.61.0/24 1 2 3 AS 4
33
But it might not! AS2 filters prefixes longer than /24. Packet to 12.2.61.19 actually makes it to AS5. 12.2.0.0/16 1 2 AS 2 12.2.61.0/25 5 AS 5 AS 3 12.2.0.0/16 1 2 3 AS 4
12.2.0.0/16 1 AS 1
34
Shortest AS_PATH?
A AS 1 B AS 2 AS 5
D AS 3
E 1 2 3 4 or 1 5 4?
AS 4
35
a 2
AS 2
October 22nd, 2002 Lecture 14 of E6998-02: Internet Routing 36
a 222222
AS 1
AS 9
LOCAL_PREF=100
a 2
AS 2
October 22nd, 2002 Lecture 14 of E6998-02: Internet Routing 37
a 222222
38
Policy Interaction
Example: backup route with community hack. AS4 advertises prefix a over its (only) link.
LOCAL_PREF=90
AS 2
AS 3
LOCAL_PREF=100
a 1
AS 1
October 22nd, 2002 Lecture 14 of E6998-02: Internet Routing
AS 4
39
AS 2 a 12
AS 3 a 123
LOCAL_PREF=80 LOCAL_PREF=100
a 1
AS 4 a 1 4:70
Lecture 14 of E6998-02: Internet Routing 40
AS 1
October 22nd, 2002
AS 2 a 143
AS 3 a 14
LOCAL_PREF=80 LOCAL_PREF=100
AS 4 AS 1
October 22nd, 2002
a 1 4:70
Lecture 14 of E6998-02: Internet Routing 41
AS 2 a 12
AS 3 a 14
LOCAL_PREF=80 LOCAL_PREF=100
a 1
AS 4 a 1 4:70
Lecture 14 of E6998-02: Internet Routing 42
AS 1
October 22nd, 2002