0% found this document useful (0 votes)
82 views

Icmp An Ethernet Frame: IP Packet

ICMP is a network layer protocol that allows devices on an IP network to send error messages indicating problems with packet transmission. An ICMP packet contains an IP header and ICMP payload. The ICMP payload includes fields for the ICMP message type and code, checksum, and optional data. Common ICMP message types include echo request, echo reply, destination unreachable, and time exceeded. ICMP helps devices communicate network errors, test connectivity, and perform tasks like traceroute.

Uploaded by

SHA Eric
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views

Icmp An Ethernet Frame: IP Packet

ICMP is a network layer protocol that allows devices on an IP network to send error messages indicating problems with packet transmission. An ICMP packet contains an IP header and ICMP payload. The ICMP payload includes fields for the ICMP message type and code, checksum, and optional data. Common ICMP message types include echo request, echo reply, destination unreachable, and time exceeded. ICMP helps devices communicate network errors, test connectivity, and perform tasks like traceroute.

Uploaded by

SHA Eric
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

ICMP

An Ethernet frame IP Packet

Destination Source
Mac Address MAC Address Type Data IP Packet CRC

6 6 2 46 -1500 4
bytes bytes bytes bytes bytes

IPv4 Packet structure


IP protocol 32 total
version bits
headernumber
length head. type of datagram
ve length
(bytes) len service length (bytes)
“type” of data r fragment
16-bit identifier flgs for
offset
max number time to upper header fragmentation/
remaining hops live reassembly
(decremented at layer
32 bit source IPchecksum
address
each router)
32 bit destination IP address
upper layer protocol
to deliver payload Options (if any) E.g. timestamp,
to record route
data
taken, specify
(variable length,
list of routers
typically a TCP to visit.
or UDP segment)
ICMP packet
ICMP packet

  Bit 0 - 7 Bit 8 - 15 Bit 16 - 23 Bit 24 - 31

Version/IHL Type of service Length

Identification flags and offset


IP Header
Time To Live (TTL) Protocol Checksum
(20 bytes)
Source IP address

Destination IP address

Type of message Code Checksum


ICMP Payload
Quench
(8+ bytes)
Data (optional)

Generic composition of an ICMP packet[5]

 Header (in blue):


o Protocol set to 1 and Type of Service set to 0.
 Payload:
o Type of ICMP message (8 bits)
o Code (8 bits)
o Checksum (16 bits), calculated with the ICMP part of the packet
(the header is not used). It is the 16-bit one's complement of the
one's complement sum of the ICMP message starting with the Type
field[6]
o The ICMP 'Quench' (32 bits) field, which in this case (ICMP echo
request and replies), will be composed of identifier (16 bits) and
sequence number (16 bits).
o Data load for the different kind of answers (Can be an arbitrary
length, left to implementation detail. However must be less than
the maximum MTU of the network[citation needed]).
 Data Transportation
List of permitted control messages (incomplete list)
ICMP Type Code Description
0 0 Echo Reply
1 Reserved
2 Reserved
3 0 Destination network unreachable
3 1 Destination host unreachable
3 2 Destination protocol unreachable
3 3 Destination port unreachable
3 4 Fragmentation required, and DF flag set
3 5 Source route failed
3 6 Destination network unknown
3 7 Destination host unknown
3 8 Source host isolated
3 9 Network administratively prohibited
3 10 Host administratively prohibited
3 11 Network unreachable for TOS
3 12 Host unreachable for TOS
3 13 Communication administratively prohibited
3 14 Host Precedence Violation
3 15 Precedence cutoff in effect
4 0 Source Quench
5 0 Redirect Datagram for the Network
5 1 Redirect Datagram for the Host
5 2 Redirect Datagram for the TOS & network
5 3 Redirect Datagram for the TOS & host
6 Alternate Host Address
7 Reserved
8 0 Echo request (used to ping)
9 0 Router Advertisement
10 0 Router discovery/selection/solicitation
11 0 TTL expired in transit
11 1 Fragment reassembly time exceeded
12 0 Pointer indicates the error
12 1 Missing a required option
12 2 Bad length
13 0 Timestamp
14 0 Timestamp reply
15 0 Information Request
16 0 Information Reply
17 0 Address Mask Request
18 0 Address Mask Reply
19 Reserved for security
20-29 Reserved for robustness experiment
30 0 Traceroute Information Request
31 Datagram Conversion Error
32 Mobile Host Redirect
33 Where-Are-You (originally meant for IPv6)
34 Here-I-Am (originally meant for IPv6)
35 Mobile Registration Request
36 Mobile Registration Reply
37 Domain Name Request
38 Domain Name Reply
39 SKIP Algorithm Discovery Protocol, Simple Key-Management for Internet
Protocol
40 Photuris, Security failure

42 ICMP for experimental mobility protocols such as Seamoby


[RFC4065]
42-255 Reserved

(Sources: Wikipedia and Computer Networking – A Top-Down Approach by


Kurose and Ross) //

You might also like