Featured image

Table of Contents Link to heading

Internet Control Message Protocol (ICMP) Link to heading

Info
Ping (Packet Internet Groper) uses ICMP to send an ICMP echo request to another IP address. The computer with that IP address should reply with an ICMP echo reply. If that works, you successfully have tested the IP network.

ICMP Message Encapsulation Link to heading

Info
ICMP packets are delivered using the IP protocol and encapsulated into datagrams in the same way that any other data is delivered using IP.

The encapsulation of an ICMP packet within the IP packet datagram data area is as follows:

Frame headerIP datagram headerICMP headerICMP data
Frame headerIP datagram headerIP datagram data area
Frame headerFrame data area

Frame header can be from a LAN protocol (e.g. Ethernet) or a WAN protocol (e.g. HDLC).

Error Reporting and Error Correction Link to heading

Info
When datagram delivery errors occur, ICMP reports these errors only to the sender of the datagram. It does not correct any network problem preventing datagram delivery.

Reliability of ICMP Link to heading

Info
Since ICMP packets are transmitted using the IP protocol, in the same way as any other data, they are subject to the same delivery failures.

This creates a scenario in which error reports could generate even more error reports, causing increased congestion on an already ailing network.

For this reason, errors created by ICMP messages do not generate their own ICMP messages; therefore, it is possible for a datagram delivery error to occur but never be reported back to the sender of the data.

Unreachable Networks Link to heading

Info
An error that occurs when the destination network is not accessible.

Network communication depends on certain basic conditions:

  1. The TCP/IP protocol stack must be properly configured in the sending and receiving devices. This includes the installation of TCP/IP and proper configuration of the IP address and the subnet mask. A default gateway also must be configured if datagrams are to travel outside the local network.
  2. Intermediary devices must be in place to route the datagram from the source device and its network to the destination network. Routers serve this function.
  3. A router must have the TCP/IP protocol properly configured on its interfaces, and it must use an appropriate routing protocol or static routes.

If these conditions are not met, network communication cannot take place. For example, the sending device might address the datagram to a nonexistent IP address or to a destination device that is disconnected from its network. Routers also can be points of failure if a connecting interface is down or if the router does not have the information necessary to find the destination network

Destination unreachable messages can include the following:

Network Unreachable Link to heading

Info
Implies routing or addressing failures.

Host Unreachable Link to heading

Info
Implies delivery failures, such as a wrong subnet mask.

Protocol Unreachable Link to heading

Info
Implies that the destination does not support the upper-layer protocol specified in the packet.

Port Unreachable Link to heading

Info
Implies that the TCP port (socket) is not available.

Testing Destination Reachability Link to heading

Info
ICMP can be used to test the availability of a particular destination by issuing an echo request message to the destination device. When the destination device receives the ICMP echo request, it formulates an echo reply message to send back to the source of the echo request. If the sender receives the echo reply, this confirms that the destination device can be reached using the IP protocol.

ping Command Link to heading

Info
Used to initiate an echo request message to verify the hardware connection and the IP address of the network layer.

This command is a very basic testing mechanism.

Cisco ping Return Codes Link to heading

CodeMeaningPossible Cause(s)
!Each exclamation point indicates receipt of an ICMP echo reply.The ping completed successfully.
.Each period indicates that the network server timed out while waiting for a reply.This message can indicate many problems:
- ping was blocked by an access list or firewall.
- A router along the path did not have a route to the destination and did not send an ICMP destination unreachable message.
- A physical connectivity problem occurred somewhere along the path.
UAn ICMP unreachable message was received.A router along the path did not have a route to the destination address.
CAn ICMP source quench message was received.A device along the path (possibly the destination) might be receiving too much traffic; check input queues.
&An ICMP time exceeded message was received.A routing loop might have occurred.

ICMP Message Format Link to heading

Each ICMP message type has its own unique characteristics. However, all ICMP message formats start with the following three fields:

Type Link to heading

Info
Indicates the type of ICMP message being sent.
ICMPMessage Types
0Echo reply
3Destination unreachable
4Source quench
5Redirect/change request
8Echo request
9Router advertisement
10Router selection
11Time exceeded
12Parameter problem
13Timestamp request
14Timestamp reply
15Information request
16Information reply
17Address mask request
18Address mask reply

Code Link to heading

Info
Includes further information that is specific to the message type.
Code ValueDescription
0Network unreachable
1Host unreachable
2Protocol unreachable
3Port unreachable
4Fragmentation needed and DF set
5Source route failed
6Destination network unknown
7Destination host unknown
8Source host isolated
9Communication with data network administratively prohibited
10Communication with data host administratively prohibited
11Network unreachable for type of service
12Host unreachable for type of service

Checksum Link to heading

Info
Verifies the integrity of the data.

Miscellaneous Error Reporting Link to heading

Devices that process datagrams might not be capable of forwarding a datagram because of some type of error in the header. This error does not relate to the state of the destination host or network, but it still prevents the datagram from being processed and delivered. In this case, an ICMP Type 12 parameter problem message is sent to the source of the datagram.