BGP Tutorial Simplified
BGP Tutorial Simplified
Physical connectivity is
just the beginning of the
story….
Partial View of www.cl.cam.ac.uk
(128.232.0.20) Neighborhood
AS 3356 AS 6461 AS 1239
AS 702
Level 3 AboveNet Sprint
UUNET
AS 20965
AS 786 GEANT
AS 5459 ja.net
LINX AS 1213
(UKERNA)
HEAnet
Originates > 180 prefixes, (Irish academic
Including 128.232.0.0/16 and research)
AS 4373
AS 7 Online Computer
UK Defense Library Center
Research Agency
Architecture of Dynamic Routing
IGP
EGP (= BGP)
AS 1
OSPF
IGP RIP
IS-IS
EGP BGP
AS Numbers (ASNs)
ASNs are 16 bit values.
64512 through 65535 are “private”
• Genuity: 1
• MIT: 3
• JANET: 786
• UC San Diego: 7377
• AT&T: 7018, 6341, 5074, …
• UUNET: 701, 702, 284, 12199, …
• Sprint: 1239, 1240, 6211, 6242, …
• …
. . .
*>i192.35.25.0 134.159.0.1 50 0 16779 1 701 703 i
*>i192.35.29.0 166.49.251.25 50 0 5727 7018 14541 i
*>i192.35.35.0 134.159.0.1 50 0 16779 1 701 1744 i
*>i192.35.37.0 134.159.0.1 50 0 16779 1 3561 i
*>i192.35.39.0 134.159.0.3 50 0 16779 1 701 80 i
*>i192.35.44.0 166.49.251.25 50 0 5727 7018 1785 i
*>i192.35.48.0 203.62.248.34 55 0 16779 209 7843 225 225 225 225 225 i
*>i192.35.49.0 203.62.248.34 55 0 16779 209 7843 225 225 225 225 225 i
*>i192.35.50.0 203.62.248.34 55 0 16779 3549 714 714 714 i
*>i192.35.51.0/25 203.62.248.34 55 0 16779 3549 14744 14744 14744 14744 14744 14744 14744 14744 i
. . .
The subgraph showing all ASes that have more than 100 neighbors in full
graph of 11,158 nodes. July 6, 2001. Point of view: AT&T route-server
AS Graphs Do Not Show “Topology”!
The AS graph
may look like this. Reality may be closer to this…
How Many ASNs are there today?
15,981
18,217
154,894
Note: numbers
actually depends
point of view…
179,903
Note: numbers
actually depends
point of view…
15
BGP Operations (Simplified)
BGP session
Exchange all
active routes
AS2
While connection
Exchange incremental is ALIVE exchange
route UPDATE messages
updates 16
Four Types of BGP Messages
192.0.2.0/24 192.0.2.0/24
pick me! pick me!
Given multiple
192.0.2.0/24 routes to the same
prefix, a BGP speaker
pick me!
135.207.0.0/16
AS 1755
135.207.0.0/16
AS Path = 1239 7018 6341 Ebone AS Path = 1129 1755 1239 7018 6341
AS 1239 AS 12654
135.207.0.0/16 RIPE NCC
AS Path = 7018 6341 RIS project
Sprint
135.207.0.0/16
AS7018 AS Path = 3549 7018 6341
135.207.0.0/16
AS Path = 6341
AT&T
AS 6341 135.207.0.0/16
AS 3549
AT&T Research AS Path = 7018 6341 Global Crossing
135.207.0.0/16
Prefix Originated 19
Policy-Based vs. Distance-Based Routing?
ISP3
Host 2
ISP2
Cust3 Cust2
20
Why not minimize “AS hop count”?
NO
Cust3 Cust1
Cust2
21
Shortest path routing is not compatible with commercial relations
Customers and Providers
provider
customer
peer peer
Peers provide transit between
provider customer
their respective customers
Two parts:
From From
provider provider
From From
peer peer
From From
customer customer
Export Routes
provider route peer route customer route ISP route
To From
provider provider
To To
peer peer
To To
customer customer
filters
block
The Border Gateway Protocol (BGP)
+ “optional” extensions
RFC 1997 (communities) RFC 2439 (damping) RFC 2796 (reflection) RFC3065 (confederation) …
Install forwarding
Entries for best
Routes.
IP Forwarding Table
30
Shorter Doesn’t Always Mean Shorter
still scale? AS 3
Exporting internal
state would AS 2
dramatically
increase global
instability and
amount of routing
state AS 1
Routing Example 1
Routing Example 2
Tweak Tweak Tweak (TE)
AS 1
35
Multihomed Backups
(Outbound Traffic)
AS 1 AS 3
provider provider
AS 2
Forces outbound traffic to take primary link, unless link is down.
36
Shedding Inbound Traffic with
ASPATH Prepending
192.0.2.0/24 192.0.2.0/24
ASPATH = 2 ASPATH = 2 2 2
primary backup
AS 1 AS 3
provider
provider
192.0.2.0/24 192.0.2.0/24
ASPATH = 2 ASPATH = 2 2 2 2 2 2 2 2 2 2 2 2 2 2
AS 3: normal
AS 1 AS 3 customer local
pref is 100,
provider
provider peer local pref is 90
192.0.2.0/24 192.0.2.0/24
ASPATH = 2 ASPATH = 2
COMMUNITY = 3:70
primary backup
Customer import policy at AS 3:
customer 192.0.2.0/24 If 3:90 in COMMUNITY then
AS 2 set local preference to 90
If 3:80 in COMMUNITY then
set local preference to 80
If 3:70 in COMMUNITY then
set local preference to 70
39
What the heck is going on?
Is this any
way to run an
Internet?
http://www.larrysface.com/