IP Datagram Routing and Processing IP Datagram Format IP Datagram Forwarding and Routing Table IP...

download IP Datagram Routing and Processing IP Datagram Format IP Datagram Forwarding and Routing Table IP Features Address Resolution Techniques - Table Lookup

of 23

  • date post

    28-Dec-2015
  • Category

    Documents

  • view

    220
  • download

    0

Embed Size (px)

Transcript of IP Datagram Routing and Processing IP Datagram Format IP Datagram Forwarding and Routing Table IP...

  • IP Datagram Routing and ProcessingIP Datagram FormatIP Datagram Forwarding and Routing Table IP FeaturesAddress Resolution Techniques - Table Lookup - Close-form computation - Dynamic Message ExchangeARP - Address Resolution Protocol ARP Message FormatInternet History and Standard AdministrationLecture 9

  • Host, Hop, Router and RoutingLecture 9

  • Lecture 9Problems in IP Datagram TransferProblems 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?networknetworknetworknetworkrouterrouterrouterSource hostSenderDestinationhostReceiverIP datagram: - Packet used in Internet protocol (IP) - Generated by source, forwarded by routers and received by destination - Created, processed and understood by softwareIP DIP DIP DIP DIP DIP HeaderSource/Dest. Addresses, etc.IP Data PayloadIP Datagram: 64KByets in maximum

  • IP DatagramLecture 9IP Datagram

  • IP Datagram FormatVERS: 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=5IDENT, FLAGS, FRAGMENT OFFSET - used with fragmentation Time To Live (TTL): 1~255 integer, number of routers a datagram can passType: upper layer protocol: TCP=6, UDP=17, ICMP=1, IGMP=2, IPv6=41 Lecture 9HeaderData Payload20 ~ 60 BytesMaximum 64K Bytes1st 32bits/ 4bytes2nd 32bits/ 4bytes3rd 32bits/ 4bytes4th 32bits/ 4bytes5th 32bits/ 4bytes6th 32bits/ 4bytes

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

  • Lecture 9IP Datagram Forwarding and Routing TableIP 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 9IP Datagram Forwarding and Routing TableProcess 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 NDefault route entry may exist !!Utilities: ipconfig, route, netstat Please try them!!An Animation of forwarding anIP datagram

  • Lecture 9IP FeaturesIP 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-orderCalled best effort delivery

    Motivation: accommodate all possible networksSenderReceiverD5D4D3D2D1D5D5D2D3D1Internet

  • Lecture 9Resolving Addresses 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 IPAddr of computer on N - Find the hardware address HAddr /MAC corresponding to the IPAddr150.100.12.1150.100.12.5200.100.16.8200.100.16.1R1 Hardware Addr?R2 Hardware Addr?F Hardware Addr?

  • Lecture 9Address 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 9Table 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.

  • Lecture 9Closed-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.

  • Lecture 9Dynamic 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 T: Table Lookup, C: Close-form Computation, D: Dynamic Message ExchangeIP DRC Video

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

  • Lecture 9ARP Message FlowSourceDestinationIP_Add, Hard_AddrIP_Add, Hard_AddrIP Address request messageType=806Hardware Address reply Type=806- 48bits (6 bytes) unique address- Broadcast address: all 1s address- Type=800IPv4 D, 806ARP MsgEthernet FrameType=800

  • Lecture 9ARP 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 9ARP 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

  • Lecture 9Sending, 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 ARP in Wikipediahttp://en.wikipedia.org/wiki/Address_Resolution_ProtocolHow ARP Works - Animation

  • Lecture 9Internet 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) U