Internet Control Message Protocol (both ICMPv4 and ICMPv6) is a protocol which acts as a communication messenger protocol between the communicating devices in IP network. ICMP messages provide feedback, error reporting and network diagnostic functions in IP networks which are necessary for the smooth operation of IPv6.
• Error Reporting
• Network Diagnostics
• Neighbor Discovery
• Multicast Membership Reporting
• Router Solicitation and Router Advertisements
ICMPv6 removed the ICMPv4 functions that are obsolete and took over the functions of two major IPv4 protocols IGMP (Internet Group Membership Protocol) and ARP (Address Resolution Protocol). IGMP and ARP are no more with IPv6.
ICMPv6 messages are encapsulated with IPv6 datagram packets as shown below.
ICMPv6 Message Packet Format
ICMPv6 messages can be classified into ICMPv6 error messages and ICMPv6 information messages.
ICMPv6 Error Messages
ICMPv6 error messages are used to report errors in the forwarding or delivery of IPv6 packets. The ICMPv6 "Type field" values for the error message are between 0 and 127. ICMPv6 error messages are Destination Unreachable, Packet Too Big, Time Exceeded, and Parameter Problem.
"Destination Unreachable" ICMPv6 error message: Destination Unreachable ICMPv6 error message is generated by the source host or a router when an IPv6 datagram packet cannot be delivered for any reason other than congestion.
"Packet Too Big" ICMPv6 error message: "Packet Too Big" ICMPv6 error messages are generated by the router when a packet cannot be forwarded to the next hop link because the size of the IPv6 datagram is larger than the MTU (Maximum Transmission Unit) of the link. "Packet Too Big" ICMPv6 error message includes the MTU (Maximum Transmission Unit) of the next link also. MTU (Maximum Transmission Unit) is the size of the largest protocol data unit that is supported over the link.
"Time Exceeded" ICMPv6 error message: Similar to the Time-to-Live field value in IPv4 datagram header, IPv6 header includes a Hop Limit field. The Hop Limit field value in IPv6 header is used to prevent routing loops. Hop Limit field in IPv6 datagram header is decremented by each router that forwards the packet. When the Hop Limit field value in IPv6 header reaches zero, the router discards the IPv6 datagram packet and returns a "Time Exceeded" ICMPv6 error message to the source host.
"Parameter Problem" ICMPv6 error message: "Parameter Problem" ICMPv6 error message is typically related with the problems and mistakes related with IPv6 header itself. When a problem or mistake with an IPv6 header make a router cannot process the packet, the router stops processing the IPv6 datagram packet, discards the packet and returns a "Parameter Problem" ICMPv6 error message to the source host.
ICMPv6 informational messages
ICMPv6 informational messages are used for network diagnostic functions and additional critical network functions like Neighbor Discovery, Router Solicitation & Router Advertisements, Multicast Memberships. Echo Request and Echo Reply (used by many commands and utilities like "ping" for network diagnostics and communication trouble shooting) are also ICMPv6 informational messages. The ICMPv6 informational messages have values for the Type field (8 bit binary number) between 128 and 255.
Diagnostic Messages: ICMPv6 Echo request and Echo reply are the Diagnostic messages. Every IPv6 host must return an ICMPv6 Echo reply when it receives an ICMPv6 Echo request. Echo request and Echo reply messages are used by the ping command to check the network connectivity between two IPv6 hosts.
MLD (Multicast Listener Discovery) Messages: ICMPv6 MLD (Multicast Listener Discovery) Messages are used by an IPv6 enabled router to discover hosts who are interested in multicast packets, and the multicast addresses they are interested. MLD (Multicast Listener Discovery) messages are used by MLD (Multicast Listener Discovery) Protocol. MLD (Multicast Listener Discovery) Protocol is the IPv6 equivalent of IGMP (Internet Group Management) Protocol in IPv4.
ND (Neighbor Discovery) Messages: ICMPv6 ND (Neighbor Discovery) Messages are used for the Neighbor Discovery Protocol (NDP). ND (Neighbor Discovery) Messages includes Router Solicitation & Router Advertisement, Neighbor Solicitation and Neighbor Advertisement.
ICMPv6 Message Packet Type and Code field values
|Type Field in ICMPv6 Message||Code Field in ICMPv6 Message||Description|
|Destination Unreachable (Value 1)||0||No Route to destination network|
|2||Beyond scope of source address|
|3||IPv6 address unreachable|
|5||Source address failed|
|6||Reject route to destination|
|7||Error in Source Routing Header|
|Packet Too Big (Value 2)||0||Packet too big for next hop link|
|Time Exceeded (Value 3)||0||Hop Limit exceeded|
|1||Fragment reassembly time exceeded|
|Parameter Problem (Value 4)||0||Header field error|
|1||Unrecognized Next Header type|
|2||Unrecognized IPv6 option|
|100||Private experimentation. Not for general use.|
|101||Private experimentation. Not for general use.|
|127||Reserved for future expansion|
|Echo Request (128)||0|
|Echo Reply (129)||0|
|NDP Router Solicitation (Value 133)||0||Neighbor Discovery Protocol (NDP) Router Solicitation|
|NDP Router Advertisement (Value 134)||Neighbor Discovery Protocol (NDP) Router Advertisement|
|NDP Neighbor Solicitation (Value 135)||Neighbor Discovery Protocol (NDP) Neighbor Solicitation|
|NDP Neighbor Advertisement (Value 136)||Neighbor Discovery Protocol (NDP) Neighbor Advertisement|
|NDP Redirect Message (Value 137)||Neighbor Discovery Protocol (NDP) Redirect Message|
|ICMP Node Information Query (Value 139)||0||IPv6 address|
|ICMP Node Information response (Value 140)||0||A successful reply to the Query|
|1||Responder refuses to answer the query. The result data field will be empty.|
|2||Query is unknown to the responder|
|Multicast Router Advertisement (Value 151)||Multicast Router Advertisement|
|Multicast Router Solicitation (Value 152)||Multicast Router Solicitation|
|Multicast Router Termination (Value 153)||Multicast Router Termination|
|200||Private experimentation. Not for general use.|
|201||Private experimentation. Not for general use.|
|255||Reserved for future expansion|