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 header IP datagram header ICMP header ICMP data
Frame header IP datagram header IP datagram data area
Frame header Frame 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

Code Meaning Possible 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.
U An ICMP unreachable message was received. A router along the path did not have a route to the destination address.
C An 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.
ICMP Message Types
0 Echo reply
3 Destination unreachable
4 Source quench
5 Redirect/change request
8 Echo request
9 Router advertisement
10 Router selection
11 Time exceeded
12 Parameter problem
13 Timestamp request
14 Timestamp reply
15 Information request
16 Information reply
17 Address mask request
18 Address mask reply

Code Link to heading

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