Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Aptitude
  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • DBMS
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Algorithms
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture
Open In App
Next Article:
Types of ICMP (Internet Control Message Protocol) Messages
Next article icon

Types of ICMP (Internet Control Message Protocol) Messages

Last Updated : 27 Apr, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report

Pre-Requisite: Internet Control Message Protocol (ICMP) 

Internet Control Message Protocol is a protocol used for error handling and debugging in the network layer. It is mainly used in network devices such as routers for sending errors and operations. The main work of the Internet Control Message Protocol is of reporting errors, between any two devices which are connected through the Internet. Internet Control Message Protocol (ICMP) also has the work to assess network performance. In this article, we will see the types of IMCP Messages.

Types of ICMP Messages

TypeCode     Description
0 - Echo Reply0Echo reply
3 - Destination Unreachable0Destination network unreachable
1Destination host unreachable
2Destination protocol unreachable
3Destination port unreachable
4Fragmentation needed and DF flag set
5Source route failed
5 - Redirect Message0Redirect datagram for the Network
1Redirect datagram for the host
2Redirect datagram for the Type of Service and Network
3Redirect datagram for the Service and Host
8 - Echo Message0Echo Request
9 - Router Advertisement0Use to discover the addresses of operational routers
10 - Router Solicitation0
11 - Time Exceeded0Time to live exceeded in transit
1Fragment reassembly time exceeded
12 - Parameter Problem0Pointer indicates error
1Missing required option
2Bad length
13 - Timestamp0Used for time synchronization
14 - Timestamp Reply0Reply to Timestamp message

Echo-Request and Reply Message

Network managers use it to check the operations of the IP and the host's reachability. The host/router sends the echo request message, while the echo reply message is sent by the host/router that receives an echo request message. 
For example, host A wants to check whether it can communicate with another host B so it will send an echo request to B and if there is a link between A and B and B is active then it will send an echo reply to A on receiving the request.

Destination Unreachable Message

The host/router sends this message if it is not able to route the IP packet to its destination.
For example, if sender A wants to send the datagram to receiver B but it is not received by B then the intermediate router will discard the datagram and send the destination unreachable message to A.

Destination Unreachable Message
Destination Unreachable Message

Redirection Message

The host/router sends this message to update the routing table of the host.
For example, sender A wants to send the message to receiver B and there is a router between them. Then, A sends the data to the router and the router sends the message to B and redirection message to A so that A can update its routing table.

Redirection Message
Redirection Message

Router Solicitation and Advertisement Message

It is used to confirm the presence of a router on the local area network. It is done by broadcasting a router solicitation message and the router that receives the message broadcasts the routing information using a router advertisement message. 
For example, if host A wants to get the information of routers present on the network. It will broadcast a router solicitation message to request routers to advertise their presence and in response router on the network will announce its IP address available for routing through an advertisement message.

Time Exceeded Message

The host/router sends this message if it decrements the time-to-live value of the datagram to zero or if the destination address does not receive all the packets in the specified time interval.
For example, a packet is sent from a layer having 1000 units to a layer having 200 units, then the packet is divided into five fragments. If all the fragments don't reach the destination in a set time, all fragments are discarded and the time-exceeded message is sent to the source.

Time Exceeded Message
Time Exceeded Message

Parameter Problem Message

The host/router sends this message if some parameter is not set correctly in the datagram. It is used to indicate errors in the header field of the datagram.

Parameter Problem Message
Parameter Problem Message

Timestamp Request and Reply Message

It is used to determine the round trip time taken by each IP datagram to travel from one host to another host. It can also synchronize the clocks between hosts if transit time is known.
For example, if host A wants to synchronize its clock with B then it will ask time on B's clock by sending a timestamp request and B will reply with the timestamp to A. Then A will add the time and propagation delay to synchronize the time on its system.


Next Article
Types of ICMP (Internet Control Message Protocol) Messages

S

saxenaanjali239
Improve
Article Tags :
  • Computer Networks
  • GATE CS

Similar Reads

    Internet Control Message Protocol (ICMP)
    Internet Control Message Protocol is known as ICMP. The protocol is at the network layer. It is mostly utilized on network equipment like routers and is utilized for error handling at the network layer. Since there are various kinds of network layer faults, ICMP can be utilized to report and trouble
    11 min read
    Internet Message Access Protocol (IMAP)
    The Internet Message Access Protocol (IMAP) is an important part of how email works today. It lets people check and manage their emails from different devices, like phones, tablets, and computers, without losing any updates.Unlike the older Post Office Protocol (POP), which only downloads messages t
    6 min read
    What is IGMP(Internet Group Management Protocol)?
    IGMP is an acronym for Internet Group Management Protocol. IGMP is a communication protocol used by hosts and adjacent routers for multicasting communication with IP networks and uses the resources efficiently to transmit the message/data packets. Multicast communication can have single or multiple
    9 min read
    Types of Internet Protocols
    Internet protocols are a set of rules that allow computers and other devices to communicate over the Internet. These protocols ensure that data is sent, received, and understood correctly between different systems. There are many types of internet protocols, each serving a specific purpose, such as
    12 min read
    Network Control Protocol (NCP)
    ARPANET included several protocols on the internet and NCP was one of them. NCP was a unidirectional or simplex protocol between two computers or devices. It provided user access and flow control to use computers and devices at remote locations and to transmit files between them. The NCP also allows
    3 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences