и еще для FreeBSD
пинг — класический ICMP
трэйс — UDP + ICMP (unix style)
S — Sender Device
I — Intermediate Device (Router)
D — Destination IP
PING
S->D Send ICMP-8 packets to network hosts
S<-D Receive from destination ICMP-0
TRACEROUTE
S: -> Sends UDP datagram to dest port>=33434, src port random, TTL=1 (next packet — UDP destination port is incremented)
I: <-> Receive from any router ICMP-11 with TTL=1
D: < — Destination reached — Receive ICMP-3, code 3 («destination unreachable,» «port unreachable») (ICMP «udp port 33435 unreachable»)
OR A «host unreachable,» «net unreachable,» «maximum TTL exceeded,» or a «timeout» type of message, which means that the probe is resent.