Internet Control Message Protocol, designed for control and diagnostic messages. Used by common diagnostic tools like ping or traceroute.
Questions tagged [icmp]
583 questions
261
votes
33 answers
Pinging servers in Python
In Python, is there a way to ping a server through ICMP and return TRUE if the server responds, or FALSE if there is no response?

Kudu
- 6,570
- 8
- 27
- 27
180
votes
5 answers
ping response "Request timed out." vs "Destination Host unreachable"
When I ping an IP address, what is the difference between Request timed out and Destination host unreachable returned from the command?

Suresh Kumar Veluswamy
- 4,193
- 2
- 20
- 35
29
votes
9 answers
python non-privileged ICMP
While trying to figure out the best method to ping (ICMP) something from python, I came across these questions:
How can I perform a ping or traceroute in python, accessing the output as it is produced?
ping a site in python
How can I perform a ping…

Markus
- 3,447
- 3
- 24
- 26
19
votes
1 answer
Why traceroute sends UDP packets and not ICMP ones?
According to the Stevens (TCP/IP Illustrated) the traceroute program sends UDP packets to the destination host with an incremental TTL (1, 2, 3, etc) to get the intermediate hops info from the ICMP TTL EXPIRED messages.
The "destination reached"…

sergico
- 2,595
- 2
- 29
- 40
17
votes
2 answers
ICMP sockets (linux)
Is it possible to use ICMP sockets under the IP protocol? Maybe something like:
socket(PF_INET, , IPPROTO_ICMP)?
What should I put in the field? I saw some examples using SOCK_RAW, but won't that prevent the OS from doing his job…

Kei Nivky
- 367
- 2
- 5
- 12
16
votes
1 answer
Difference between struct ip and struct iphdr
I am trying to understand how the network is working, i'm doing some test, sending some package... anyway
My point is that i can't find the real difference between "protocol" structure and "protocol header" structure.
For the ip structure, they both…

albttx
- 3,444
- 4
- 23
- 42
16
votes
2 answers
Is ICMP a transport layer protocol?
I was going through a video lecture on networking and there the lecturer mentions ICMP as a transport layer protocol. However, Googling it shows various forums describing it as network layer protocol. This has confused me a lot. Can someone clarify?

chinmay
- 850
- 2
- 8
- 16
15
votes
4 answers
how to icmp ping on android
I need to do a icmp ping to a host from my android device. I need to measure the round trip time. I am proficient with android and java, just dont know what library to use.
How do I do it?
Is it possible via 3G, Edge?

Abhishek
- 1,749
- 9
- 27
- 39
15
votes
1 answer
Request timeout for icmp_seq
Using sudo ping -f (URL) on a Mac gives the message:
Request timeout for icmp_seq as a reply.
How can I fix this?

user3541125
- 451
- 2
- 5
- 11
14
votes
1 answer
Why does ping work without administrator privileges?
as you may know one is unable to create RAW sockets using Windows Sockets without having administrative priviliges. The problem is, that I need to send ICMP messages, thus I need RAW sockets. The Problem: My program needs to run without…

dom0
- 7,356
- 3
- 28
- 50
14
votes
3 answers
ICMP echo checksum
How can I compute the checksum of an ICMP echo request or reply when the checksum should include the data portion, the data portion can be variable sized, and there's no way to anticipate the data size?
Here's documentation on how to compute the…

Rose Perrone
- 61,572
- 58
- 208
- 243
14
votes
2 answers
icmp request received, but doesn't reply
I set up 3 CentOS servers, configured server2 as router between 192.168.1.0/24 and 30.0.0.0/24, but ping can't get through.
I tried ping 192.168.1.62 from server1, according to tcpdump on server3, ICMP request is received, but it doesn't generate…

Robby
- 159
- 1
- 1
- 5
12
votes
2 answers
How to send a message with ping?
The Ping command uses an ICMP request as far as I know
So is it possible to send a short text with the ping command right from commandline?

derich
- 181
- 1
- 1
- 11
12
votes
4 answers
What data is included in ICMP (ping) request?
I know the ICMP request contains the IP address. Is the client MAC address included in an ICMP request? What other info (if any) is included in a ping request?

exvance
- 1,339
- 4
- 13
- 31
12
votes
2 answers
icmp port unreachable error message
I am sending UDP packets from one PC to another. I am watching the the whole activity using Wire Shark. I notice that for some time there is smooth transmission of packets from one system to the other. Then suddenly ICMP packets with error 'port…

aaaa
- 205
- 1
- 4
- 10