CS 204: BGP
Jiasi Chen Lectures: MWF 12:10-1pm Humanities and Social Sciences 1403 http://www.cs.ucr.edu/~jiasi/teaching/cs204_spring17/
1
CS 204: BGP Jiasi Chen Lectures: MWF 12:10-1pm Humanities and - - PowerPoint PPT Presentation
CS 204: BGP Jiasi Chen Lectures: MWF 12:10-1pm Humanities and Social Sciences 1403 http://www.cs.ucr.edu/~jiasi/teaching/cs204_spring17/ 1 Overview AS relationships Q: How to glue together Inter-AS routing the network of
Jiasi Chen Lectures: MWF 12:10-1pm Humanities and Social Sciences 1403 http://www.cs.ucr.edu/~jiasi/teaching/cs204_spring17/
1
2
Q: How to “glue together” the “network of networks”?
3 Source: https://www.cnet.com/news/how-pakistan-knocked-youtube-offline-and-how-to-make-sure-it-never-happens-again/
4 Source: https://www.cnet.com/news/how-pakistan-knocked-youtube-offline-and-how-to-make-sure-it-never-happens-again/
5
Q: How to “glue together” the “network of networks”?
AS6061 3b 3c 3a AS144 1c 1a 1d 1b
AS88
2a 2c 2b
networks
networks
6
7
Peer Peer
costs Transit provider Transit customer
customer to provider for upstream and downstream traffic
8
9
B D A C B D A C
10
B D A C
Peering connection only open to customers Q: Will C announce B to D?
11
Who can network G see?
because networks E, D and H buy transit from it. Can A see B through F?
customers directly, but not network B through network F. Can C see B through D or F?
peer D, but not via its transit customer F. Will traffic from C to H go through E or D or both?
not through D.
Source: https://arstechnica.com/features/2008/09/peering-and-transit/2/
12
13
Q: How to “glue together” the “network of networks”?
Link-state? Distance vector?
AS6061 3b 3c 3a AS144 1c 1a 1d 1b
AS88
2a 2c 2b
networks
networks
14
routed, who routes through its net.
traffic performance:
15
inter-domain routing protocol
neighboring ASs.
internal routers.
reachability information and policy.
Internet: “I am here”
16
AS3
AS2
3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b
networks
networks
v BGP session: two BGP routers (“peers”) exchange BGP
messages:
§ advertising paths to different destination network prefixes (“path vector” protocol) § exchanged over semi-permanent TCP connections
BGP message
17
has passed
AS
vExample
v Prefix: 138.16.64/22 v AS-PATH: AS3 AS15 … v NEXT-HOP: 201.44.13.125
18
AS3
AS2
3b 3a AS1 1c 1a 1d 1b 2a 2c 2b
networks
networks eBGP session iBGP session
3c
19
sender
also ACKs OPEN request
close connection
20
21
Q: How to “glue together” the “network of networks”?
3b 1d 3a 1c 2a AS3 AS1
AS2
1a 2c 2b 1b
Intra-AS Routing algorithm Inter-AS Routing algorithm
Forwarding table
3c
vforwarding table configured by both intra- and inter-AS routing algorithm § intra-AS sets entries for internal dests § inter-AS & intra-AS sets entries for external dests
22
1
2 3
Dest IP
routing algorithms local forwarding table prefix
138.16.64/22 124.12/16 212/8 ………….. 3 2 4 …
entry
Assume prefix 138.16.64/22 is in another AS.
23
High-level overview
24
AS3
AS2
3b 3c AS1 1c 1a 1d 2a 2c 2b
networks
BGP message v BGP message contains “routes” v “route” is a prefix and attributes: AS-PATH, NEXT-
HOP,…
v Example v Prefix: 138.16.64/22 v AS-PATH: AS3 AS15 … v NEXT-HOP: 201.44.13.125
138.16.64/22
3a 1b
AS15
25
v Router may receive multiple routes for same prefix v Which route to pick?
AS3
AS2
3b 3c AS1 1c 1a 1d 2a 2c 2b
networks AS131
3a 1b
138.16.64/22
26
138.16.64/22
v AS3 AS131 AS201 to 138.16.64/22 v AS2 AS17 to 138.16.64/22
select
27
AS3
AS2
3b 3c AS1 1c 1a 1d 2a 2c 2b
networks AS131
3a 1b
138.16.64/22 138.16.64/22
PATH
v AS-PATH: AS2 AS17 …; NEXT-HOP: 111.99.86.55
111.99.86.55
AS3
AS2
3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b
AS17 AS131
2a 3a
28
111.99.86.55 138.16.64/22 138.16.64/22 1 2 3 4
vSuppose there two or more best inter-routes. vThen choose route with closest NEXT-HOP
§ Use OSPF to determine which gateway is closest § Q: From 1c, chose AS3 AS131 or AS2 AS17? § A: route AS3 AS131 since it is closer
AS3
AS2
3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b
AS17 AS131
29
v A,B,C are provider networks v X,W,Y are customer (of provider networks) v X is dual-homed: attached to two networks
A B C
W X Y
legend: customer network: provider network
30
v A advertises path AW to B v B advertises path BAW to X v Q: Should B advertise path BAW to C?
§ No way! B gets no “revenue” for routing CBAW since neither W nor C are B’s customers § B wants to force C to route to w via A § B wants to route only to/from its customers!
A B C
W X Y
legend: customer network: provider network
31
Summary 1. Router becomes aware of prefix
§ via BGP route advertisements from other routers
2. Filter the route based on policy ($$$) 3. Determine router output port for prefix
§ Use BGP route selection to find best inter-AS route § Use OSPF to find best intra-AS route leading to best inter- AS route § Router identifies router port for that best route
4. Enter prefix-port entry in forwarding table
32
33
IP address AS# AS# AS# Relationship
34
Q: What is the difference between IP address blocks and AS#?
35
Q: How to “glue together” the “network of networks”?
A B C
(B C A) (B A) (C B A) (C A)
36
A B C
(B C A) (B A) (C B A) (C A) (B C A) (B A) (C B A) (C A)
time
37
A B C
(B C A) (B A) (C B A) (C A) (B C A) (B A) (C B A) (C A) (B C A) (B A) (C B A) (C A)
time
38
39
Global Coordination,” IEEE Trans. Networking, 2001.
40