1 / 85

Computer Networks (Graduate level)

Computer Networks (Graduate level). Lecture 7: Inter-domain Routing. University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani. Inter-Domain Routing. Border Gateway Protocol (BGP) Assigned reading [LAB00] Delayed Internet Routing Convergence Sources

creda
Download Presentation

Computer Networks (Graduate level)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Networks(Graduate level) Lecture 7: Inter-domain Routing University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Computer Network

  2. Inter-Domain Routing • Border Gateway Protocol (BGP) • Assigned reading • [LAB00] Delayed Internet Routing Convergence • Sources • RFC1771: main BGP RFC • RFC1772-3-4: application, experiences, and analysis of BGP • RFC1965: AS confederations for BGP • Christian Huitema: “Routing in the Internet”, chapters 8 and 9. • John Stewart III: “BGP4 - Inter-domain routing in the Internet” Computer Network

  3. Outline • External BGP (E-BGP) • Internal BGP (I-BGP) • Multi-Homing • Stability Issues Computer Network

  4. Internet’s Area Hierarchy • What is an Autonomous System (AS)? • A set of routers under a single technical administration, using an interior gateway protocol (IGP) and common metrics to route packets within the AS and using an exterior gateway protocol (EGP) to route packets to other AS’s • Sometimes AS’s use multiple IGPs and metrics, but appear as single AS’s to other AS’s • Each AS assigned unique ID • AS’s peer at network exchange routing information. Computer Network

  5. Example 1 2 IGP 2.1 2.2 IGP EGP 1.1 2.2.1 1.2 EGP EGP EGP 3 4.2 4.1 IGP EGP 4 IGP 5 3.2 3.1 IGP 5.2 5.1 Computer Network

  6. History • Mid-80s: EGP • Reachability protocol (no shortest path) • Did not accommodate cycles (tree topology) • Evolved when all networks connected to NSF backbone • Result: BGP introduced as routing protocol • Latest version = BGP 4 • BGP-4 supports CIDR • Primary objective: connectivity not performance Computer Network

  7. Choices • Link state or distance vector? • No universal metric – policy decisions • Problems with distance-vector: • Bellman-Ford algorithm may not converge • Problems with link state: • Metric used by routers not the same – loops • LS database too large – entire Internet • May expose policies to other AS’s Computer Network

  8. Solution: Distance Vector with Path • Each routing update carries the entire path • Loops are detected as follows: • When AS gets route check if AS already is in path • If yes, reject route • If no, add self and (possibly) advertise route further • Advantage: • Metrics are local - AS chooses path, protocol ensures no loops Computer Network

  9. Interconnecting BGP Peers • BGP uses TCP to connect peers • Advantages: • Simplifies BGP • No need for periodic refresh - routes are valid until withdrawn, or the connection is lost • Incremental updates • Disadvantages • Congestion control on a routing protocol? • Poor interaction during high load Computer Network

  10. Hop-by-hop Model • BGP advertises to neighbors only those routes that it uses • Consistent with the hop-by-hop Internet paradigm • e.g., AS1 cannot tell AS2 to route to other AS’s in a manner different than what AS2 has chosen (need source routing for that) Computer Network

  11. AS Categories • Stub: an AS that has only a single connection to one other AS - carries only local traffic. • Multi-homed: an AS that has connections to more than one AS, but does not carry transit traffic • Transit: an AS that has connections to more than one AS, and carries both transit and local traffic (under certain policy restrictions) Computer Network

  12. AS Categories AS1 AS3 AS1 AS2 AS1 AS3 AS2 Transit Stub AS2 Multi-homed Computer Network

  13. Policy with BGP • BGP provides capability for enforcing various policies • Policies are not part of BGP: they are provided to BGP as configuration information • BGP enforces policies by choosing paths from multiple alternatives and controlling advertisement to other AS’s Computer Network

  14. Examples of BGP Policies • A multi-homed AS refuses to act as transit • Limit path advertisement • A multi-homed AS can become transit for some AS’s • Only advertise paths to some AS’s • An AS can favor or disfavor certain AS’s for traffic transit from itself Computer Network

  15. Routing Information Bases (RIB) • Routes are stored in RIBs • Adj-RIBs-In: routing info that has been learned from other routers (unprocessed routing info) • Loc-RIB: local routing information selected from Adj-RIBs-In (routes selected locally) • Adj-RIBs-Out: info to be advertised to peers (routes to be advertised) Computer Network

  16. BGP Common Header 1 2 3 0 Marker (security and message delineation) 16 bytes Length (2 bytes) Type (1 byte) Types: OPEN, UPDATE, NOTIFICATION, KEEPALIVE Computer Network

  17. BGP OPEN message 1 2 3 0 Marker (security and message delineation) Length Type: open version My autonomous system Hold time BGP identifier Optional parameters <type, length, value> Parameter length My AS: id assigned to that AS Hold timer: max interval between KEEPALIVE or UPDATE messages interval implies no keep_alive. BGP ID: IP address of one interface (same for all messages) Computer Network

  18. BGP UPDATE message 1 2 3 0 Marker (security and message delineation) Length Type: update Withdrawn.. ..routes len Withdrawn routes (variable) ... Path attribute len Path attributes (variable) Network layer reachability information (NLRI) (variable) • Many prefixes may be included in UPDATE, but must • share same attributes. • UPDATE message may report multiple withdrawn routes. Computer Network

  19. BGP UPDATE Message • List of withdrawn routes • Network layer reachability information • List of reachable prefixes • Path attributes • Origin • Path • Metrics • All prefixes advertised in a message have same path attributes Computer Network

  20. NLRI • Network Level Reachability Information • list of IP address prefixes encoded as follows: Length (1 byte) Prefix (variable) Computer Network

  21. Path attributes Type-Length-Value encoding Attribute type (2 bytes) Attribute length (1-2 bytes) Attribute Value (variable length) Attribute type field Attribute flags (1 byte) Attribute type code (1 byte) Flags: optional, v.s. well-known transitive, partial, extended length Computer Network

  22. BGP NOTIFICATION message 1 2 3 0 Marker (security and message delineation) Length Type: NOTIFICATION Error code Data Error sub-code • Used for error notification • TCP connection is closed immediately after notification Computer Network

  23. BGP KEEPALIVE message 1 2 3 0 Marker (security and message delineation) Length Type: KEEPALIVE Sent periodically to peers to ensure connectivity. If hold_time is zero, messages are not sent.. Sent in place of an UPDATE message Computer Network

  24. Path Selection Criteria • Information based on path attributes • Attributes + external (policy) information • Examples: • Hop count • Policy considerations • Preference for AS • Presence or absence of certain AS • Path origin • Link dynamics Computer Network

  25. Route Selection Summary Highest Local Preference Enforce relationships Shortest ASPATH Lowest MED traffic engineering i-BGP < e-BGP Lowest IGP cost to BGP egress Throw up hands and break ties Lowest router ID Computer Network

  26. peer peer provider customer Back to Frank … Local preference only used in iBGP AS 4 local pref = 80 AS 3 local pref = 90 local pref = 100 AS 2 AS 1 Higher Local preference values are more preferred 13.13.0.0/16

  27. Implementing Backup Links with Local Preference (Outbound Traffic) AS 1 primary link backup link Set Local Pref = 100 for all routes from AS 1 Set Local Pref = 50 for all routes from AS 1 AS 65000 Forces outbound traffic to take primary link, unless link is down. We’ll talk about inbound traffic soon …

  28. Multihomed Backups (Outbound Traffic) AS 1 AS 3 provider provider primary link backup link Set Local Pref = 100 for all routes from AS 1 Set Local Pref = 50 for all routes from AS 3 AS 2 Forces outbound traffic to take primary link, unless link is down.

  29. AS 1239 Sprint ASPATH Attribute AS 1129 135.207.0.0/16 AS Path = 1755 1239 7018 6341 Global Access AS 1755 135.207.0.0/16 AS Path = 1239 7018 6341 135.207.0.0/16 AS Path = 1129 1755 1239 7018 6341 Ebone AS 12654 RIPE NCC RIS project 135.207.0.0/16 AS Path = 7018 6341 AS7018 135.207.0.0/16 AS Path = 3549 7018 6341 135.207.0.0/16 AS Path = 6341 AT&T AS 3549 AS 6341 135.207.0.0/16 AS Path = 7018 6341 AT&T Research Global Crossing 135.207.0.0/16 Prefix Originated

  30. COMMUNITY Attribute to the Rescue! AS 3: normal customer local pref is 100, peer local pref is 90 AS 1 AS 3 provider provider 192.0.2.0/24 ASPATH = 2 COMMUNITY = 3:70 192.0.2.0/24 ASPATH = 2 primary backup Customer import policy at AS 3: If 3:90 in COMMUNITY then 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 customer 192.0.2.0/24 AS 2

  31. Hot Potato Routing: Go for the Closest Egress Point 192.44.78.0/24 egress 2 egress 1 IGP distances 56 15 This Router has two BGP routes to 192.44.78.0/24. Hot potato: get traffic off of your network as Soon as possible. Go for egress 1!

  32. Heavy Content Web Farm Getting Burned by the Hot Potato 2865 High bandwidth Provider backbone 17 SFF NYC Low bandwidth customer backbone 56 15 San Diego Many customers want their provider to carry the bits! tiny http request huge http reply

  33. Heavy Content Web Farm Cold Potato Routing with MEDs(Multi-Exit Discriminator Attribute) Prefer lower MED values 2865 17 192.44.78.0/24 MED = 56 192.44.78.0/24 MED = 15 56 15 192.44.78.0/24 This means that MEDs must be considered BEFORE IGP distance! Note1 : some providers will not listen to MEDs Note2 : MEDs need not be tied to IGP distance

  34. Route Selection Summary Highest Local Preference Enforce relationships Shortest ASPATH Lowest MED traffic engineering i-BGP < e-BGP Lowest IGP cost to BGP egress Throw up hands and break ties Lowest router ID This is somewhat simplified. Hey, what happened to ORIGIN?? Computer Network

  35. Policies Can Interact Strangely(“Route Pinning” Example) backup customer 1 2 Install backup link using community 3 Disaster strikes primary link and the backup takes over 4 Primary link is restored but some traffic remains pinned to backup Computer Network

  36. Path Attributes • Categories (recall flags): • well-known mandatory (passed on) • well-known discretionary (passed on) • optional transitive (passed on) • optional non-transitive (if unrecognized, not passed on) • Optional attributes allow for BGP extensions Computer Network

  37. Path attribute message format (repeated) Attribute flags Attribute type code O T P E 0 O: optional or well-known T: transitive or local P: partially evaluated E: length in 1 or 2 bytes Origin AS_path Next hop etc. Computer Network

  38. ORIGIN path attribute • Well-known, mandatory attribute. • Describes how a prefix was generated at the origin AS. Possible values: • IGP: prefix learned from IGP • EGP: prefix learned through EGP • INCOMPLETE: none of the above (often seen for static routes) Computer Network

  39. AS_PATH attribute • Well-known, mandatory attribute. • Important components: • list of traversed AS’s • If forwarding to internal peer: • do not modify AS_PATH attribute • If forwarding to external peer: • prepend self into the path Computer Network

  40. Next hop path attribute • Well-known, mandatory attribute • NEXT_HOP: IP address of border router to be used as next hop • Usually, next hop is the router sending the UPDATE message • Useful when some routers do not speak BGP Computer Network

  41. Example of NEXT_HOP A (BGP) UPDATE MSG through BGP B (BGP) Traffic to 138.39.0.0/16 C (no BGP) 138.39.0.0/16 Computer Network

  42. LOCAL PREF • Local (within an AS) mechanism to provide relative priority among BGP routers R5 R1 AS 200 R2 AS 100 AS 300 R3 Local Pref = 500 Local Pref =800 R4 I-BGP AS 256 Computer Network

  43. AS_PATH • List of traversed AS’s AS 200 AS 100 170.10.0.0/16 180.10.0.0/16 AS 300 180.10.0.0/16 300 200 100 170.10.0.0/16 300 200 AS 500 Computer Network

  44. CIDR and BGP AS X 197.8.2.0/24 AS T (provider) 197.8.0.0/23 AS Z AS Y 197.8.3.0/24 What should T announce to Z? Computer Network

  45. Options • Advertise all paths: • Path 1: through T can reach 197.8.0.0/23 • Path 2: through T can reach 197.8.2.0/24 • Path 3: through T can reach 197.8.3.0/24 • But this does not reduce routing tables! We would like to advertise: • Path 1: through T can reach 197.8.0.0/22 Computer Network

  46. Sets and Sequences • Problem: what do we list in the route? • List T: omitting information not acceptable, may lead to loops • List T, X, Y: misleading, appears as 3-hop path • Solution: restructure AS Path attribute as: • Path: (Sequence (T), Set (X, Y)) • If Z wants to advertise path: • Path: (Sequence (Z, T), Set (X, Y)) • In practice used only if paths in set have same attributes Computer Network

  47. Multi-Exit Discriminator (MED) • Hint to external neighbors about the preferred path into an AS • Non-transitive attribute (we will see later why) • Different AS choose different scales • Used when two AS’s connect to each other in more than one place Computer Network

  48. MED • Hint to R1 to use R3 over R4 link • Cannot compare AS40’s values to AS30’s 180.10.0.0 MED = 50 R1 R2 AS 10 AS 40 180.10.0.0 MED = 120 180.10.0.0 MED = 200 R3 R4 AS 30 Computer Network

  49. MED • MED is typically used in provider/subscriber scenarios • It can lead to unfairness if used between ISP because it may force one ISP to carry more traffic: ISP1 SF ISP2 NY • ISP1 ignores MED from ISP2 • ISP2 obeys MED from ISP1 • ISP2 ends up carrying traffic most of the way Computer Network

  50. Other Attributes • ORIGIN • Source of route (IGP, EGP, other) • NEXT_HOP • Address of next hop router to use • Used to direct traffic to non-BGP router • Check out http://www.cisco.com for full explanation Computer Network

More Related