2

The ICMP Echo Request and Echo Reply packets contain a Data portion. For example this is an Echo Request packet (that was sent in Windows using the ping command):

enter image description here

As you can see, there is a Data portion in the packet that consists of 32 bytes, and this Data doesn't seem to mean anything (it is just part of the alphabet).

Is the Data portion mandatory or is it optional?

1
  • 1
    The data payload can be very useful, largely depending on what you are using ping for. For basic health checks and latency, no, but you can force packet fragmentation by increasing the packet size over the MTU, you get built in (basic) data integrity checks as the ICMP response data payload must match the ICMP request data payload, and by changing it along with other ping arguments you can fine tune the load you put on the network by adjusting total duty cycle, burst frequencies / length, % of available bandwidth, and other attributes that can very helpful when investigating network issues.
    – Argonauts
    Commented Jun 7, 2016 at 9:21

1 Answer 1

2

The data portion is mandatory in reply packets, if there is a data portion in the request packet. The answering system must send a reply containing exactly the same data portion. The RFC792 does not specify if the data portion in the request packet is mandatory. The Data in this schema is not marked as (optional) as in many other RFCs.

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |     Type      |     Code      |          Checksum             |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |           Identifier          |        Sequence Number        |
 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 |     Data ...
 +-+-+-+-+-

However, sending a ping with zero bytes of data is entirely possible. On Windows try:

ping <destination> -l 0

This proves that the Data-portion in an ICMP-Echo-Request is optional.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .