What is the filter expression to only sniff ICMP packets given the source IP address is and the destination IP address is The filter order must start with the protocol name first, source IP then destination IP.

I tried to use the following expression:

tcpdump icmp src net dest net

But it did not work. Could I please have some help?

Thank you!


The following seems to work for me. I tried it using loopback/localhost addresses.

tcpdump icmp and src and dst

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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