ch3 Arp-Icmp
ch3 Arp-Icmp
1
Overview
2
Address Resolution Protocol (ARP) and
Reverse ARP (RARP)
• Note:
– The Internet is based on IP addresses
– Data link protocols (Ethernet, FDDI, ATM) may have
different (MAC) addresses
• The ARP and RARP protocols perform the translation
between IP addresses and MAC layer addresses
• We will discuss ARP for broadcast LANs, particularly Ethernet
LANs
IP packet
IP Dest.
(2)-ICI IP Source IP packet
MAC Dest.
MAC Data
IP layer Source
IP entity
(2)-SAP
(2)-IDU
(2)-ICI
Ethernet frame
MAC-Dest.
MAC-Source MAC Dest.
MAC Source
2-Layer Ethernet frame
(Ethernet) IP packet
IP Dest.
IP Source
Data
(2)-entity
System (Ethernet/IP)
ARP Protocol
REQUEST: Computer with MAC-Adr-A and IP-Adr-A to
all: Looking for a MAC? from computer with IP-Adr-B
A B
ARP-Cache: ARP-Cache:
ARP-Cache:
empty empty
IP-Adr-A → MAC-Adr-A
A B
ARP-Cache:
ARP cache: ARP-Cache:
ARP cache:
empty
IP-Adr-B → MAC-Adr-B empty
IP-Adr-A → MAC-Adr-A
ARP Packet Format (1)
Ethernet II header
6 6 2 28 10 4
* Note: The length of the address fields is determined by the corresponding address length fields
6
ARP Packet Format (2)
7
Example
8
ARP Cache
9
Things to know about ARP
10
ICMP Overview
IP payload
11
ICMP message format
bit # 0 7 8 15 16 23 24 31
additional information
or
0x00000000
4 byte header:
• Type (1 byte): type of ICMP message
• Code (1 byte): subtype of ICMP message
• Checksum (2 bytes): similar to IP header checksum.
Checksum is calculated over entire ICMP message
If there is no additional data, there are 4 bytes set to zero.
→ each ICMP messages is at least 8 bytes long
12
ICMP Query message
ICMP query:
• Request sent by host to a router or host
• Reply sent back to querying host
13
Example of a Query:
Echo Request and Reply
Host Host
or or
Router router
14
Example of a Query:
ICMP Timestamp
Timestamp
• A system (host or router) asks Request
another system for the current time.
Sender
• Time is measured in milliseconds Receiver
15
ICMP Error message
16
ICMP Error message
ICMP Message
Unused (0x00000000)
17
Frequent ICMP Error message
18
Some subtypes of the “Destination Unreachable”
19