|
||||||||||||||||||||||||||||||||||||||||||||||||
|
8-byte type field is given in the first
column, second column contains description of type, the last
column shows message distinction: Query/Error. The main message
types that Traceroute receives are time exceeded and destination
unreachable. |
||||||||||||||||||||||||||||||||||||||||||||||||
|
Protocol ICMP is the part of the IP layer
and ICMP
messages are transmitted within IP datagrams. IP datagram consists of the IP
header (20 bytes) and ICMP message. The first byte of the ICMP
message contains the type field. For example, Ping uses the messages echo
reply (type 0) and echo request (type 8). The Traceroute sends UDP datagrams.
Destination UDP port should be chose as an unlikely value, so that it is
impossible that any destination application uses this port. UDP destination
side sends an ICMP message port unreachable (type 3, code 3). If TTL is 0 in
the received datagram the router sends back the ICMP message time exceeded
(type 11, code 0). ICMP messages are exchanged between hosts without port
numbers.
The second byte of the ICMP message contains the code
field. If a router cannot forward a packet because it has no
routes at all to the destination specified in the packet, the router
generates network unreachable (type 3,code 0). If the router have routes to
the destination network specified in the packet, but the TOS specified ( TOS
= type of service, second byte in the IP header) for the routes is neither
the default TOS (0000) nor the TOS of the packet that the router is
attempting to route, then the router generates network unreachable for TOS
(type 3, code 11).
8-byte code field is given in the first column, second
column contains description of code. The main message codes that
Traceroute uses are port unreachable (type 3, code 3) and TTL equals 0 during
transit (type 11, code 0). In the next table only codes for the
ICMP message type destination unreachable (type 3) are shown.
If the router decides that there is no path to the
destination host then the router generates the ICMP message host
unreachable (type 3, code 1). If router cannot forward the
packet because no route to the destination and the packet has a TOS that is
either equal to the TOS requested in the packet or is the default TOS (0000)
then the router generates the message host unreachable for TOS (type 3, code
12).
One of the two ICMP messages that Traceroute receives is the
message port unreachable. (type 3, code 3).The second one is time exceeded (type 11)
and it's received if TTL (time to live) is 0. When Traceroute sends UDP
datagrams, there are two cases. Case 1: Destination is reached. But
destination port is chose as unlikely value, so that destination UDP module
generates an ICMP message port unreachable. Case 2: Destination host hasn't
reached and TTL is 0. then UDP module of the current host sends back the ICMP
message time exceeded and the host IP address. |