Search

ICMP Destination Unreachable messages

As the name indicates, ICMP Destination Unreachable messages are sent back to the sender if a packet could not be delivered to the receiver. There may be many reasons that the packet was unable to be delivered to the receiver. The receiver may be down, wrong IPv4 address, router does’t know the way to reach the destination network etc. ICMP Destination Unreachable messages are sent back to the sender unsolicited (not as a response to an ICMP query) from the receiver or any other device in between, like a router.

If a packet couldn’t delivered to its destination, the Destination Unreachable message is returned to the sender and the Destination Unreachable message contains a portion of the datagram that could’t delivered. Example: IPv4 header of the original packet that couldn’t delivered. This information may be used by the original sender as network communication error diagnostic information.

We have already learned from previous lesson (ICMP message types) that the ICMP Type number for Destination Unreachable messages is 3. The possible ICMP Code values related with ICMP Destination Unreachable messages (ICMP Type 3) are explained below. Please click next link, if you are not sure what are Type and Code fields in ICMP header

ICMP Code Meaning Description
0 Net Unreachable The destination network could not be found.
1 Host Unreachable The destination network is available, but the destination computer was not. The destination computer may be down.
2 Protocol Unreachable Specified protocol is invalid.
3 Port unreachable Specified port is invalid.
4 Fragmentation Needed, and DF flag was set The packet cannot be fragmented and fragmentation is required as DF flag was set.
5 Source route failed A router couldn’t forward the packet, because a source route is specified.
6 Destination network unknown No longer used
7 Destination host unknown Destination host unknown is sent from destination network router. Meaning that the host is unknown.
8 Source host isolated No longer used
9 Communication with destination network is administratively prohibited Sender is not allowd to communicate with destination network
10 Communication with destination host is administratively prohibited Sender is not allowd to communicate with destination host
11 Destination network unreachable for type of service Destination network cannot be reached becasue of the inability to provide service specified in the ToS field of the IPv4 datagram header.
12 Destination host unreachable for type of service Destination host cannot be reached becasue of the inability to provide service specified in the ToS field of the IPv4 datagram header.
13 Communication administratively prohibited Content based filtering is in effect
14 Host precedence violation The Precedence value in the ToS field of the IPv4 datagram is not permitted. Sent by the first-hop router.
15 Precedence cutoff in effect The precedence in the ToS field of the IPv4 datagram is lower than permitted for that network.

 

Screenshot of Wireshark packet capture of an ICMP Destination Unreachable message is coiped below. Please note that the ICMP Type is 3, which denotes this is an ICMP Destination Unreachable message. Also note that the ICMP Code is 3, which means that specified destination UDP port is not open on the destination computer. In other words, the destination computer is informing the sender using this ICMP message that the UDP port to which the sender was trying to communicate is not reachable.

As discussed early in this lesson, note that the IPv4, UDP and DNS headers of the original IPv4 datagram are also included in the ICMP Destination Unreachable message.

icmp-destination-port-unreachable-message-capture.gif

Screenshot of Wireshark packet capture of an ICMP Destination Unreachable message (Host unreachable) is coiped below

icmp-destination-host-unreachable-message.jpg

Related Tutorials
Introduction to TCP/IP, Features of TCP/IP, TCP/IP History, What is RFC (Request for Comments)
Seven Layers of OSI Model and functions of seven layers of OSI model
Five layered TCP/IP model
Network Layer (Layer 3)
TCP/IP Data Encapsulation and Decapsulation
Datalink Layer (Layer 2)
Ethernet Frame Format
What is MAC address or Layer 2 address or physical address
IPv4 Protocol, IPv4 header and fields of IPv4 header
IPv4 addresses, IPv4 Address Classes, IPv4 Address Classifications
What is Subnet Mask
What is network address
Limited broadcast address
Directed broadcast address
What is limited broadcast in IPv4 and how limited broadcast works
What is directed broadcast in IPv4 and how directed broadcast works
What is default gateway
What are private IP addresses - RFC 1918 private addresses
APIPA Addresses (Automatic Private IP Addresses)
What is loopback address in IPv4
What is localhost
Class A networks and Class A IP addresses
Class B networks and Class B IP addresses
Class C networks and Class C IP addresses
Class D multicast IP addresses
Subnetting - Part 1
Subnetting - Part 2
Subnetting - Part 3
Subnetting - Part 4
Subnetting - Part 5
Subnetting - Part 6
Variable Length Subnet Masking, VLSM, IP V4 Subnetting, subnetting tutorials, IP study guides, IP documentation, IP tutorials
Supernetting, IP Supernetting, IP Supernetting tutorial, How to Supernet, Supernetting Guide, Supernetting Concepts
How to find out the Network Address and Broadcast Address of a subnetted IPv4 address
Address Resolution Protocol Tutorial, How ARP work, ARP Message Format
Internet Control Message Protocol, ICMP, How ICMP Work, ICMP Header, ICMP Message Header
ICMP message types
ICMP Echo Request and Echo Reply messages
ICMP Source Quench messages
ICMP Redirect messages
ICMP Router Advertisement messages
ICMP Router Solicitation messages
ICMP Time Exceeded messages
ICMP Parameter Problem messages
ICMP Timestamp Request and Timestamp Reply messages
ICMP Photuris messages