CS 204: BGP
Jiasi Chen Lectures: MWF 12:10-1pm in WCH 139 http://www.cs.ucr.edu/~jiasi/teaching/cs204_spring16/
1
CS 204: BGP Jiasi Chen Lectures: MWF 12:10-1pm in WCH 139 - - PowerPoint PPT Presentation
CS 204: BGP Jiasi Chen Lectures: MWF 12:10-1pm in WCH 139 http://www.cs.ucr.edu/~jiasi/teaching/cs204_spring16/ 1 Overview Inter-AS routing BGP Forwarding example AS hierarchy Paper discussion 2 Autonomous Systems
Jiasi Chen Lectures: MWF 12:10-1pm in WCH 139 http://www.cs.ucr.edu/~jiasi/teaching/cs204_spring16/
1
2
3
AS6061 3b 3c 3a AS144 1c 1a 1d 1b
AS88
2a 2c 2b
networks
networks
4
Link-state? Distance vector?
AS6061 3b 3c 3a AS144 1c 1a 1d 1b
AS88
2a 2c 2b
networks
networks
routed, who routes through its net.
traffic performance:
5
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
6
AS3
AS2
3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b
networks
networks
x
a b c
Send packet on interface a, b, or c? Determine b is on least cost path, install forwarding table entry (x,b)
7
AS3
AS2
3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b
networks
networks
x Which path to choose? This is also the job of the inter-AS protocol
8
learn from inter-AS protocol that subnet x is reachable via multiple gateways use routing info from intra-AS protocol to determine costs of least-cost paths to each
hot potato routing: choose the gateway that has the smallest least cost determine from forwarding table the interface that leads to least-cost gateway. Enter that interface in forwarding table
AS3
AS2
3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b
networks
networks
x
9
10
inter-domain routing protocol
neighboring ASs.
internal routers.
reachability information and policy.
Internet: “I am here”
11
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
12
has passed
13
AS3
AS2
3b 3a AS1 1c 1a 1d 1b 2a 2c 2b
networks
networks eBGP session iBGP session
3c
14
vrouter may learn about more than 1 route to destination AS, selects route based on:
import policy to accept/decline
15
sender
also ACKs OPEN request
close connection
16
17
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 is in another AS.
18
High-level overview
19
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
20
v Router may receive multiple routes for same prefix v Has to select one route
AS3
AS2
3b 3c AS1 1c 1a 1d 2a 2c 2b
networks AS131
3a 1b
138.16.64/22
21
v Example: v AS2 AS17 to 138.16.64/22 v AS3 AS131 AS201 to 138.16.64/22 v What if there is a tie?
We’ll come back to that!
select
22
interface that begins the AS 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 AS15
111.99.86.55
2a 3a
23
vIdentifies port along the OSPF shortest path vAdds prefix-port entry to its forwarding table:
§ (dest IP , port 4)
AS3
AS2
3b 3c 3a AS1 1c 1a 1d 1b 2a 2c 2b
AS17 AS131
router port
1 2 3 4
24
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
25
Summary
§ via BGP route advertisements from other routers
§ 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
26
27
28
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
§ X does not want to route from B via X to C § .. so X will not advertise to B a route to C
A B C
W X Y
legend: customer network: provider network
29
v A advertises path AW to B v B advertises path BAW to X v 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
30
31
32
A B C
(B C A) (B A) (C B A) (C A)
33
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
34
Global Coordination,” IEEE Trans. Networking, 2001.
35