Score:0

how to differentiate between ping traceroute packet

cn flag

I am using python scapy to log ICMPV6 messages coming to the server. Based on type of ICMPV6 packet I need to take different actions. How do I differentiate between a ping request and a traceroute request. Based on the packet logs it seems the only difference is in size of payload data and hop limits.

John Mahowald avatar
cn flag
Does this answer your question? [Does traceroute use UDP or ICMP or both?](https://serverfault.com/questions/374620/does-traceroute-use-udp-or-icmp-or-both)
cn flag
No. For both type of packets that I receive, I get the same type = Echo Request
Score:0
cn flag

No, ICMP type is not enough for destination host to distinguish if the source host is using ping or traceroute.

As you discovered, traceroute experiments with hop limit to solicit Time Exceeded responses from routers on the path. Other than that, traceroute and ping probably send very similar echo requests. Trivial data payload in both cases, just getting responses and timing them.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.