Lecture 9 IP Datagram Routing and Processing IP

  • Slides: 23
Download presentation
Lecture 9 IP Datagram Routing and Processing • • IP Datagram Format IP Datagram

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

Lecture 9 Host, Hop, Router and Routing

Lecture 9 Host, Hop, Router and Routing

Lecture 9 Problems in IP Datagram Transfer IP Header Source/Dest. Addresses, etc. IP Data

Lecture 9 Problems in IP Datagram Transfer IP Header Source/Dest. Addresses, etc. IP Data Payload IP datagram: IP Datagram: 64 KByets in maximum - Packet used in Internet protocol (IP) - Generated by source, forwarded by routers and received by destination - Created, processed and understood by software IP D Source host Sender IP D router 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? Destination host Receiver

Lecture 9 IP Datagram

Lecture 9 IP Datagram

Lecture 9 IP Datagram Format Maximum 64 K Bytes Header Data Payload 20 ~

Lecture 9 IP Datagram Format Maximum 64 K Bytes Header Data Payload 20 ~ 60 Bytes 1 st 32 bits/ 4 bytes 2 nd 32 bits/ 4 bytes 3 rd 32 bits/ 4 bytes 4 th 32 bits/ 4 bytes 5 th 32 bits/ 4 bytes 6 th 32 bits/ 4 bytes VERS: 0100 (IPv 4), 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, IPv 6=41

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

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

Lecture 9 IP Datagram Forwarding and Routing Table IP Datagram Forwarding: - Performed by

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

Lecture 9 IP Datagram Forwarding and Routing Table An Animation of forwarding an IP

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

Lecture 9 IP Features IP is connectionless - Datagram contains identity of destination -

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 D 5 D 4 D 3 D 2 D 1 - Lost Sender - Duplicated - Delivered out-of-order Called best effort delivery D 5 D 2 D 3 D 1 Internet Receiver Motivation: accommodate all possible networks

Lecture 9 Resolving Addresses 150. 100. 12. 5 150. 100. 12. 1 R 1

Lecture 9 Resolving Addresses 150. 100. 12. 5 150. 100. 12. 1 R 1 Hardware Addr? 200. 16. 1 R 2 Hardware Addr? 200. 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 R 1 addr. , 2) R 1 finds R 2 addr. , 3) R 2 finds F addr. - Address Resolution (AR) - Given a network N and IP address IPAddr of computer on N - Find the hardware address HAddr /MAC corresponding to the IPAddr

Lecture 9 Address Resolution Techniques - Association between a protocol address and a hardware

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

Lecture 9 Table Lookup Resolution - Use a simple list containing IP address and

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 (net. ID); can save space by dropping prefix and use suffix (host. ID) only.

Lecture 9 Closed-form Computation - If hardware technology uses small, configurable hardware address, network

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 & 0 xff - IPv 4 cannot use this approach! - IPv 6 adopts this approach.

Lecture 9 Dynamic Resolution and Comparison - Use ‘network ‘ to resolve IP addresses

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 to a 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

Lecture 9 ARP - Address Resolution Protocol (ARP) - part of IP protocol suite

Lecture 9 ARP - 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 IP add Step 1: - Make a request ARP message - Broadcast requested IP add. Step 2: Compare the IP with own Step 3: - Make a reply ARP message - Y replies its hardware add. HW add ARP

Lecture 9 ARP Message Flow IP_Add, Hard_Addr Source Type=800 IP Address request message Type=806

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

Lecture 9 ARP Example for Ethernet - ARP request message dropped into hardware frame

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

Lecture 9 ARP Message Format - HARDWARE ADDRESS TYPE = 1 for Ethernet PROTOCOL

Lecture 9 ARP Message Format - HARDWARE ADDRESS TYPE = 1 for Ethernet PROTOCOL ADDRESS TYPE = 0 x 0800 for IP HARDWARE ADDRESS LENGTH = 6 for Ethernet PROTOCOL ADDRESS LENGTH = 4 for IPv 4 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

Lecture 9 Sending, Caching and Processing ARP Message - Sender constructs ARP message -

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: How ARP Works - Animation - Adds sender's address to local cache - Sends pending IP packet(s) - Request: ARP in Wikipedia - If receiver is target, forms response http: //en. wikipedia. org/wiki/ - Unicasts to sender Address_Resolution_Protocol - 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

Lecture 9 Internet History - Internet concept (originally called ‘catenet’ developed in conjunction with

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 (Do. D) Leonard Kleinrock Vinton Cerf Robert Kahn - (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 1980 s - (1983) TCP/IP becomes the official protocol of ARPANET for nonmilitary users - (1983) MILNET was born - (1986) NSFNET established - using T 1 More about Internet history at - replaced ARPANET in 1990 http: //en. wikipedia. org/wiki/Internet - 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 IPv 4, next generation is IPv 6 or another (? )

Lecture 9 Internet Standard Administration - ISOC (Internet Society): nonprofit organization formed in 1992

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 IETF website 2. General Area 3. Internet Area http: //www. ietf. org/ 4. Operations and Management Area 5. Routing Area IETF Wikipedia 6. User Services Area http: //en. wikipedia. org/wiki/Internet_ 7. Transport Area Engineering_Task_Force 8. Security Area - RFC Editor and IANA (Internet Assigned Numbers Authority): manage and publish RFC (Request for Comment) and IP addresses

Exercise 9 Page 1 Note: There are five problems in this exercise written in

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 7 C 4 E 03 02 B 4 0 E 0 F 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 R 1. 150. 100. 12. 1 150. 100. 12. 0/26 150. 100. 12. 5 H 1 R 1 150. 100. 13. 128/25 150. 100. 14. 3 R 2 150. 100. 13. 129 150. 100. 14. 1 150. 100. 14. 0/24 150. 100. 14. 2 150. 100. 14. 4 R 4 150. 100. 0. 1 R 3 150. 100. 15. 32/27 Outside Internet

Exercise 9 Page 2 4. How many responses does a computer expect to receive

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