Table of Contents

ICMP (Internet Control Message Protocol)

The Internet Control Message Protocol (ICMP) is a network protocol used to report errors and exchange diagnostic information between network devices.

Unlike TCP and UDP, ICMP is not used to transport application data. Instead, it helps devices determine whether communication is working correctly.


What Is ICMP Used For?

ICMP is commonly used for:

Many familiar networking tools depend on ICMP.


Common ICMP Messages

Some of the most frequently used ICMP message types include:

ICMP Message Purpose
Echo Request Sent by Ping
Echo Reply Returned by Ping
Destination Unreachable Destination cannot be reached
Time Exceeded TTL expired (used by Traceroute)
Redirect Suggests a better route
Parameter Problem Invalid IP header

Ping

The ping command uses ICMP.

When you execute:

ping 8.8.8.8

the computer sends an ICMP Echo Request.

If the destination is reachable, it returns an ICMP Echo Reply.

Example:

Computer
     │
Echo Request
     ▼
Server
     ▲
Echo Reply
     │
Computer

Ping measures:


Traceroute

Traceroute also relies on ICMP.

It discovers the path to a destination by sending packets with increasing Time To Live (TTL) values.

Example:

TTL = 1

↓

Router 1

↓

ICMP Time Exceeded

TTL = 2

↓

Router 2

↓

ICMP Time Exceeded

TTL = 3

↓

Router 3

↓

ICMP Time Exceeded

Eventually the packet reaches the destination.

This allows Traceroute to identify every router along the path.


Destination Unreachable

When a router or host cannot deliver a packet, it may return:

ICMP Destination Unreachable

Possible reasons include:


ICMP Is Not TCP or UDP

ICMP is carried directly inside IP packets.

Unlike TCP and UDP, ICMP:


Is ICMP Secure?

Many firewalls restrict or block ICMP traffic.

Reasons include:

As a result:

Ping fails

does not always mean:

The host is offline.

The host may simply ignore ICMP Echo Requests.


ICMP and Telenegar

Several Telenegar services use or interpret ICMP.

Ping Check

Uses ICMP Echo Request and Echo Reply to determine:


Traceroute

Uses ICMP Time Exceeded messages returned by routers to discover the network path.

Example:

1   Home Router

2   ISP Gateway

3   Regional Router

4   ...

Destination

Common Misconceptions



icmp ping traceroute networking protocols