1 / 23

IP Datagram Routing and Processing

Lecture 9. IP Datagram Routing and Processing. IP Datagram Format IP Datagram Forwarding and Routing Table IP Features Address Resolution Techniques - Table Lookup - Close-form computation - Dynamic Message Exchange ARP - Address Resolution Protocol ARP Message Format

zeno
Télécharger la présentation

IP Datagram Routing and Processing

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. Lecture 9 IP Datagram Routing and Processing • IP Datagram Format • IP Datagram Forwarding and Routing Table • IP Features • Address Resolution Techniques - Table Lookup - Close-form computation - Dynamic Message Exchange • ARP - Address Resolution Protocol • ARP Message Format • Internet History and Standard Administration

  2. Lecture 9 Host, Hop, Router and Routing

  3. Lecture 9 Problems in IP Datagram Transfer IP Header Source/Dest. Addresses, etc. IP Data Payload IP datagram: - Packet used in Internet protocol (IP) - Generated by source, forwarded by routers and received by destination - Created, processed and understood by software IP Datagram: 64KByets in maximum IP D IP D IP D IP D IP D router router router Source host Sender Destination host Receiver network network network network Problems in IP datagram transfer: - What is IP datagram header format? - How to forward IP datagram from one router to another? - How to transfer IP datagram across physical network? - How to process large IP datagram to adapt physical network? - How to find and report errors in IP datagram transfer?

  4. Lecture 9 IP Datagram IP Datagram

  5. Lecture 9 IP Datagram Format Maximum 64K Bytes Header Data Payload 20 ~ 60 Bytes 1st 32bits/ 4bytes 2nd 32bits/ 4bytes 3rd 32bits/ 4bytes 4th 32bits/ 4bytes 5th 32bits/ 4bytes 6th 32bits/ 4bytes VERS: 0100 (IPv4), Service Type: priority, reliability,… Total Length: < 216 (with header) H.LEN:header length in 4-bytes, the minimum = 20 bytes when H.LEN=5 IDENT, FLAGS, FRAGMENT OFFSET- used with fragmentation Time To Live (TTL): 1~255 integer, number of routers a datagram can pass Type: upper layer protocol: TCP=6, UDP=17, ICMP=1, IGMP=2, IPv6=41

  6. Lecture 9 IP Datagram Routing Table Concept Routing Tables for Routers 1-5

  7. Lecture 9 IP Datagram Forwarding and Routing Table IP Datagram Forwarding: - Performed by routers - Similar to WAN forwarding using switching - Table-driven - Entry specifies next hop - Unlike WAN forwarding - Uses IP addresses - Next-hop is a router or destination - Use default route to keep a routing table small

  8. Lecture 9 IP Datagram Forwarding and Routing Table An Animation of forwarding an IP datagram Process of IP Datagram Forwarding: - Receive a datagram - Extract destination address field, D - Calculate network ID from D using mask M: D & M - Look up ID in routing table - Find next-hop address, N - Send the datagram to N Default route entry may exist !! Utilities: ipconfig, route, netstat Please try them!!

  9. Lecture 9 IP Features IP is connectionless - Datagram contains identity of destination - Each datagram sent/handled independently Routers can change at any time IP allows datagrams to be - Delayed - Lost - Duplicated - Delivered out-of-order Called best effort delivery Motivation: accommodate all possible networks D5D5D2D3D1 D5D4D3D2D1 Internet Receiver Sender

  10. Lecture 9 Resolving Addresses 150.100.12.5 150.100.12.1 200.100.16.1 R1 Hardware Addr? R2 Hardware Addr? 200.100.16.8 F Hardware Addr? • IP datagram is sent, forwarded or delivered using IP address across physical network • Physical network does not understand protocol IP address • Consequence: translation from IP address to network hardware/MAC address - to transfer a packet across a physical network - such translation is needed for each physical network e.g., from A to F: 1) A finds R1 addr., 2) R1 finds R2 addr., 3) R2 finds F addr. • Address Resolution (AR) - Given a network N and IP address IPAddrof computer on N - Find the hardware address HAddr /MACcorresponding to the IPAddr

  11. Lecture 9 Address Resolution Techniques • Association between a protocol address and a hardware address is called binding • Three techniques: Table lookup - Bindings stored in memory with protocol address as key - Data link layer looks up protocol address to find hardware address Closed-form computation - Protocol address based on hardware address - Data link layer derives hardware address from protocol address Dynamic message exchange - Network messages used for "just-in-time" resolution - Data link layer sends message requesting hardware address - Destination responds with its hardware address

  12. Lecture 9 Table Lookup Resolution • Use a simple list containing IP address and hardware address for each host on net • Search on IP address and extract corresponding hardware address • Note that all IP addresses have same prefix (netID); can save space by dropping prefix and use suffix (hostID) only.

  13. Lecture 9 Closed-form Computation • If hardware technology uses small, configurable hardware address, network administrator can choose hardware address based on IP address • Example - hardware uses one octet address that can be configured • Simply choose hardware address to be hostid - Now, any host can determine hardware address as: hardware_address = ip_address & 0xff - IPv4 cannot use this approach! - IPv6 adopts this approach.

  14. Lecture 9 Dynamic Resolution and Comparison • Use ‘network ‘ to resolve IP addresses • Message exchange with other computer(s) returns hardware address to source • Two designs: -Centralized or Server-based - computer sends message toa server to resolve address easier to manage, used on non-broadcast media (e.g., ATM) - Distributed- all computers participate; destination provides hardware address to host requires no dedicated computers, no administration IP DRC Video T: Table Lookup, C: Close-form Computation, D: Dynamic Message Exchange

  15. Lecture 9 ARP - Address Resolution Protocol • Address Resolution Protocol (ARP) - part of IP protocol suite • Two-part protocol - Request from source asking for hardware address - Reply from destination providing hardware address ARP IP add Step 1: - Make a request ARP message - Broadcast requested IP add. Step 2: Compare the IP with own HW add Step 3: - Make a reply ARP message - Y replies its hardware add.

  16. Lecture 9 ARP Message Flow IP_Add, Hard_Addr Source Type=800 IP Address request message Type=806 Hardware Address reply Type=806 Destination Ethernet Frame IP_Add, Hard_Addr - 48bits (6 bytes) unique address - Broadcast address: all 1s address - Type=800IPv4 D, 806ARP Msg

  17. Lecture 9 ARP Example for Ethernet • ARP request message dropped into hardware frame and broadcast, for Ethernet --------------------------------------------------------------------------------------- | BC-Addr (all 1) | Sender.HAddr |806| Request ARP Message(IPAddr) | --------------------------------------------------------------------------------------- • Uses separate protocol type in hardware frame (Ethernet = 806) • Sender inserts IP address IPAddr into message and broadcast • Every other computer examines the request • Computer with requested IP address responds • Puts hardware address in response • Unicasts to sender, for Ethernet ---------------------------------------------------------------------------------- | Sender.HAddr | Dest.HAddr | 806 | Reply ARP Message(HAddr) | ---------------------------------------------------------------------------------- • Original requester can then extract hardware address & send IP packet to destination -------------------------------------------------------------------------- | Dest.HAddr | Sender.HAddr | 800 | IP Datagram (Packet) | -------------------------------------------------------------------------- - Frame type 800  Frame payload is an IP datagram

  18. Lecture 9 ARP Message Format • HARDWARE ADDRESS TYPE = 1 for Ethernet • PROTOCOL ADDRESS TYPE = 0x0800 for IP • HARDWARE ADDRESS LENGTH = 6 for Ethernet • PROTOCOL ADDRESS LENGTH = 4 for IPv4 • OPERATION = 1 for request, 2 for response • Contains both target and sender mappings from IP address to hardware address • Request sets hardware address of target to 0 • Target can extract hardware address of sender (saving an ARP request) • Target exchanges sender/target in response

  19. Lecture 9 Sending, Caching and Processing ARP Message • Sender constructs ARP message • ARP message carried as data in hardware frame - encapsulation Using ARP for each IP packet adds two packets of overhead for each IP packet • Computer caches ARP responses in local ARP cache/table - Flushes cache at system startup; and Entries discarded periodically - Cache searched prior to sending ARP request • Receiver extracts sender's hardware address and updates local ARP table • Receiver checks operation - request or response • Response: - Adds sender's address to local cache - Sends pending IP packet(s) • Request: - If receiver is target, forms response - Unicasts to sender - Adds sender's address to local cache • Note: - Target likely to respond "soon" - Computers have finite storage for ARP cache - Only target adds sender to cache; others only update if target already in cache - arp utility How ARP Works - Animation ARP in Wikipedia http://en.wikipedia.org/wiki/Address_Resolution_Protocol

  20. Lecture 9 Internet History • Internet concept (originally called ‘catenet’ developed in conjunction with TCP/IP) • (1967) Initially funded through ARPA - Advanced Research Project Agecy in the Department of Defense (DoD) • (1969) Four-node ARPANET established - Univ. of California at Los Angeles (UCLA)     - Univ. of California at Santa Barbara (UCSB)     - Stanford Research Institute (SRI)    - Univ. of Utah   - Network Control Protocol - NCP • (1973) Cerf and Kaha proposed NCP,  TCP/IP suite development begins • (1977) An internet tested using TCP/IP (ARPANET, packet radio and packet satellite) • (1978) UNIX distributed to academic/research sites • (1981) CSNET established, sponsored by National Science Foundation (NSF) without relation with DARPA - Most CS departments in US universities connected to CSNET by the middle of 1980s • (1983) TCP/IP becomes the official protocol of ARPANET for nonmilitary users • (1983) MILNET was born • (1986) NSFNET established - using T1     - replaced ARPANET in 1990     - went back to a research network in 1995 • (1991) ANSNET by IBM, Merit and MCI • Since then rapid progress, wide spread in the world • Current Internet protocol is IPv4, next generation is IPv6 or another (?) Leonard Kleinrock Vinton Cerf Robert Kahn More about Internet history at http://en.wikipedia.org/wiki/Internet

  21. Lecture 9 Internet Standard Administration • ISOC (Internet Society): nonprofit organization formed in 1992 to provided support for the Internet standard process  • IAB (Internet Architecture Board): technical advisor and the external liaison, 13 voting members • IRTF (Internet Research Task Force): long-term research, divided by many research groups (RG) • IETF (Internet Engineering Task Force): forum of working groups for various areas in Internet 1. Applications Area 2. General Area 3. Internet Area 4. Operations and Management Area 5. Routing Area 6. User Services Area 7. Transport Area 8. Security Area • RFC Editor and IANA (Internet Assigned Numbers Authority): manage and publish RFC (Request for Comment) and IP addresses IETF website http://www.ietf.org/ IETF Wikipedia http://en.wikipedia.org/wiki/Internet_Engineering_Task_Force

  22. Exercise 9 Page 1 Note: There are five problems in this exercise written in two pages! 1. Give the main features of IP (Internet Protocol). 2. An IP datagram has arrived with the following information in the header (in hexadecimal):          45 00 00 54 00 03 00 00 20 06 00 00 7C 4E 03 02 B4 0E 0F 02      a. Are there any options?     b. What is the size of the data?     c. How many more routers can the packet travel to?      d. What is the identification number of the packet?      e. What is the type of upper layer protocol? 3. Suppose the network of an organization is shown in the following figure. Give a routing table of router R1. 150.100.13.128/25 150.100.13.129 R2 150.100.14.3 150.100.12.1 150.100.14.1 Outside Internet 150.100.12.0/26 150.100.14.0/24 R1 R4 150.100.14.2 150.100.0.1 150.100.14.4 150.100.12.5 R3 150.100.15.33 H1 150.100.15.32/27

  23. Exercise 9 Page 2 4. How many responses does a computer expect to receive when it broadcasts an ARP request? Why? How does a computer (attached an Ethernet) know whether an arriving frame contains an IP datagram or an ARP message? 5. Order the following ARP events correctly.     a. Host in procession of IP address sends computer physical address     b. Transmission of data to correct host     c. IP address is broadcast     d. IP address and computer address stored in cache memory

More Related