IP uses ICMP to report errors or to make request information but
ICMP messages are sent through IP, i.e., encapsulated in IP datagrams.
ICMP is created in response to a specific IP datagram or an ICMP request.
If an IP datagram carrying the ICMP error message causes an error,
no ICMP message is created. (NO error about error)
Source quench message
Type = 4, code = 0;Time Exceeded Message
Type = 11Destination Unreachable MessageCode
0 = time to live exceeded in transit; (from gateway)
1 = fragment reassembly time exceeded. (rom host only)
Type = 3Parameter error messageCode
0 = net unreachable;
1 = host unreachable;
2 = protocol unreachable; (from host only)
3 = port unreachable; (from host only)
4 = fragmentation needed and DF set;
5 = source route failed.
Type = 12Code
0 = pointer indicate the octet in error
ICMP redirect message
Type=5ICMP echo and reply messageCode
0 = Redirect datagrams for the Network.
1 = Redirect datagrams for the Host.
2 = Redirect datagrams for the Type of Service and Network.
3 = Redirect datagrams for the Type of Service and Host.
Type = 8 for echo message;
Type = 0 for echo reply message.
code = 0 (from gateway or host)
For error report, ICMP includes the header of the datagram and and
the first 64 bits of the data portion (of the target datagram). These 64
bits have the information needed by the source to associate errors with
a particular protocol.
A router may not report all of the errors using ICMP. ex:
the destination is connected to an Ethernet but is powered off. The router to this LAN can not identify this pronblem because Ethernet provides no acknowledgment.
ICMP provides the mechanism to report network problems. But it does
not specify how to react to the problems.
For inf req/res ICMP messages, the identification and sequence number are used to identify a particular ICMP message.
Routing change may be useful only between the sending host and the attached
router. Routing between intermediate routers must be handled by other routing
protocols.