1 / 111

Computer Networks (Graduate level)

Computer Networks (Graduate level). Lecture 10: 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

jess
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 10: 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 • Scalability Issues Computer Network

  4. Internet Routing • Internet organized as a two level hierarchy • First level – autonomous systems (AS’s) • AS – region of network under a single administrative domain • Each AS assigned unique ID • AS’s peer at network exchange routing information. • AS’s run an intra-domain routing protocols • Distance Vector, e.g., RIP • Link State, e.g., OSPF • Between AS’s runs inter-domain routing protocols, e.g., Border Gateway Routing (BGP) • De facto standard today, BGP-4 Computer Network

  5. Example Interior router BGP router AS-1 AS-3 AS-2 Computer Network

  6. Inter-domain Routing basics • Internet is composed of over 16000 autonomous systems • BGP = Border Gateway Protocol • Is a Policy-Based routing protocol • Is the de facto inter-domain routing protocol of today’s global Internet • Relatively simple but configuration is complex and the entire world can see, and be impacted by, your mistakes.

  7. 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

  8. 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

  9. 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

  10. Interconnecting BGP Peers • BGP uses TCP to connect peers • AS’s exchange reachability information through their BGP routers, only when routes change • 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

  11. BGP Operations (Simplified) AS1 Establish session on TCP port 179 BGP session Exchange all active routes AS2 While connection is ALIVE exchange route UPDATE messages Exchange incremental updates

  12. provider customer IP traffic Customers and Providers provider customer Customer pays provider for access to the Internet Computer Network

  13. peer peer provider customer The “Peering” Relationship Peers provide transit between their respective customers Peers do not provide transit between peers Peers (often) do not exchange $$$ traffic allowed traffic NOT allowed Computer Network

  14. peer peer provider customer Peering Provides Shortcuts Peering also allows connectivity between the customers of “Tier 1” providers. Computer Network

  15. Reduces upstream transit costs Can increase end-to-end performance May be the only way to connect your customers to some part of the Internet (“Tier 1”) You would rather have customers Peers are usually your competition Peering relationships may require periodic renegotiation Peering Wars Peer Don’t Peer Peering struggles are by far the most contentious issues in the ISP world! Peering agreements are often confidential. Computer Network

  16. 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

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

  18. 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

  19. 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

  20. 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

  21. Architecture of Dynamic Routing OSPF BGP AS 1 EIGRP IGP = Interior Gateway Protocol Metric based: OSPF, IS-IS, RIP, EIGRP (cisco) AS 2 EGP = Exterior Gateway Protocol Policy based: BGP The Routing Domain of BGP is the entire Internet Computer Network

  22. Four Types of BGP Messages • Open : Establish a peering session. • Keep Alive : Handshake at regular intervals. • Notification : Shuts down a peering session. • Update : Announcing new routes or withdrawing previously announced routes. announcement = prefix + attributes values

  23. Two Types of BGP Neighbor Relationships • External Neighbor (eBGP) in a different Autonomous Systems • Internal Neighbor (iBGP) in the same Autonomous System AS1 iBGP is routed using Interior Gateway Protocol (IGP)! eBGP iBGP AS2

  24. eBGP update iBGP updates iBGP Peers Must be Fully Meshed • iBGP is needed to avoid routing loops within an AS • Injecting external routes into IGP does not scale and causes BGP policy information to be lost • BGP does not provide “shortest path” routing iBGP neighbors do not announce routes received via iBGP to other iBGP neighbors.

  25. Important BGP attributes • LocalPREF • Local preference policy to choose “most” preferred route • Multi-exit Discriminator (MED) • Which peering point to choose? • Import Rules • What route advertisements do I accept? • Export Rules • Which routes do I forward to whom? Computer Network

  26. Implementing Customer/Provider and Peer/Peer relationships • Enforce transit relationships • Outbound route filtering • Enforce order of route preference • provider < peer < customer Two parts: Computer Network

  27. provider route peer route customer route ISP route Import Routes From provider From provider From peer From peer From customer From customer Computer Network

  28. filters block Export Routes provider route peer route customer route ISP route To provider From provider To peer To peer To customer To customer Computer Network

  29. 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

  30. 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

  31. 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

  32. 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

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

  34. 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

  35. 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

  36. 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

  37. 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

  38. 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

  39. 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

  40. 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 …

  41. 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

  42. 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

  43. 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!

  44. 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

  45. Heavy Content Web Farm Cold Potato Routing with MEDs(Multi-Exit Discriminator Attribute) 2865 Prefer lower MED values 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

  46. 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

  47. 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

  48. 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

  49. 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

  50. 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

More Related