Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

An Overview of the IP Network Layer.ppt


Published on

  • Be the first to comment

An Overview of the IP Network Layer.ppt

  1. 1. An Overview of the IP Network Layer Tim Griffin [email_address] December 1, 2000
  2. 2. Goal Today’s class should give you a basic understanding of how Internet Protocol (IP) data packets find their way from one end of the Internet to the other. Understand connectivity in the IP world This course will not say much about the applications that exploit this connectivity…
  3. 3. Outline <ul><li>What is special about the IP network layer? </li></ul><ul><li>What is an IP Routing Protocol? </li></ul><ul><li>How is Addressing Implemented in IPv4? </li></ul><ul><li>Routing inside an ISP. </li></ul><ul><ul><li>RIP </li></ul></ul><ul><ul><li>OSPF </li></ul></ul><ul><li>Routing In the Global Internet </li></ul><ul><ul><li>How do ISPs exchange routing information? </li></ul></ul><ul><ul><li>BGP </li></ul></ul>
  4. 4. Networking Technologies Circuit Based Packet Based Virtual Circuits Connectionless TDM Telephony SONET/SDH Frame Relay ATM IP X.25 CLNP (ISO) SNA (IBM) Appletalk IPX (Novell) DWDM Connection Oriented (variable rate, store-and-forward) (constant rate)
  5. 5. Connection Oriented vs. Connectionless Connection Oriented Connectionless Send and Pray <ul><li>Connection set up. Signaling reserves resources along the end-to-end path </li></ul><ul><li>Traffic flows </li></ul><ul><li>Connection torn down and resources freed </li></ul>
  6. 6. Network Heterogeneity Circuits Virtual Circuit Connectionless Virtual Connections SONET ATM IP TCP
  7. 7. IP Datagram 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| IHL | Service Type | Total Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identification |Flags| Fragment Offset | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Time to Live | Protocol | Header Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Destination Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Options | Padding | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ H E A D E R D A T A 1981, RFC 791 ... up to 65,515 octets of data ... : : | + | + | : : | + | + | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ shaded fields little-used today
  8. 8. Famous Members of the IP Protocol Family IP (and ICMP) TCP UDP FTP HTTP Telnet RTP SNMP DNS
  9. 9. IP is a Network Layer Protocol Physical 1 Network DataLink 1 Transport Application Session Presentation Network Router Physical 2 Network DataLink 2 Transport Application Session Presentation Separate physical networks glued together into one logical network Physical 1 DataLink 1 Physical 2 DataLink 2 Medium 1 Medium 2
  10. 10. Encapsulation Example An Ethernet segment transmitting HTTP data. Ethernet Header IP Header TCP Header HTTP Header … . HTTP Data … .
  11. 11. IP Hour Glass IP Networking Technologies Networking Applications Frame ATM DWDM SONET email Web file transfer Ethernet FDDI Multimedia X.25 HOST Router Link Remote Access Voice VPN Minimalist network layer TCP e-stuff IP is the mother of all disruptive technologies!
  12. 12. QoS Quality of Service vs. Quantity of Service
  13. 13. Traditional Telco Network The Brick. An internationally recognized symbol of dumbness
  14. 14. IP Network The user community now owns the compute power and software.
  15. 15. How Dumb Can a Network Get? <ul><li>In the Internet, intelligence is in Hosts </li></ul><ul><li>IP is connectionless, best effort. </li></ul><ul><li>Routing protocols today provide only connectivity and supports only one type of service : best effort datagram </li></ul><ul><li>Only real smarts left in the network layer : Dynamic Routing Protocols, which provide end-to-end connectivity </li></ul>The technical part of the “Bell-head vs. Net-head” divide.
  16. 16. <ul><li>“ We reject kings, presidents, and voting. We believe in rough consensus and running code.” --- Dave Clark </li></ul><ul><li>Publishes “Requests for Comments” or RFCs </li></ul><ul><ul><li>Some are designated as Internet Standards </li></ul></ul><ul><li>Working Groups </li></ul><ul><ul><li>Internet Drafts </li></ul></ul><ul><li> </li></ul>Internet Engineering Task Force (IETF) You must visit this site! The cultural part of the “Bell-head vs. Net-head” divide.
  17. 17. Hosts, Networks, and Routers Network A Network B Network C Router Host 1 Host 2 Host 7 Host 1 Host 12 Host 2 Unique IP Address = Network Number + Host Number
  18. 18. Actually, IP addresses Identify Interfaces Network A Network B Network C Host 1 Host 2 Host 7 Host 1 Host 12 Host 2 Machines can have more than one IP address. All routers do! Network C, Host 3 Network A, Host 3 Network B, Host 77
  19. 19. IP Forwarding Table Destination Next Hop Interface Net A Net B Net C, Host 3 Router 1 Direct Router 2 Router 1 INT 7 INT 7 INT 3 INT 4 A destination is usually a network. May also be a host, or a “gateway of last resort” (default) The next hop is either a directly connected network or a router on a directly connected network A physical interface Net C
  20. 20. IP Forwarding Process Forwarding Process IP Forwarding Table Router 1. Remove a packet from an input queue 3. Match packet’s destination to a table entry 2. Check for sanity, decrement TTL field 4. Place packet on correct output queue If queues get full, just drop packets! If queues get full, just drop packets!
  21. 21. Route vs. Route <ul><li>Route sometimes means the end-to-end path traversed by data traffic </li></ul><ul><li>Route often means the “destination + next hop” entry in an IP forwarding table. </li></ul>London New York
  22. 22. Routing = Implementing End-to-End Paths with Next Hop Forwarding Tables R R R A B C D R1 R2 R3 R4 R5 E Dest. Nxt Hop R4 R3 R3 R4 Direct R4 Dest. Nxt Hop A B C D E default R2 R2 Direct R5 R5 R2 Dest. Nxt Hop A B C D E default R1 Direct R3 R1 R3 R1 Default to upstream router A B C D E default
  23. 23. Something Fishy Here? A B C The next-hop forwarding paradigm does not allow router R to choose a route to A based on who originated the traffic, B or C. R
  24. 24. Bad Things Can Happen Dest. Nxt Hop A : R2 : Dest. Nxt Hop A : R1 : Loops are routing problems, not forwarding problems R1 R2
  25. 25. Outline <ul><li>What is special about the IP network layer? </li></ul><ul><li>What is an IP Routing Protocol? </li></ul><ul><li>How is Addressing Implemented in IPv4? </li></ul><ul><li>Routing inside an ISP. </li></ul><ul><ul><li>RIP </li></ul></ul><ul><ul><li>OSPF </li></ul></ul><ul><li>Routing In the Global Internet </li></ul><ul><ul><li>How do ISPs exchange routing information? </li></ul></ul><ul><ul><li>BGP </li></ul></ul>
  26. 26. How are Forwarding Tables Populated? Statically Dynamically Routers exchange information using ROUTING PROTOCOLS that compute “best” routes Administrator manually configures table entries In practice : a mix of these…. + More control + Not restricted to destination-based forwarding - Doesn’t scale - Slow to adapt to network failures + Can rapidly adapt to changes in network topology + Can be made to scale well - Complex distributed algorithms - Consume CPU, Bandwidth, Memory - Debugging can be hell - Current protocols are destination-based
  27. 27. Dynamically route around network congestion? NO! <ul><li>IP traffic is very bursty </li></ul><ul><li>Dynamic adjustments in routing typically operate more slowly than fluctuations in traffic load </li></ul><ul><li>Attempt to adapt routing to account for load can lead to wild, unstable oscillations of routing system </li></ul>
  28. 28. Terminology Alert! Static Routing Dynamic Routing Adaptive Routing Possible Bell Head Meaning Net Head Meaning Manual provisioning of routing table entries Nailed up route Automatically route around network failures. Alternate paths selected dynamically. Automatically route around network failures and congestion. Alternate paths often predetermined. May vary with time of day. Automatically route around network failures, and congestion. Use of these terms may vary …. Net Head Term ????
  29. 29. Architecture of Routing Protocols AS 701 AS 6431 AS 7018 Interior Gateway Protocols (IGP) : inside autonomous systems Exterior Gateway Protocols (EGP) : between autonomous systems OSPF, IS-IS, RIP, EIGRP, ... BGP Metric Based Policy Based UUNet AT&T Common Backbone AT&T Research IGP IGP IGP EGP EGP EGP
  30. 30. The Most Common Routing Protocols Routing protocols exchange network reachability information between routers . IP (and ICMP) TCP UDP BGP RIP OSPF EIGRP IS-IS Cisco proprietary
  31. 31. What is a Routing Process? Routing Process Protocol-Specific Routing Table import information from other routers export information to other routers IP Forwarding Table Router Manual configuration OS kernel
  32. 32. Many routing processes can run on a single router IP Forwarding Table OSPF Domain RIP Domain BGP OS kernel OSPF Process OSPF Routing tables RIP Process RIP Routing tables BGP Process BGP Routing tables
  33. 33. Routing Configuration for IP Routers <ul><li>Configure List of Interfaces, with IP addresses and subnet masks </li></ul><ul><li>List of Neighbors </li></ul><ul><li>Link weights </li></ul><ul><li>Define static routes </li></ul><ul><li>Import routes from other routing domains </li></ul><ul><li>Configure protocol-specific, vendor-specific parameters for each routing protocol </li></ul>Expressed in low-level configuration files
  34. 34. Outline <ul><li>What is special about the IP network layer? </li></ul><ul><li>What is an IP Routing Protocol? </li></ul><ul><li>How is Addressing Implemented in IPv4? </li></ul><ul><li>Routing inside an ISP. </li></ul><ul><ul><li>RIP </li></ul></ul><ul><ul><li>OSPF </li></ul></ul><ul><li>Routing In the Global Internet </li></ul><ul><ul><li>How do ISPs exchange routing information? </li></ul></ul><ul><ul><li>BGP </li></ul></ul>
  35. 35. IPv4 Implementation of Addresses Thirty Two Bits: 0 8 16 24 11111111 00010001 10000111 00000000 255 0 134 17 Dotted Quad notation for “human readability”
  36. 36. IP Addresses come in two parts Where is this dividing line? Well, that depends .... 11111111 00010001 10000111 00000000 Network Number Host Number
  37. 37. Classful Addresses 0nnnnnnn 10nnnnnn nnnnnnnn nnnnnnnn nnnnnnnn 110nnnnn hhhhhhhh hhhhhhhh hhhhhhhh hhhhhhhh hhhhhhhh hhhhhhhh n = network address bit h = host identifier bit Class A Class C Class B 1981, RFC 791 (definition of IPv4)
  38. 38. The Classful Address Space Leads to very inefficient allocation of addresses …
  39. 39. Flat Network Addressing This router needs at least 12 table entries Exports at least 12 network addresses Z Y X W T U V S Q R P N
  40. 40. Hierarchical Network Addressing Network Z This Router needs only 3 table entries for networks Z-T , Z-S , and Z-U Z T S U Network Z-U-X This is called Aggregation Network Z-T Exports only one Address M P Q W W P S X M F K J
  41. 41. Best Match Forwarding Destination Address : Network X-W-Y-V, Host 12 Lookup in IP forwarding table is no longer based on exact match of network prefix. Destination Next Hop X X-W-Y X-W R2 R7 R5 Match Best Match Match
  42. 42. The IPv4 hack IP Address : IP Mask: Use two 32 bit numbers to represent a network. Network number = IP address + Mask Usually written as 00001100 00000100 00000000 00000000 11111111 11111110 00000000 00000000 Address Mask for hosts Network Prefix
  43. 43. Which IP addresses are covered? IP address is covered by network IP address is not 00001100 00000100 00000000 00000000 11111111 11111110 00000000 00000000 00001100 00000101 00001001 00010000 00001100 000001 1 1 00001001 00010000
  44. 44. Mask may vary with location : : : : : : : : This allows all of these (sub)networks to be aggregated into one entry in an IP forwarding table
  45. 45. Private Address Space ( --- ( --- ( --- RFC 1918 Private Addresses + Network Address Translation (NAT) + Firewalls = No need for IPv6 An ongoing debate NATs are not compatible with some VPN technologies such as IPSec and tunneling. Can break other applications.
  46. 46. What do routing protocols exchange? Network numbers Network number = IP address + Mask Reachability information How to reach a given network + depends on protocol
  47. 47. Outline <ul><li>What is special about the IP network layer? </li></ul><ul><li>What is an IP Routing Protocol? </li></ul><ul><li>How is Addressing Implemented in IPv4? </li></ul><ul><li>Routing inside an ISP. </li></ul><ul><ul><li>RIP </li></ul></ul><ul><ul><li>OSPF </li></ul></ul><ul><li>Routing In the Global Internet </li></ul><ul><ul><li>How do ISPs exchange routing information? </li></ul></ul><ul><ul><li>BGP </li></ul></ul>
  48. 48. Basic Model: Finding Shortest Paths A D E C B 100 100 20 20 80 80 20 20 10 10 10 10 10 10 Source 50 30 20 30 Find paths from a source to all other nodes that minimizes sum of arc metrics Arc metrics are statically provisioned IP routing protocols DO NOT route around network congestion!
  49. 49. Arcs, Nodes, Arc Weights Directed Graph data structures + Algorithm Dijkstra’s or Bellman-Ford = Solution to shortest path problem How can shortest path computation be decentralized and performed by many cooperating routers? Distribute path computation. Keep only local link data. Distribute all link data. Perform path computations locally. RIP, EIGRP, BGP OSPF, IS-IS, IDPR Technology : Distance Vector vs. Link State Protocols Distance Vector Link State
  50. 50. RIP <ul><li>RIP = R outing I nformation P rotocol </li></ul><ul><li>Does not scale well, designed for small LANs </li></ul><ul><li>Is a “distance vector protocol” </li></ul><ul><li>Very simple, easy to configure, easy to implement </li></ul><ul><li>Is most widely used routing protocol </li></ul>
  51. 51. RIP History <ul><li>Developed at Xerox PARC in early 1980s </li></ul><ul><li>Reimplemented in Berkeley UNIX </li></ul><ul><li>1988 : Standardized in RFC 1058 </li></ul><ul><li>1994 : RIP-2, RFC 1723 </li></ul><ul><ul><li>Support CIDR addressing </li></ul></ul><ul><ul><li>Authentication </li></ul></ul><ul><li>1997 : RIPng for IPv6, RFC 2080 </li></ul>
  52. 52. RIP Routing Table Destination Next Hop Metric Net A Net B Net C, Host 3 Router 1 Direct Router 2 Router 1 Default 3 5 0 A destination is either a network, a host, or a “gateway of last resort” The next hop is either a directly connected network or a directly connected router Measures how many “ hops away” is the destination 0
  53. 53. Basic RIP Protocol Periodically exchange list of destinations and metrics with all neighboring routers RIP routers exchange their entire “distance vector” every 30 seconds Dest. Metric A B C 3 0 5 Dest. Metric A E F 1 2 0
  54. 54. Basic RIP Protocol (cont.) Is Dest. A in my RIP Table? Is m + c less than current metric for Dest. A? NO Yes Yes Is N my next hop for Dest. A and m + c is not the current metric? NO Yes Trust your neighbor... c Neighbor N Receive Dest. Metric A m From Neighbor N Dest. Metric A m + c Nxt Hop N Add to RIP table Dest. Metric A m + c Nxt Hop N Replace current entry with in RIP table
  55. 55. OSPF <ul><li>OSPF = O pen S hortest P ath F irst </li></ul><ul><li>Developed to address shortcomings of RIP </li></ul><ul><ul><li>has rapid, loop-free convergence </li></ul></ul><ul><ul><li>does not count to infinity </li></ul></ul><ul><li>Link metrics between 0 and 65,535, no limit on path metric </li></ul><ul><li>Is a “link state protocol” </li></ul><ul><li>Has reputation for being complex </li></ul><ul><li>Scales well </li></ul><ul><li>Defined in RFCs 1247 (1991), 1583 (1994), 2178 (1997), 2328 (1998). </li></ul>
  56. 56. Link State Database Each Router has a database representing the entire network that is constructed from the local knowledge at each router A D E C B 100 100 20 20 80 80 20 20 10 10 10 10 10 10 ME B D A C 80 100 20
  57. 57. Building OSPF Routing Table Compute locally using Link State Database! A D E C B 100 100 20 20 80 80 20 20 10 10 10 10 10 10 ME 50 30 20 30 Dijkstra Dest. Nxt Hop Metric B D 50 C D D D D E 30 20 30
  58. 58. That’s Easy! Not so fast! RIP RFC 1058 : 33 pages OSPF RFC 2328 : 244 pages Much of this complexity is related to the synchronization of the distributed, replicated link state database. Plus network modeling …. Distance Vector vs. Link State….
  59. 59. Scalability: OSPF Areas Area 0 ... LS database unique within an area Special OSPF protocol to exchange routes between areas. This is a “distance vector” protocol! <ul><li>Decentralize administration </li></ul><ul><li>Reduce memory usage per router </li></ul><ul><li>Reduce bandwidth used by flooding </li></ul>Area 1 Area 2 Area 3 Area K
  60. 60. Traffic engineering is hard with current protocols <ul><li>Link metrics attract or repel all traffic </li></ul><ul><li>Results in congestion and unused capacity </li></ul><ul><li>Destination based, next-hop forwarding paradigm has very coarse granularity </li></ul><ul><li>Routing and forwarding are distinct, but still very tightly coupled </li></ul>MPLS to the rescue??
  61. 61. Outline <ul><li>What is special about the IP network layer? </li></ul><ul><li>What is an IP Routing Protocol? </li></ul><ul><li>How is Addressing Implemented in IPv4? </li></ul><ul><li>Routing inside an ISP. </li></ul><ul><ul><li>RIP </li></ul></ul><ul><ul><li>OSPF </li></ul></ul><ul><li>Routing In the Global Internet </li></ul><ul><ul><li>How do ISPs exchange routing information? </li></ul></ul><ul><ul><li>BGP </li></ul></ul>
  62. 62. Interdomain routing = routing between autonomous systems AS 701 AS 1239 AS 7018 UUNet AT&T Common Backbone Sprint Fidelity Investments AT&T Research AS 6431 AS 11040
  63. 63. Why not just use OSPF? <ul><li>Scale </li></ul><ul><ul><li>The Internet is very large </li></ul></ul><ul><li>Policy </li></ul><ul><ul><li>My good route might be your bad route </li></ul></ul>
  64. 64. An ASN represents a unit of Routing Policy 834 Canada Long Distance Services 1740 CerfNet 1838 CerfNet 2386 Data Communications Services 2685 AGNS (IBM Network) 2713 Jens Corporation 2740 Canada Long Distance Services 2751Paradyne 2767 Canada Long Distance Services 2768 Canada Long Distance Services 2855 Concert 2915 Jens Corporation 3300 AT&T Unisource 3448 AT&T Wireless 3668 Network Systems 4465 Easy Link Services 4466 Easy Link Services 4467 Easy Link Services 4468 Easy Link Services 4661 Easy Link Asia-Pacific 5074 Dial Platform (BMGS) 5075 FDDI Access Ring (BMGS) 5400 Concert 5727 Asia-Pacific PVCs 5728 WorldNet Dial Platform 5729 WorldNet Services 5730 FDDI Access Ring 5731 WorldNet Services 6269 AT&T-Internet2 6290 ALASCOM-DIAL 6308 ALASCOM-MIS 6431 AT&T Labs 6478 Worldnet Services 6537 CANADA LONG DISTANCE SERVICES 6742 AT&T London UK 6905 European Internal 6934 Columbus 7018 WorldNet Backbone 7170 Government Markets 7329 CMS 7948 GEOPLEX 8030 WorldNet 8031 WorldNet 8032 WorldNet 8033 WorldNet 8034 WorldNet 8035 WorldNet 10456 Government Markets 11698 AT&T-PWSS 13979 AT&T-IPFR 14005 AT&T Y2K ICC 14470 ATT-PWSS-2 15259 Solutions 15290 Canada IES 17224 Enhanced Network Services 17225 Enhanced Network Services 17226 Enhanced Network Services 17227 Enhanced Network Services 17228 Enhanced Network Services 17229 Enhanced Network Services 17230 Enhanced Network Services 17231 Enhanced Network Services 17232 Enhanced Network Services 17233 Enhanced Network Services 64 ASNs known to be assigned to AT&T (list may not be complete!) 33 (in green) seen in BGP routing tables on 11/25/2000 (by RouteDB)
  65. 65. How many ASNs are there? From on 11/26/2000
  66. 66. Sample prefixes from announced to the CBB These are called “networks” or “prefixes” or “CIDR blocks” or “network blocks” or “ routes”. Yes, it is confusing. <ul><li> : from AT&T Labs (covers 256 IP addresses in range to </li></ul><ul><li> : from Fidelity Investments </li></ul><ul><li> : from UUnet </li></ul>
  67. 67. How Many Prefixes are There? From on 11/26/2000
  68. 68. How many hosts are there? For more information, see
  69. 69. Policy : Transit vs. Nontransit AS 701 AS144 AS 701 A nontransit AS allows only traffic originating from AS or traffic with destination within AS A transit AS allows traffic with neither source nor destination within AS to flow across the network IP traffic UUnet Bell Labs AT&T CBB
  70. 70. Policy-Based vs. Distance-Based Routing? ISP1 ISP2 ISP3 Cust1 Cust2 Cust3 Host 1 Host 2 Minimizing “ hop count” can violate commercial relationships that constrain inter- domain routing. YES NO
  71. 71. Why not minimize “AS hop count”? Regional ISP1 Regional ISP2 Regional ISP3 Cust2 Cust3 Cust3 National ISP1 National ISP2 YES NO
  72. 72. BGP-4 <ul><li>BGP = B order G ateway P rotocol </li></ul><ul><li>Is a Policy-Based routing protocol </li></ul><ul><li>Is the de facto EGP of today’s global Internet </li></ul><ul><li>Relatively simple protocol, but configuration is complex and the entire world can see, and be impacted by, your mistakes. </li></ul><ul><li>1989 : BGP-1 [RFC 1105] </li></ul><ul><ul><li>Replacement for EGP (1984, RFC 904) </li></ul></ul><ul><li>1990 : BGP-2 [RFC 1163] </li></ul><ul><li>1991 : BGP-3 [RFC 1267] </li></ul><ul><li>1995 : BGP-4 [RFC 1771] </li></ul><ul><ul><li>Support for Classless Interdomain Routing (CIDR) </li></ul></ul>
  73. 73. BGP Operations Simplified Establish Peering on TCP port 179 Peers Exchange All Routes Exchange Incremental Updates While connection is ALIVE exchange route UPDATE messages BGP AS1 AS2
  74. 74. Two Types of BGP Neighbor Relationships <ul><li>External Neighbor (eBGP) in a different Autonomous Systems </li></ul><ul><li>Internal Neighbor (iBGP) in the same Autonomous System </li></ul>AS1 AS2 eBGP iBGP Physical Connection Logical (TCP) Connection
  75. 75. Four Types of BGP Messages <ul><li>Open : Establish a peering session. </li></ul><ul><li>Keep Alive : Handshake at regular intervals. </li></ul><ul><li>Notification : Shuts down a peering session. </li></ul><ul><li>Update : Announcing new routes or withdrawing previously announced routes. </li></ul>announcement = Network prefix + attributes
  76. 76. BGP Attributes <ul><li>Local Preference : Used by IBGP to rank routes within an autonomous system </li></ul><ul><li>AS path : list of ASNs the announcement traversed </li></ul><ul><li>Next Hop : IP address of external neighbor’s interface </li></ul><ul><li>Origin : How was the route originated? </li></ul><ul><li>Multi Exit Discriminator : preference of egress points </li></ul><ul><li>Community : arbitrary colors for routes </li></ul><ul><li>Atomic Aggregate :indicates if info has been lost </li></ul><ul><li>Aggregator : which ASN lost the information </li></ul><ul><li>Originator ID : for ibgp route reflectors </li></ul><ul><li>… . </li></ul>RIP : “distance vector”, BGP : “path vector”
  77. 77. AS Path Attribute AS7018 AS Path = 144 AS Path = 144 AS702 Alternet (Uunet) AS Path = 701 144 AS Path = 702 701 144 AS1849 Uunet UK AT&T CBB AS5413 GXN AS Path = 7018 144 AS5459 LINX AS Path = 5413 7018 144 AS Path = 5459 5413 7018 144 AS701 Alternet (Uunet) AS144 Bell Labs Route Originated
  78. 78. AS Path Attribute (cont.) BGP at AS YYY will never accept a route whose AS Path contains YYY. This avoids interdomain routing loops. AS702 UUnet AS Path = 1 333 702 877 Don’t Accept!
  79. 79. Next Hop Attribute Every time a route announcement crosses an AS boundary, the Next Hop attribute is changed to the IP address of the border router that announced the route. AS144 Bell Labs Next Hop = AS701 UUnet AS702 UUnet Next Hop = Next Hop =
  80. 80. Local Preference Attribute AT&T CBB AS 7018 Primary T3 line Backup T1 line Forces outbound traffic to take primary link, unless link is down. Set Local Pref = 100 for all routes from 7018 Customer Set Local Pref = 50 for all routes from 7018
  81. 81. Local Preference Attribute Used only in iBGP to prefer a point of exit Higher Local Preference Values are more preferred AS 1 AS 2 AS 4 AS 3 Frank’s Internet Barn Frank’s Customer Customer of Frank’s Customer AS Path = 4 1 Loc pref = 80 AS Path = 2 1 Loc pref = 100 AS Path = 3 1 Loc pref = 90 Frank’s Upstream Provider Frank’s Local Competition
  82. 82. Multi Exit Discriminator AT&T CBB AS 7018 Set MED to metric of IGP at each border router 35 56 MED = 56 MED = 35 Used only in eBGP to suggest preferred points of entry to a BGP neighbor Lower MED values are more preferred
  83. 83. BGP Route Processing Best Route Selection Apply Import Policies BGP Route Table Apply Export Policies Install forwarding Entries for best Routes. Receive BGP Updates Best Routes Transmit BGP Updates Apply Policy = filter routes & tweak attributes Based on Attribute Values IP Forwarding Table Apply Policy = filter routes & tweak attributes Open ended programming. Constrained only by vendor configuration language
  84. 84. BGP Best Route Selection Process Can select at most one route to any given prefix <ul><li>Prefer routes with highest local preference </li></ul><ul><li>Then prefer routes with shortest AS-paths </li></ul><ul><li>Then prefer routes with lowest origin (IGP < EGP < INCOMPLETE) </li></ul><ul><li>Then prefer lowest MEDs (if routes are from same neighbor ASN) </li></ul><ul><li>Then prefer EBGP learned routes over IBGP learned routes </li></ul><ul><li>Then prefer routes with lowest IGP cost to BGP next-hop </li></ul><ul><li>Then break ties by selecting route with lowest BGP next-hop </li></ul>This is somewhat simplified ….
  85. 85. BGP Routing Tables <ul><li>CBB tables often have 100K –200K routes. </li></ul><ul><li>Use “whois” queries to associate an ASN with “owner” (for example, ) </li></ul><ul><li>701 =Uunet, 10409 =, 1239 = Sprint, 16886 = LVMH group, 8143 = Publicom, 3561 = Cable & Wireless </li></ul>Network Next Hop Metric LocPrf Path * 81 701 701 10409 i * i 0 100 10409 10409 10409 i *>i 0 100 10409 10409 10409 i * i63.109.3.0/24 0 82 1239 16886 i *>i 0 82 1239 16886 i * 81 701 8143 i *>i 0 82 3561 8143 i * i 0 82 3561 8143 i * i63.109.65.0/24 0 82 3561 8143 ? *>i 0 82 3561 8143 ? * 81 701 8143 ? show ip bgp
  86. 86. BGP Communities Community Attribute is 32 bits By convention, first 16 bits is ASN of owner of community definition community number Very powerful BECAUSE it is meaningless Two reserved communities <ul><ul><li>no_export (0xFFFFFF01) </li></ul></ul><ul><li>don’t export out of AS </li></ul>no_advertise (0xFFFFFF02) don’t pass to BGP peers A route can belong to more than one community RFC 1997 (August 1996) groups routes into logical collections
  87. 87. Implementing “Backup” Policies with Communities Connect Net wants to provide backup Internet access for Global One in case its connection to Sprint is lost. 1996, RFC 1998 AS1221 Telstra AS4000 Sprint Internat. AS4805 Global One AS2764 Connect Net
  88. 88. First, Without Communities ... Connect Net and Global One would have to convince Telstra to do some custom configuration its Local Pref value for some routes….. AS1221 Telstra AS4000 Sprint Internat. AS4805 Global One AS2764 Connect Net Local Pref = 80 Local Pref = 70
  89. 89. With Communities …. {1221,70} = I’ll set local pref to 70 (cust. provided backup) {1221,80} = I’ll set local pref to 80 (other ISP routes) {1221,90} = I’ll set local pref to 90 (my customer backup) {1221,100} = I’ll set local pref to 100 (my customers) Telstra’s communities: AS4000 Sprint Internat. AS4805 Global One AS2764 Connect Net AS1221 Telstra
  90. 90. Global One Using Telstra’s Communities AS1221 Telstra Tag these routes with community {1221, 70} Tag these routes with community {1221, 80} All I have to do is pass along AS4805’s routes to AS1221 AS4000 Sprint Internat. AS4805 Global One AS2764 Connect Net
  91. 91. iBGP Peers Must be Fully Meshed iBGP peers do not announce routes received via iBGP <ul><li>N border routers means N(N-1)/2 peering sessions -- this does not scale </li></ul><ul><li>Currently three solutions : </li></ul><ul><ul><li>Break an AS up into smaller Autonomous Systems </li></ul></ul><ul><ul><li>Route Reflectors </li></ul></ul><ul><ul><li>Confederations </li></ul></ul>eBGP update iBGP updates
  92. 92. Route Reflectors Route Reflectors must be fully meshed Route Reflectors pass along updates to client routers RR RR RR RR RR RR
  93. 93. Route Flapping Routes that go “up” and “down” are said to be flapping Flapping routes are often penalized, and if penalty goes over a threshold, they are Suppressed for some period of time.
  94. 94. Recommended Reading <ul><li>IDR : </li></ul><ul><li>Internet Routing Architectures. Bassam Halabi. . The BGP Bible! Get second edition (2000). </li></ul><ul><li>BGP4: Inter-domain Routing in the Internet. John W. Stewart, III. 1999. Good high-level introduction. </li></ul><ul><li>Routing in the Internet. Christian Huitema. 2000. </li></ul><ul><li>OSPF -- Anatomy of an Internet Routing Protocol. John T. Moy. 1998. </li></ul><ul><li>Managing IP Networks with Cisco Routers. Scott M. Ballew. 1997. </li></ul>
  95. 95. Links These slides : Links on interdomain routing:
  96. 96. What I Didn’t talk about… IP Layer TCP UDP FTP HTTP Telnet RTP SNMP DNS … Applications …
  97. 97. Selected R&D work on IP Network Management <ul><li>Bravo : backbone routing analysis, visualization, and optimization </li></ul><ul><li>Tap : collection and analysis of traffic flow data </li></ul><ul><li>Metrica : SNMP polling </li></ul><ul><li>Netdb : router configuration management </li></ul><ul><li>Peermon : monitoring CBB from the outside </li></ul><ul><li>Routdb : monitoring CBB routes from the inside </li></ul><ul><li>Topology server : building live network maps </li></ul><ul><li>Falcon : fault correlation, visualization </li></ul><ul><li>Wipm : active delay measurement </li></ul>