Get Help And Discuss STEM Concepts From Math To Data Science & Financial Literacy
STEM Gender Equality | Join us on ZOOM | Spreading Mathematical Happiness | Join Us on Slack

MathsGee is free of annoying ads. We want to keep it like this. You can help with your DONATION

0 like 0 dislike
22 views

Which port is used for ping command?

in Computer Science by Diamond (51,000 points) | 22 views

1 Answer

0 like 0 dislike

ping uses ICMP, specifically ICMP echo request and ICMP echo reply packets. There is no 'port' associated with ICMP. Ports are associated with the two IP transport layer protocols, TCP and UDP. ICMP, TCP, and UDP are "siblings"; they are not based on each other, but are three separate protocols that run on top of IP.

ICMP packets are identified by the 'protocol' field in the IP datagram header. ICMP does not use either UDP or TCP communications services, it uses raw IP communications services. This means that the ICMP message is carried directly in an IP datagram data field. raw comes from how this is implemented in software, to create and send an ICMP message, one opens a raw socket, builds a buffer containing the ICMP message, and then writes the buffer containing the message to the raw socket.

The IP protocol value for ICMP is 1. The protocol field is part of the IP header and identifies what is in the data portion of the IP datagram.

However, you could use nmap to see whether ports are open or not:

nmap -p 80 example.com
by Diamond (51,000 points)

Related questions

0 like 0 dislike
0 answers
asked Sep 3, 2019 in Computer Science by Tedsf Diamond (51,000 points) | 23 views
0 like 0 dislike
1 answer
asked Aug 29, 2019 in Computer Science by Tedsf Diamond (51,000 points) | 27 views
0 like 0 dislike
0 answers
asked Aug 30, 2019 in Computer Science by Tedsf Diamond (51,000 points) | 16 views
0 like 0 dislike
0 answers
asked Aug 30, 2019 in Computer Science by Tedsf Diamond (51,000 points) | 19 views
0 like 0 dislike
0 answers
0 like 0 dislike
0 answers
0 like 0 dislike
1 answer
asked Aug 29, 2019 in Computer Science by Tedsf Diamond (51,000 points) | 38 views
0 like 0 dislike
1 answer

Welcome to MathsGee Q&A Bank, Africa’s largest personalized STEM and Financial Literacy education network that helps people find answers to problems, connect with others and take action to improve their outcomes.


MathsGee Q&A is the STEM and Financial Literacy knowledge-sharing community where students and experts put their heads together to crack their toughest questions.


MathsGee is free of annoying ads. We want to keep it like this. You can help with your DONATION

Enter your email address:

11,765 questions
9,761 answers
100 comments
10,513 users