What will happen if reply to Ping without payload?

110 Views Asked by At

I'm trying to figure out what is inside the payload of an ICMP packet for Ping. Wikepedia (https://en.wikipedia.org/wiki/Ping_(networking_utility)#Payload) says it can be filled with data for different purposes. I only want to figure out if a server is reachable, so I simply ran a command:

ping $server

Wireshark showed the 48 byte payload being something with a "random" leading value and ending with "101112131415161718191a1b1c1d1e1f". Repeating the command changed the leading value but the ending kept unchanged. The server always replied with the same payload.

So if I implement my own software and reply to this request with the correct identification and sequence number, but without including a payload in the server, will the client accept this as a valid response? If not, what could go wrong?

1

There are 1 best solutions below

0
Dot4 On

It will work, because default handler doesn't check payload when catch Echo-Reply. But ICMP-header must have same ID and SN.