• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
An Overview of the IP Network Layer.ppt
 

An Overview of the IP Network Layer.ppt

on

  • 5,563 views

 

Statistics

Views

Total Views
5,563
Views on SlideShare
5,563
Embed Views
0

Actions

Likes
0
Downloads
164
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Please email me with comments on this course. The web site contains these slides, course information, and interesting routing related links. This is intended to be a one day course.
  • Connectionless is sometimes called “stateless” since there is no (per flow) state in the network. Virtual circuits require a “circuit setup time” when resources at network nodes along a path are reserved (if available) and a “circuit teardown time” when the circuit is closed.
  • The IP Suite defines hundreds of protocols. Here area few well known ones. IP = Internet Protocol. best effort end-to-end packet delivery service. No guarantees of arrival, order of arrival, that packets won’t be duplicated, or error free delivery Up to higher layers to improve on this. ICMP = Internet Control Message Protocol. Required of all IP compliant routers. Error and control messages. Reports errors back to source of packet, not intermediate routers. (ex: hop count exceeded, network unreachable.) TCP and UDP allow for more than one destination on a host UDP = User Datagram Protocol. Connectionless. Only adds notion of process to address. This takes the form of a “port number” for source and destination. UDP multiplexes and demultiplexes based on port numbers. Some ports are “well known” and reserved for specific processes. (ex: port 96 is for TFTP.) Think of a port number as addressing the queue of a process. UDP provides no guaranteed beyond those provided by IP. TCP = Transmission Control Protocol A reliable stream transport service. Full duplex connection between processes. Provides flow control, error detection and packet retransmission. A complex protocol. Based on a “virtual circuit” or “connection” abstraction --- a connection is identified as a pair of endpoints (host, port), (host, port)). Note : nothing really works without routing……...
  • Using OSI (Open Systems Interconnection) reference model, from ISO (International Organization for Standards). Also called “protocol stack” IP folks usually group top three layers into one “application layer” IP = Internet Protocol. Internet means internetworking of distinct physical networks. IP Routers started out as standard UNIX boxes with special hardware interfaces. Gradually evolved into specialized products with finely tuned operating systems. “ Routers” are called “Intermediate Systems” in OSI speak. They are sometimes called “Gateways” in IP speak. Each layer N protocol uses the services of Layer N-1 and provides services too Layer N+1. Smoke and mirrors. Each Layer provides an illusion to layer above. Believes in illusions from below. In practice boundaries not clear. Nice Theory, gets a bit fuzzy in practice …. Application programs sit above all this. transport : reliable end-to-end transmission network : uses frames to send packets (datagrams) with network-level addressing (logical addresses) data link : frames raw bits. Header + data. sanity checking physical addressing. Physical : moves raw bits across physical medium
  • Note that I’m using the term “Network” in the sense of the logical IP Network that hides the physical internetwork. Where intelligence resides animates much of the “Bell-head” vs. “Net-head” debate. Net-heads seem to be winning.
  • I strongly encourage everyone to spend some time exploring this web site. The RFCs describing the routing protocols covered in this course can all be obtained at this site. If you are familiar with telecomm standards, such as those from the ITU, you will be SHOCKED at how readable RFC are. Just print out the RFC for RIP (number 1058) and see what a pleasant read it is! ISO Wars CLNP vs. IP IS-IS vs OSPF IDRP vs. BGP CMIP vs. SNMP
  • Network Nodes = Hosts + Routers The distinction between a host and a router is not always clear. Historically, routers where hosts with special interfaces running routing software. They gradually evolved into specialized devices. [Someone should write a history of routers.]
  • Nodes can have many IP addresses --- one for each interface. An interface can be logical --- one physical connection could provide multiple logical interfaces.
  • Often called routing table
  • See RFC 1264 “Internet Engineering Task Force Internet Routing Protocol Standardization Criteria.” 1991
  • Assume tables populated by magic. If we assume all forwarding tables are populated in a consistent way, then there is no real danger in confusing “end to end route” with a “next hop route.” Of course, the study of routing techniques explores ways to ensure that this is a safe assumption.
  • The “routing problem” arises in ALL networking technologies. Solutions vary depending on the specific technologies and how they are employed. I would like to do study of the techniques used in telegraphy networking. Since “datagrams” get their name from “telegrams” it would be fun to compare the different routing techniques used. Anyone want to join me on this? Note that some texts on Data Networking (especially those that are ATM centric?) use the term “Static routing” to mean what we are calling Dynamic routing. “Adaptive routing” is used to describe protocols that route around network congestion.
  • This slide illustrates the Routing Protocol Encapsulation BGP : TCP port number 179. RIP : UDP port number 520. OSPF : IP protocol number 89. One reason why routing protocols are not more well-known is that they run on routers and do not provide services directly to end-user applications. These protocols are however VERY familiar to network administrators. They keep the network connected! LANS generally deal with OSPF or RIP. ISPs and backbone network providers deal with BGP. In fact, they devote considerable resources to the care and feeding of BGP.
  • See RFC 1264 “Internet Engineering Task Force Internet Routing Protocol Standardization Criteria.” 1991 “Other routers” is usually a routers immediate neighbors. Why? To talk to more distant routers requires routing! We will see that BGP uses TCP connections within an autonomous system, but it can do this because it assumes that the autonomous system has a local routing system.
  • Makes lookup in IP forwarding table very easy --- exact match.
  • Motivation : (1) Routing tables getting big, (2) network administrators had to request new IP addresses every time a new local network was installed. Note that outside of a network subnetting is not visible. This gives a lot of autonomy to local administrators. In this example, the single Class A address can be used for 256 internal networks. All treated as one blob from outside. Note that each subnetwork has the same number of hosts.
  • VLSM was invisible to the global internet, which still saw only class A, B, and C routes. For internal aggregation to work, net numbers must have topological significance. This is a (nontrivial) network design problem.
  • Private addresses should never be exported to Internet.
  • While RIP is bases on a distributed processing algorithm (routers send results of intermediate computations to neighbors, keeping link data local) OSPF is bases on local processing and data distribution (Links states are made public and redistributed --- best path computations are done locally ate each router). Can use ANY algorithm --- bust most common is Dijkstra’s Shortest Path First (a “greedy” algorithm used to solve the “single source shortest path” problem in directed graphs with non-negative edge weights.)
  • Often called routing table
  • 50,000 routes is a lot --- but much better than the projected 640,000 without CIDR.
  • Is complex like OSPF. But much more scary. If you screw up, the whole interet will know! ISPs and NSP employ many network engineers provide care and feeding of BGP.
  • BGP speaking routers exchange information with their BGP peers. Peers are configured by network engineer.
  • eBGP presents a unified policy face to the outside world. eBGP peers must share the same physical medium. iBGP is needed to ensure that all border routers synchronize and present a consistent story to the outside world. They do not have to share physical media, but do have to be fully meshed, so an IGP is assumed.
  • This was constructed by looking at actual BGP route tables obtained from the route view project at ISI. Of course, only the AS Path attribute is shown here. LINX = London Internet Exchange. A NAP for UK. See http://www.linx.net/ not for profit partnership between Internet Service Providers in UK, 50 members, including Uunet UK and GXN. GXN = GX Networks, a London ISP. See http://www.gxn.net/ Uunet UK, see http://www.uk.uu.net/ Guess which route Uunet UK announced?
  • “ Next Hop” can be more than one hop away! Assumes intra-domain routing! And assumes that networks connecting eBGP peers have been (statically) injected into the IGP. Interior routing protocols must reach one hop beyond AS boundary. Note, via iBGP: for routes originating in AS, Next Hop is the address of peer that announced the route What about routes learned via IGP????
  • Here all routes are tagged with the same prefs, just depends on which border router receives them. So if the line is up, traffic should flow out of AS100 over the T3 line. But, As100 must announce its routes to AS702 from both border routers, and there is not guarantee that AS702 will not send all traffic to AS 100 over the T1 link! This brings us to MED (or Metric as Cisco calls it).
  • There is no guarantee that 702 will not override this hint by filtering or Local Pref.
  • BGP NEVER accepts a route as ASYYY that has YYY in its AS_PATH. Since an AS only announces its best routes, this means that each router hears at most N best routes for any destination, where N is the number of peers. Note : some vendors have implemented route filters for RIP and OSPF.
  • Note : not all atts are used (pure “filter” atts). Vendor specific atts may get mixed in here. Note how local pref overrides all other considerations.
  • Route Reflectors recommended for networks that would require more than 100 TCP sessions per router. There are 19 border routers in this AS. With full meshing we would need 171 TCP connections. With the configuration pictured here (6 fully meshed route reflectors + 19 border routers) we need only 34 TCP connections. Although it is not clear from this picture, RR can also be border routers. Preserves same behavior as if fully meshed. Advantages : 1) Scales. 2) Easier to fit topology of network. Border routers can be spread around the country in POPs. Down side : 1) not as robust. (Solution : allow client routers to peer with more than one RR.) 2) Can introduce Loops inside of AS (solution : Cisco uses Originator attribute to toss any self-originated routes internally.)
  • The IP Suite defines hundreds of protocols. Here area few well known ones. IP = Internet Protocol. best effort end-to-end packet delivery service. No guarantees of arrival, order of arrival, that packets won’t be duplicated, or error free delivery Up to higher layers to improve on this. ICMP = Internet Control Message Protocol. Required of all IP compliant routers. Error and control messages. Reports errors back to source of packet, not intermediate routers. (ex: hop count exceeded, network unreachable.) TCP and UDP allow for more than one destination on a host UDP = User Datagram Protocol. Connectionless. Only adds notion of process to address. This takes the form of a “port number” for source and destination. UDP multiplexes and demultiplexes based on port numbers. Some ports are “well known” and reserved for specific processes. (ex: port 96 is for TFTP.) Think of a port number as addressing the queue of a process. UDP provides no guaranteed beyond those provided by IP. TCP = Transmission Control Protocol A reliable stream transport service. Full duplex connection between processes. Provides flow control, error detection and packet retransmission. A complex protocol. Based on a “virtual circuit” or “connection” abstraction --- a connection is identified as a pair of endpoints (host, port), (host, port)). Note : nothing really works without routing……...

An Overview of the IP Network Layer.ppt An Overview of the IP Network Layer.ppt Presentation Transcript

  • An Overview of the IP Network Layer Tim Griffin [email_address] http://www.research.att.com/~griffin December 1, 2000
  • 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…
  • Outline
    • What is special about the IP network layer?
    • What is an IP Routing Protocol?
    • How is Addressing Implemented in IPv4?
    • Routing inside an ISP.
      • RIP
      • OSPF
    • Routing In the Global Internet
      • How do ISPs exchange routing information?
      • BGP
  • 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)
  • Connection Oriented vs. Connectionless Connection Oriented Connectionless Send and Pray
    • Connection set up. Signaling reserves resources along the end-to-end path
    • Traffic flows
    • Connection torn down and resources freed
  • Network Heterogeneity Circuits Virtual Circuit Connectionless Virtual Connections SONET ATM IP TCP
  • 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
  • Famous Members of the IP Protocol Family IP (and ICMP) TCP UDP FTP HTTP Telnet RTP SNMP DNS
  • 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
  • Encapsulation Example An Ethernet segment transmitting HTTP data. Ethernet Header IP Header TCP Header HTTP Header … . HTTP Data … .
  • 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!
  • QoS Quality of Service vs. Quantity of Service
  • Traditional Telco Network The Brick. An internationally recognized symbol of dumbness
  • IP Network The user community now owns the compute power and software.
  • How Dumb Can a Network Get?
    • In the Internet, intelligence is in Hosts
    • IP is connectionless, best effort.
    • Routing protocols today provide only connectivity and supports only one type of service : best effort datagram
    • Only real smarts left in the network layer : Dynamic Routing Protocols, which provide end-to-end connectivity
    The technical part of the “Bell-head vs. Net-head” divide.
    • “ We reject kings, presidents, and voting. We believe in rough consensus and running code.” --- Dave Clark
    • Publishes “Requests for Comments” or RFCs
      • Some are designated as Internet Standards
    • Working Groups
      • Internet Drafts
    • http://www.ietf.org
    Internet Engineering Task Force (IETF) You must visit this site! The cultural part of the “Bell-head vs. Net-head” divide.
  • 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
  • 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
  • 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
  • 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!
  • Route vs. Route
    • Route sometimes means the end-to-end path traversed by data traffic
    • Route often means the “destination + next hop” entry in an IP forwarding table.
    London New York
  • 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
  • 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
  • Bad Things Can Happen Dest. Nxt Hop A : R2 : Dest. Nxt Hop A : R1 : Loops are routing problems, not forwarding problems R1 R2
  • Outline
    • What is special about the IP network layer?
    • What is an IP Routing Protocol?
    • How is Addressing Implemented in IPv4?
    • Routing inside an ISP.
      • RIP
      • OSPF
    • Routing In the Global Internet
      • How do ISPs exchange routing information?
      • BGP
  • 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
  • Dynamically route around network congestion? NO!
    • IP traffic is very bursty
    • Dynamic adjustments in routing typically operate more slowly than fluctuations in traffic load
    • Attempt to adapt routing to account for load can lead to wild, unstable oscillations of routing system
  • 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 ????
  • 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
  • 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
  • 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
  • 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
  • Routing Configuration for IP Routers
    • Configure List of Interfaces, with IP addresses and subnet masks
    • List of Neighbors
    • Link weights
    • Define static routes
    • Import routes from other routing domains
    • Configure protocol-specific, vendor-specific parameters for each routing protocol
    Expressed in low-level configuration files
  • Outline
    • What is special about the IP network layer?
    • What is an IP Routing Protocol?
    • How is Addressing Implemented in IPv4?
    • Routing inside an ISP.
      • RIP
      • OSPF
    • Routing In the Global Internet
      • How do ISPs exchange routing information?
      • BGP
  • IPv4 Implementation of Addresses Thirty Two Bits: 0 8 16 24 11111111 00010001 10000111 00000000 255 0 134 17 255.17.134.0 Dotted Quad notation for “human readability”
  • IP Addresses come in two parts Where is this dividing line? Well, that depends .... 11111111 00010001 10000111 00000000 Network Number Host Number
  • 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)
  • The Classful Address Space Leads to very inefficient allocation of addresses …
  • 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
  • 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
  • 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
  • The IPv4 hack IP Address : 12.4.0.0 IP Mask: 255.254.0.0 Use two 32 bit numbers to represent a network. Network number = IP address + Mask Usually written as 12.4.0.0/15 00001100 00000100 00000000 00000000 11111111 11111110 00000000 00000000 Address Mask for hosts Network Prefix
  • Which IP addresses are covered? 12.4.0.0/15 12.5.9.16 12.7.9.16 IP address 12.5.9.16 is covered by network 12.4.0.0/15 IP address 12.7.9.16 is not 00001100 00000100 00000000 00000000 11111111 11111110 00000000 00000000 00001100 00000101 00001001 00010000 00001100 000001 1 1 00001001 00010000
  • Mask may vary with location 12.0.0.0/8 12.0.0.0/16 12.254.0.0/16 12.1.0.0/16 12.2.0.0/16 12.3.0.0/16 : : : 12.253.0.0/16 12.3.0.0/24 12.3.1.0/24 : : 12.3.254.0/24 : : : This allows all of these (sub)networks to be aggregated into one entry in an IP forwarding table 12.253.0.0/19 12.253.32.0/19 12.253.64.0/19 12.253.96.0/19 12.253.128.0/19 12.253.160.0/19 12.253.192.0/19
  • Private Address Space 10.0.0.0/8 (10.0.0.0 --- 10.255.255.255) 172.16.0.0/12 (172.16.0.0 --- 172.31.255.255) 192.168.0.0/16 (192.168.0.0 --- 192.168.255.255) 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.
  • What do routing protocols exchange? Network numbers Network number = IP address + Mask Reachability information How to reach a given network + depends on protocol
  • Outline
    • What is special about the IP network layer?
    • What is an IP Routing Protocol?
    • How is Addressing Implemented in IPv4?
    • Routing inside an ISP.
      • RIP
      • OSPF
    • Routing In the Global Internet
      • How do ISPs exchange routing information?
      • BGP
  • 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!
  • 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
  • RIP
    • RIP = R outing I nformation P rotocol
    • Does not scale well, designed for small LANs
    • Is a “distance vector protocol”
    • Very simple, easy to configure, easy to implement
    • Is most widely used routing protocol
  • RIP History
    • Developed at Xerox PARC in early 1980s
    • Reimplemented in Berkeley UNIX
    • 1988 : Standardized in RFC 1058
    • 1994 : RIP-2, RFC 1723
      • Support CIDR addressing
      • Authentication
    • 1997 : RIPng for IPv6, RFC 2080
  • 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
  • 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
  • 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
  • OSPF
    • OSPF = O pen S hortest P ath F irst
    • Developed to address shortcomings of RIP
      • has rapid, loop-free convergence
      • does not count to infinity
    • Link metrics between 0 and 65,535, no limit on path metric
    • Is a “link state protocol”
    • Has reputation for being complex
    • Scales well
    • Defined in RFCs 1247 (1991), 1583 (1994), 2178 (1997), 2328 (1998).
  • 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
  • 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
  • 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….
  • 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!
    • Decentralize administration
    • Reduce memory usage per router
    • Reduce bandwidth used by flooding
    Area 1 Area 2 Area 3 Area K
  • Traffic engineering is hard with current protocols
    • Link metrics attract or repel all traffic
    • Results in congestion and unused capacity
    • Destination based, next-hop forwarding paradigm has very coarse granularity
    • Routing and forwarding are distinct, but still very tightly coupled
    MPLS to the rescue??
  • Outline
    • What is special about the IP network layer?
    • What is an IP Routing Protocol?
    • How is Addressing Implemented in IPv4?
    • Routing inside an ISP.
      • RIP
      • OSPF
    • Routing In the Global Internet
      • How do ISPs exchange routing information?
      • BGP
  • Interdomain routing = routing between autonomous systems AS 701 AS 1239 AS 7018 UUNet AT&T Common Backbone Sprint Fidelity Investments AT&T Research 207.104.168.0/24 AS 6431 AS 11040 192.223.184.0/21 134.244.0.0/16
  • Why not just use OSPF?
    • Scale
      • The Internet is very large
    • Policy
      • My good route might be your bad route
  • 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)
  • How many ASNs are there? From http://www.telstra.net/ops/bgptable.html on 11/26/2000
  • 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.
    • 207.104.168.0/24 : from AT&T Labs (covers 256 IP addresses in range 207.104.168.0 to 207.104.168.255)
    • 192.223.184.0/21 : from Fidelity Investments
    • 134.244.0.0/16 : from UUnet
  • How Many Prefixes are There? From http://www.telstra.net/ops/bgptable.html on 11/26/2000
  • How many hosts are there? For more information, see http://www.isc.org/ds
  • 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
  • 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
  • Why not minimize “AS hop count”? Regional ISP1 Regional ISP2 Regional ISP3 Cust2 Cust3 Cust3 National ISP1 National ISP2 YES NO
  • BGP-4
    • BGP = B order G ateway P rotocol
    • Is a Policy-Based routing protocol
    • Is the de facto EGP of today’s global Internet
    • Relatively simple protocol, but configuration is complex and the entire world can see, and be impacted by, your mistakes.
    • 1989 : BGP-1 [RFC 1105]
      • Replacement for EGP (1984, RFC 904)
    • 1990 : BGP-2 [RFC 1163]
    • 1991 : BGP-3 [RFC 1267]
    • 1995 : BGP-4 [RFC 1771]
      • Support for Classless Interdomain Routing (CIDR)
  • 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
  • Two Types of BGP Neighbor Relationships
    • External Neighbor (eBGP) in a different Autonomous Systems
    • Internal Neighbor (iBGP) in the same Autonomous System
    AS1 AS2 eBGP iBGP Physical Connection Logical (TCP) Connection
  • 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 = Network prefix + attributes
  • BGP Attributes
    • Local Preference : Used by IBGP to rank routes within an autonomous system
    • AS path : list of ASNs the announcement traversed
    • Next Hop : IP address of external neighbor’s interface
    • Origin : How was the route originated?
    • Multi Exit Discriminator : preference of egress points
    • Community : arbitrary colors for routes
    • Atomic Aggregate :indicates if info has been lost
    • Aggregator : which ASN lost the information
    • Originator ID : for ibgp route reflectors
    • … .
    RIP : “distance vector”, BGP : “path vector”
  • AS Path Attribute AS7018 135.104.0.0/16 AS Path = 144 135.104.0.0/16 AS Path = 144 AS702 Alternet (Uunet) 135.104.0.0/16 AS Path = 701 144 135.104.0.0/16 AS Path = 702 701 144 AS1849 Uunet UK AT&T CBB AS5413 GXN 135.104.0.0/16 AS Path = 7018 144 AS5459 LINX 135.104.0.0/16 AS Path = 5413 7018 144 135.104.0.0/16 AS Path = 5459 5413 7018 144 AS701 Alternet (Uunet) AS144 135.104.0.0/16 Bell Labs Route Originated
  • 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 10.22.0.0/16 AS Path = 1 333 702 877 Don’t Accept!
  • 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 135.104.0.0/16 Next Hop = 11.0.0.1 AS701 UUnet AS702 UUnet 135.104.0.0/16 Next Hop = 11.0.0.1 11.0.0.1 135.104.0.0/16 Next Hop = 33.0.0.3 33.0.0.3
  • 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
  • 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 13.13.0.0/16 AS Path = 4 1 Loc pref = 80 13.13.0.0/16 AS Path = 2 1 Loc pref = 100 13.13.0.0/16 AS Path = 3 1 Loc pref = 90 Frank’s Upstream Provider Frank’s Local Competition 13.13.0.0/16
  • Multi Exit Discriminator AT&T CBB AS 7018 Set MED to metric of IGP at each border router 192.44.78.0/24 35 56 192.44.78.0/24 MED = 56 192.44.78.0/24 MED = 35 Used only in eBGP to suggest preferred points of entry to a BGP neighbor Lower MED values are more preferred
  • 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
  • BGP Best Route Selection Process Can select at most one route to any given prefix
    • Prefer routes with highest local preference
    • Then prefer routes with shortest AS-paths
    • Then prefer routes with lowest origin (IGP < EGP < INCOMPLETE)
    • Then prefer lowest MEDs (if routes are from same neighbor ASN)
    • Then prefer EBGP learned routes over IBGP learned routes
    • Then prefer routes with lowest IGP cost to BGP next-hop
    • Then break ties by selecting route with lowest BGP next-hop
    This is somewhat simplified ….
  • BGP Routing Tables
    • CBB tables often have 100K –200K routes.
    • Use “whois” queries to associate an ASN with “owner” (for example, http://www.arin.net/whois/arinwhois.html )
    • 701 =Uunet, 10409 = allegro.net, 1239 = Sprint, 16886 = LVMH group, 8143 = Publicom, 3561 = Cable & Wireless
    Network Next Hop Metric LocPrf Path * 63.108.216.0/21 137.39.23.173 81 701 701 10409 i * i 12.123.210.15 0 100 10409 10409 10409 i *>i 12.123.210.15 0 100 10409 10409 10409 i * i63.109.3.0/24 12.123.9.240 0 82 1239 16886 i *>i 12.123.9.240 0 82 1239 16886 i * 63.109.64.0/24 137.39.23.173 81 701 8143 i *>i 12.123.21.242 0 82 3561 8143 i * i 12.123.21.242 0 82 3561 8143 i * i63.109.65.0/24 12.123.21.242 0 82 3561 8143 ? *>i 12.123.21.242 0 82 3561 8143 ? * 137.39.23.173 81 701 8143 ? show ip bgp
  • 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
      • no_export (0xFFFFFF01)
    • don’t export out of AS
    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
  • 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
  • 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
  • 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
  • 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
  • iBGP Peers Must be Fully Meshed iBGP peers do not announce routes received via iBGP
    • N border routers means N(N-1)/2 peering sessions -- this does not scale
    • Currently three solutions :
      • Break an AS up into smaller Autonomous Systems
      • Route Reflectors
      • Confederations
    eBGP update iBGP updates
  • Route Reflectors Route Reflectors must be fully meshed Route Reflectors pass along updates to client routers RR RR RR RR RR RR
  • 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.
  • Recommended Reading
    • IDR : http://www.ietf.org/html.charters/idr-charter.html
    • Internet Routing Architectures. Bassam Halabi. . The BGP Bible! Get second edition (2000).
    • BGP4: Inter-domain Routing in the Internet. John W. Stewart, III. 1999. Good high-level introduction.
    • Routing in the Internet. Christian Huitema. 2000.
    • OSPF -- Anatomy of an Internet Routing Protocol. John T. Moy. 1998.
    • Managing IP Networks with Cisco Routers. Scott M. Ballew. 1997.
  • Links www.research.att.com/~griffin/IPcourses.html www.research.att.com/~griffin/interdomain.html These slides : Links on interdomain routing:
  • What I Didn’t talk about… IP Layer TCP UDP FTP HTTP Telnet RTP SNMP DNS … Applications …
  • Selected R&D work on IP Network Management
    • Bravo : backbone routing analysis, visualization, and optimization
    • Tap : collection and analysis of traffic flow data
    • Metrica : SNMP polling
    • Netdb : router configuration management
    • Peermon : monitoring CBB from the outside
    • Routdb : monitoring CBB routes from the inside
    • Topology server : building live network maps
    • Falcon : fault correlation, visualization
    • Wipm : active delay measurement