Internet Control Message Protocol (ICMP) (original) (raw)

Last Updated : 10 Oct, 2025

Internet Control Message Protocol (ICMP) is a network layer protocol widely used by network devices such as routers, gateways and hosts to send error messages and operational information. Since the Internet Protocol (IP) itself does not have an inbuilt error-reporting or correction mechanism, ICMP is a supporting protocol within the IP suite that helps in reporting errors and sending diagnostic messages. It is primarily used for:

**Note: Without ICMP, devices would not be able to inform the sender about delivery failures, congestion or misrouting, making network troubleshooting almost impossible.

Uses of ICMP

Error Reporting

Network Diagnostics

How ICMP Works

ICMP Packet Format

ICMP header comes after IPv4 and IPv6 packet header. In the ICMP packet format, the first 32 bits of the packet contain three fields:

frame_3120

ICMPv4 Packet Format

Type 0 - Echo reply
Type 3 - Destination unreachable
Type 5 - Redirect Message
Type 8 - Echo Request
Type 11 - Time Exceeded
Type 12 - Parameter problem

ICMP in DDoS Attacks

In Distributed DOS (DDoS) attacks, attackers provide so much extra traffic to the target, so that it cannot provide service to users. There are so many ways through which an attacker executes these attacks, which are described below.

1. Ping of Death Attack

2. ICMP Flood Attack

3. Smurf Attack

Types of ICMP Messages

Type Code Description
0 - Echo Reply 0 Echo reply
3 - Destination Unreachable 0 Destination network unreachable
1 Destination host unreachable
2 Destination protocol unreachable
3 Destination port unreachable
4 Fragmentation is needed and the DF flag set
5 Source route failed
5 - Redirect Message 0 Redirect the datagram for the network
1 Redirect datagram for the host
2 Redirect the datagram for the Type of Service and Network
3 Redirect datagram for the Service and Host
8 - Echo Request 0 Echo request
9 - Router Advertisement 0 Use to discover the addresses of operational routers
10 - Router Solicitation 0
11 - Time Exceeded 0 Time to live exceeded in transit
1 Fragment reassembly time exceeded.
12 - Parameter Problem 0 The pointer indicates an error.
1 Missing required option
2 Bad length
13 - Timestamp 0 Used for time synchronization
14 - Timestamp Reply 0 Reply to Timestamp message

1. Source Quench Message

frame_3115

Source Quench Message

frame_3116

Source Quench Message with Reduced Speed

**Note: When the congestion router is far away from the source the ICMP will send a hop-by-hop source quench message so that every router will reduce the speed of transmission.

2. Parameter Problem

frame_3117

Parameter Problem

3. Time Exceeded Message

frame_3126

Time Exceeded Message

4. Destination Un-reachable

frame_3118

Destination Unreachable Message

5. Redirection Message

frame_3127

Redirection Message

Types of ICMP (Internet Control Message Protocol) Messages.