Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What exactly are in the packets that are sent via the ping command?

I was reading a Wikipedia article about magic numbers and saw this:

DHCP packets use a "magic cookie" value of '63 82 53 63' at the start of the options section of the packet. This value is included in all DHCP packet types.

so what else is in the packets?

share|improve this question
    
"What is in a packet" is much too broad of a question to answer here. It involves a knowledge of Layer 2 and 3 technologies that is much too long for an answer here. There are entire college courses on the topic. I would suggest reading the wikipedia article that you quoted and googling any terms that you don't understand and go from there. –  MDMarra May 30 '10 at 23:54
    
I just want to know what code (hexadecimal I assume?) is in it. –  Wuffers May 30 '10 at 23:58
3  
ping packets are made of ones and zeroes (1's and 0's), just like all other packets. –  quack quixote May 31 '10 at 0:29
1  
@quack: Yes, I know that, I just wanted something a level or two higher than binary. –  Wuffers May 31 '10 at 1:12
add comment

2 Answers

up vote 6 down vote accepted

ping packets are ICMP packets (IP protocol number 1) with a subtype of ECHO REQUEST or ECHO REPLY.

share|improve this answer
    
Thanks! I'll do some more research on ECHO REQUEST and ECHO REPLY. –  Wuffers May 31 '10 at 0:08
4  
technically ping is ECHO REQUEST. ECHO REPLY is one type of ack. ping! ack. ping! ack. ping! ack. –  quack quixote May 31 '10 at 1:20
add comment

Get Wireshark(previously called Ethereal), a packet sniffer, and have a look what binary/hex is in there.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.