cs 204 bgp
play

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


  1. CS 204: BGP Jiasi Chen Lectures: MWF 12:10-1pm in WCH 139 http://www.cs.ucr.edu/~jiasi/teaching/cs204_spring16/ 1

  2. Overview • Inter-AS routing • BGP • Forwarding example • AS hierarchy • Paper discussion 2

  3. Autonomous Systems • Autonomous system (AS) • Unit of routing policy • ~50k ASes in use • E.g., UCR has AS#6061, AT&T has AS#144, Princeton has AS#88 3c 3a 3b 2c AS6061 other 1c 2a networks 2b other 1a 1b networks AS88 1d AS144 3

  4. Review of Routing • Inter-AS routing Link-state? • BGP Distance vector? • Intra-AS routing • RIP • OSPF 3c 3a 3b 2c AS6061 other 1c 2a networks 2b other 1a 1b networks AS88 1d AS144 4

  5. Why different Intra-, Inter-AS routing ? policy: • inter-AS: admin wants control over how its traffic routed, who routes through its net. • intra-AS: single admin, so no policy decisions needed scale: • hierarchical routing saves table size, reduced update traffic performance: • intra-AS: can focus on performance • inter-AS: policy may dominate over performance 5

  6. Interconnected ASes 3c 3a 2c 3b 2a AS3 2b 1c AS2 1a 1b AS1 1d v forwarding table configured by both intra- and inter-AS routing algorithm Intra-AS Inter-AS Routing Routing § intra-AS sets entries for algorithm algorithm internal dests Forwarding table § inter-AS & intra-AS sets entries for external dests 6

  7. Example: setting forwarding table in router 1d x 3c 3a 3b 2c AS3 other 1c 2a networks b 2b other 1a 1b networks c AS2 1d a AS1 Send packet on interface a, b, or c? Determine b is on least cost path, install forwarding table entry (x,b) 7

  8. Example: choosing among multiple ASes x 3c 3a 3b 2c AS3 other 1c 2a networks 2b other 1a 1b networks AS2 1d AS1 Which path to choose? This is also the job of the inter-AS protocol 8

  9. Example: choosing among multiple ASes x 3c 3a 3b 2c AS3 other 1c 2a networks 2b other 1a 1b networks AS2 1d AS1 determine from use routing info learn from inter-AS hot potato routing : forwarding table the from intra-AS protocol that subnet choose the gateway interface that leads protocol to determine x is reachable via that has the to least-cost gateway. costs of least-cost multiple gateways smallest least cost Enter that interface in paths to each forwarding table of the gateways 9

  10. Overview • Inter-AS routing • BGP • Forwarding example • AS hierarchy • Paper discussion 10

  11. Internet inter-AS routing: BGP • BGP (Border Gateway Protocol): the de facto inter-domain routing protocol “ glue that holds the Internet together ” • • BGP provides each AS a means to: • eBGP: obtain subnet reachability information from neighboring ASs. • iBGP: propagate reachability information to all AS- internal routers. determine “ good ” routes to other networks based on • reachability information and policy. • allows subnet to advertise its existence to rest of Internet: “ I am here ” 11

  12. BGP basics 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 • when AS3 advertises a prefix to AS1: • AS3 promises it will forward datagrams towards that prefix • AS3 can aggregate prefixes in its advertisement 3c BGP 3a message 3b 2c AS3 other 1c 2a networks 2b other 1a 1b networks AS2 1d AS1 12

  13. Path attributes and BGP routes • advertised prefix includes BGP attributes • prefix + attributes = “ route ” • two important attributes: • AS-PATH: contains ASs through which prefix advertisement has passed • NEXT-HOP: indicates specific internal-AS router to next-hop AS. (may be multiple links from current AS to next-hop-AS) 13

  14. BGP basics: distributing path information 3c eBGP session 3a iBGP session 3b 2c AS3 other 1c 2a networks 2b other 1a 1b networks AS2 1d AS1 14

  15. BGP route selection v router may learn about more than 1 route to destination AS, selects route based on: 1. local preference value attribute: policy decision 2. shortest AS-PATH 3. closest NEXT-HOP router: hot potato routing 4. additional criteria • gateway router receiving route advertisement uses import policy to accept/decline • e.g., never route through AS x • policy-based routing 15

  16. BGP messages • BGP messages exchanged between peers over TCP connection • BGP messages: • OPEN: opens TCP connection to peer and authenticates sender • UPDATE: advertises new path (or withdraws old) • KEEPALIVE: keeps connection alive in absence of UPDATES; also ACKs OPEN request • NOTIFICATION: reports errors in previous msg; also used to close connection 16

  17. Overview • Inter-AS routing • BGP • Forwarding example • AS hierarchy • Paper discussion 17

  18. How does entry get in forwarding table? routing algorithms Assume prefix is in another AS. local forwarding table entry prefix output port 138.16.64/22 3 124.12/16 2 212/8 4 ………….. … 1 Dest IP 2 3 18

  19. How does entry get in forwarding table? High-level overview 1. Router becomes aware of prefix 2. Router determines output port for prefix 3. Router enters prefix-port in forwarding table 19

  20. Router becomes aware of prefix 3c BGP message 3a 3b 2c AS3 other 1c AS15 2a networks 2b 1a 138.16.64/22 1b AS2 1d AS1 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 20

  21. Router may receive multiple routes 3c 3a 3b 2c AS3 other 1c 2a networks 2b AS131 1a 138.16.64/22 1b AS2 1d AS1 v Router may receive multiple routes for same prefix v Has to select one route 21

  22. Select best BGP route to prefix • Router selects route based on shortest AS-PATH v Example: select 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! 22

  23. Find best intra-route to BGP route • Use selected route ’ s NEXT-HOP attribute • Route ’ s NEXT-HOP attribute is the IP address of the router interface that begins the AS PATH. • Example: v AS-PATH: AS2 AS17 …; NEXT-HOP: 111.99.86.55 • Router uses OSPF to find shortest path from 1c to 111.99.86.55 3c 3a 3a 3b 111.99.86.55 2c AS3 AS17 1c 2a 2a 2b AS15 1a 1b AS2 1d AS1 23

  24. Router identifies port for route v Identifies port along the OSPF shortest path v Adds prefix-port entry to its forwarding table: § (dest IP , port 4) router 3c port 3a 3b 2c 1 AS3 AS17 4 1c 2a 2 3 2b AS131 1a 1b AS2 1d AS1 24

  25. Hot Potato Routing v Suppose there two or more best inter-routes. v Then 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 3c 3a 3b 2c AS3 AS17 1c 2a 2b AS131 1a 1b AS2 1d AS1 25

  26. How does entry get in forwarding table? Summary 1. Router becomes aware of prefix via BGP route advertisements from other routers § 2. 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 § 3. Enter prefix-port entry in forwarding table 26

  27. Overview • Inter-AS routing • BGP • Forwarding example • AS hierarchy • Paper discussion 27

  28. Overview • Inter-AS routing • BGP • Forwarding example • AS hierarchy • Paper discussion 28

  29. BGP routing policy legend : provider B network X W A customer network: C Y 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 29

  30. BGP routing policy (2) legend : provider B network X W A customer network: C Y 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! 30

  31. Overview • Inter-AS routing • BGP • Forwarding example • AS hierarchy • Paper discussion 31

  32. Stable BGP Routing • Trying to get to destination A • Routes listed in order of preference (B C A) (B A) B A (C B A) C (C A) 32

  33. Stable BGP routing • Suppose we start off with the second choice options… (B C A) (B C A) (B C A) (B A) (B A) (B A) B A (C B A) (C B A) (C B A) C (C A) (C A) (C A) time 33

  34. Paper Discussion • What are implicit and explicit policies? • What are the underlying assumptions? 34

  35. Sources • Computer Networking: A Top-Down Approach , Kurose & Ross • Lixin Gao and Jennifer Rexford, “Stable Internet Routing Without Global Coordination,” IEEE Trans. Networking , 2001. 35

Recommend


More recommend