1 / 26

TCOM 509 – Internet Protocols (TCP/IP) Lecture 03_a

TCOM 509 – Internet Protocols (TCP/IP) Lecture 03_a. Instructor: Dr. Li-Chuan Chen Date: 09/15/2003. Based in part upon slides of Prof. J. Kurose (U Mass), Prof. B. Yener (Rensselaer Polytechnic Institute). Outline. Chapter 5 – mapping Internet Addresses to Physical Addresses (ARP)

elvina
Download Presentation

TCOM 509 – Internet Protocols (TCP/IP) Lecture 03_a

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. TCOM 509 – Internet Protocols (TCP/IP)Lecture 03_a Instructor: Dr. Li-Chuan ChenDate: 09/15/2003 Based in part upon slides of Prof. J. Kurose (U Mass), Prof. B. Yener (Rensselaer Polytechnic Institute)

  2. Outline • Chapter 5 – mapping Internet Addresses to Physical Addresses (ARP) • Chapter 6 • Chapter 7

  3. Address Resolution Problems • Problem: given an IP address, need to find its equivalent physical address • Sender must map the intermediate router’s IP address and destination IP address to their corresponding physical addresses. • Solutions: • Direct Mapping • Table lookup • Dynamic Binding via ARP (Address Resolution Protocol)

  4. Address Resolution Mechanisms • Direct mappingMake the physical addresses equal to the host ID portion. • Mapping is easy. • Only possible if admin has power to choose both IP and physical address or when size of physical address < IP address. • Cannot apply to Ethernet addresses (Ethernet addresses are 48 bits vs. IP addresses which are 32-bits).

  5. Address Resolution Mechanisms • Table LookupSearching or indexing to get MAC addresses • Similar to lookup in /etc/hosts for names • Problem: change Ethernet card => change table IP Address MAC Address 197.15.3.1 0A:4B:00:00:07:08 197.15.3.2 0B:4B:00:00:07:00 197.15.3.3 0A:5B:00:01:01:03

  6. Address Resolution Mechanisms • Dynamic Binding (ARP) • The host broadcasts a request: “What is the MAC address of 216.109.11.67?” • The host whose IP address is 216.109.11.67 replies back: “The MAC address for 216.109.11.67 is 8A-5F-3C-23-45-5616” • Broadcast is expensive. • ARP responses are cached. Issues • Broken hardware: use timer. • Table full: least recently used (LRU) • Each host updates its table when receiving an ARP broadcast.

  7. ARP Message Format 8 16 24 31 0 HW Type Protocol Type • Hardware (HW) Type: 1 for Ethernet • Protocol Type: 080016 = IP address • HW Len and Protocol Len allows arbitrary networks to be used • Operation: 1 = ARP Request, 2 = ARP Response 3 = RARP Request, 4 = RARP Response • ARP messages are sent directly to MAC layer • ARP message is 28 octets long. HW Len Protocol Len Operation Sender HW Address (6 bytes) Sender HWAddress Sender IP Address (4 bytes) Sender IP Address Target HW Address (6 bytes) Target HW Address Target IP Address (4 bytes)

  8. ARP Let Ia = IP address and pa =physical address • To send an internet packet across a physical net, the network software must map Ia to pa and use the pa to transmit the frame. • If Ia < pa, use direct mapping. Else, use ARP to perform dynamic mapping. • Given an IP address, a host uses ARP to find the corresponding hardware address. • To make ARP efficient, all hosts on the network receive the ARP request and update its cache. • The host with the same Ia replies directly to the sender.

  9. Outline • Chapter 4.1 – 4.18 • Chapter 5 • Chapter 6 – Determining An Internet Address At Startup (RARP) • Chapter 7

  10. RARP Problems: Given pa, how do we find Ia ? Solution: Reverse ARP (RARP) • Use the same message format as ARP. • Sender broadcast a RARP request (fills its pa in the target field). • Only RARP server replies. • Typically used in Ethernet LAN. • If only one RARP server available on the network, use larger delay time before retransmit another request. • More RARP servers? • Pros – reliable • Cons – overload the network. (assign primary and secondary server to solve this problem)

  11. RARP • Diskless host needs to find its IP address at startup before it can communicate using TCP/IP. • Give physical address, a host can use RARP to find its IP address from a RARP server on the network.

  12. Outline • Chapter 4.1 – 4.18 • Chapter 5 • Chapter 6 • Chapter 7 – Internet Protocol: Connectionless Datagram Delivery

  13. Application Service Reliable TransportServices Connectionless Packet Delivery Services Internet Services The three conceptual layers of internet services.

  14. 0 4 8 16 31 Vers HLen TOS Total Length Identification Flags Fragment Offset Time to live Protocol Header Checksum Source IP Address Destination IP Address IP Options (if any) Padding Data IP Datagram Format

  15. IP Datagram Format • Internet datagram: basic transfer unit • VERS - Version (4 bits): IPv4 • HLEN - Internet header length (4 bits): units of 32-bit words. Min header is 20 bytes or 5 words. • Total Length (16 bits): header + data. Units of bytes. Total must be less than 64 K (216) octets.

  16. IP Header • TOS - Type of service (8 bits) • precedence (3 bits), delay, throughput, and reliability. • Not widely supported.

  17. IP Header • How big can a datagram be? • What happens when a datagram is larger than the frame size of the underlying physical network?

  18. Net 1 MTU = 1500 Net 2 MTU = 620 Net 3 MTU = 1500 R1 R2 A B Maximum Transmission Unit (MTU) • Each subnet has a maximum frame sizeEthernet: 1500 octetsFDDI: 4470 octets per frameToken Ring: 2K to 4K octets • Transmission Unit = IP datagram (data + header) • Each subnet has a maximum IP datagram length (header + payload) = MTU

  19. IP Header Original Datagram IP Hdr 1 Data 1 IP Hdr 2 Data 2 IP Hdr 3 Data 3 Fragmentation • Datagrams larger than MTU are fragmented • Original header is copied to each fragment and then modified (fragment flag, fragment offset, length,...) • Fragments must be a multiple of 8-octets.

  20. Net 1 MTU = 1500 Net 2 MTU = 620 Net 3 MTU = 1500 R1 R2 A B Reassembly • Reassembly only at the final destination • Partial datagrams are discarded after a timeout • Fragments can be further fragmented along the path. Subfragments have a format similar to fragments. • Minimum MTU along a path  Path MTU

  21. IP Header • Fragmentation • Identifier (16 bits): used in reassembly to uniquely identify all the pieces of a fragment chain. • Flags (3 bits): more fragments (MF), don’t fragment (DF), and reserved bit. • Fragment offset (13 bits): In units of 8 octets

  22. H3 H1 H2 frag1 frag3 frag2 Net works Min MTU = 620 0 75 150 frag1 frag2 frag3 Fragmentation Example Net 1 MTU = 1500 Net 2 MTU = 620 Net 3 MTU = 1500 R1 R2 A B • Payload size 1400 bytes needs to be transmitted, Packet ID = 2222 • Networks: Ethernet (MTU=1500) and Net2 (MTU=620) • Use smallest MTU size (620) to find payload size for the fragment packet. IP Header = 20 bytes => Payload = MTU – IP Header = 600 bytes • Fragments need to be multiples of 8-bytes. • Nearest multiple to 600 is still 600 bytes • Fragment offset length = 600/8 = 75 • Number of fragments = 1400/600 = 2.33 = 3 • frag1 = 600, frag2 = 600, frag3 = 200, Packet ID = 2222 for all fragments Offset1 = 0, Offset2 = 75, Offset3 = 150MF1 bit = 1, MF2 bit = 1, MF3 bit = 0

  23. IP Header • Time to live (TTL) 8 bits: • Specifies how long the datagram is allowed to live in the network (in seconds). Typically use number of hops visited. • Protocol (8 bits) • Next level protocol to receive the data, e.g., ICMP (1), IGMP (2), TCP (6), UDP (17). • Header checksum (16 bits) • 1’s complement sum of all 16-bit words in the header.

  24. IP Header • Source Address (32 bits): Original source. Does not change along the path • Destination Address (32 bits): Final destination. Does not change along the path. • Options (variable length): security, source route, record route, stream id, timestamp recording • Padding(variable length): Makes header length a multiple of 4 • Payload Data (variable length): Data + header < 65,535 bytes

  25. IP Header Options – for network testing or debugging • Security - for military purpose and is only supported by some products. • Source route – a list of IP address that the datagram must take. • Record route – the nodes in the path must return their IP address. • Stream id - used for voice for reserved resources • Timestamp – the time through the node is returned, so that delays may be measured. If entries in the options must be recorded by nodes, the sender must reserve sufficient space for the option data.

  26. Summary • Internetworking Problem • IP header: supports connectionless delivery, variable length pkts/headers/options, fragmentation/reassembly, • Fragmentation/Reassembly, Path MTU discovery. • ARP, RARP: address mapping • Internet architectural principles

More Related