Search code examples
boostidentifierzeroicmpttl

The identifier in icmp reply packet is zero when I set a small ttl in icmp request packet in boost asio icmp example


When I use the boost asio icmp example http://www.boost.org/doc/libs/1_40_0/doc/html/boost_asio/example/icmp/ping.cpp to ping some ip address, I set a small ttl.I set ttl to 1 in boost icmp example When I get the reply icmp packets, I find out the identifier in the header do not match PID(I set identifier to PID in icmp request packet)and the identifier is zero(the type in icmp header is 11). But when I set a ttl such as 128, the identifier in reply icmp header match PID. Does anyone know why ? I will appreciate your help.


Solution

  • I have found the answer in http://www.zytrax.com/tech/protocols/tcp.html. When type in icmp header is set to 11, that means time_exceeded.ICMP TIME EXCEEDED. The ocet 4-7 must be zero.