ICMP

Complete

Concept

Internet Control Message Protocol(ICMP)

  • used by hosts and routers to communicate network level information
  • carried in IP datagrams
  • ping uses ICMP
TypeCodeDescription
80echo request
00echo reply
31dest host unreachable
33dest port unreachable
110TTL expired
120bad IP header

Route tracing

  • send small ICMP packets with incrementing TTL
  • each hop may respond with TTL expired
  • uses echo request and echo reply
0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Type      |     Code      |          Checksum             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           Identifier          |        Sequence Number        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     Data ...
+-+-+-+-+-

with NAT the identifier is used to store the port number