Yesterday interviewer ask me what is port number for ping and which protocol ping use TCP/UDP.
After interview I search on internet and found different results someone says ICMP uses Port 7, someone says it does not use port number, on one site I found it usese IP protocol 1, etc.
Can anyone help me with the correct explanation?
Best Answer
The standard ping command does not use TCP or UDP. It uses ICMP. To be more precise ICMP type 8 (echo message) and type 0 (echo reply message) are used. ICMP has no ports!
See RFC792 for further details.