Download presentation
Published byLester Randall Modified over 9 years ago
1
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)
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 mapping Make 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 Lookup Searching or indexing to get MAC addresses Similar to lookup in /etc/hosts for names Problem: change Ethernet card => change table IP Address MAC Address 0A:4B:00:00:07:08 0B:4B:00:00:07:00 0A:5B:00:01:01:03
6
Address Resolution Mechanisms
Dynamic Binding (ARP) The host broadcasts a request: “What is the MAC address of ?” The host whose IP address is replies back: “The MAC address for is 8A-5F-3C ” 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 HW Type Protocol Type HW Len
8 16 24 31 HW Type Protocol Type HW Len Protocol Len Operation Sender HW Address (6 bytes) Sender HW Address Sender IP Address (4 bytes) Sender IP Address Target HW Address (6 bytes) Target HW Address Target IP Address (4 bytes) Hardware (HW) Type: 1 for Ethernet Protocol Type: = IP address HW Len and Protocol Len allows arbitrary networks to be used Operation: 1 = ARP Request, 2 = ARP Response = RARP Request, 4 = RARP Response ARP messages are sent directly to MAC layer ARP message is 28 octets long.
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
Internet Services The three conceptual layers of internet services.
Connectionless Packet Delivery Services Reliable Transport Services Application Service
14
Destination IP Address
IP Datagram Format Vers HLen TOS Total Length Identification Flags Time to live Protocol Header Checksum Fragment Offset Source IP Address Destination IP Address IP Options (if any) Padding Data 4 8 16 31
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
Maximum Transmission Unit (MTU)
Each subnet has a maximum frame size Ethernet: 1500 octets FDDI: 4470 octets per frame Token Ring: 2K to 4K octets Transmission Unit = IP datagram (data + header) Each subnet has a maximum IP datagram length (header + payload) = MTU B Net 1 MTU = 1500 Net 3 Net 2 MTU = 620 R1 R2 A
19
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. IP Header Original Datagram IP Hdr 1 Data 1 IP Hdr 3 Data 3 IP Hdr 2 Data 2
20
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 B Net 1 MTU = 1500 Net 3 Net 2 MTU = 620 R1 R2 A
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
Fragmentation Example
Net 1 MTU = 1500 Net 2 MTU = 620 Net 3 MTU = 1500 A R1 R2 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 = 150 MF1 bit = 1, MF2 bit = 1, MF3 bit = 0 H1 frag1 H2 frag2 H3 frag3 Net works Min MTU = 620 75 150
23
IP Header Time to live (TTL) 8 bits: Protocol (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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.