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.
Screenshot of Wireshark packet capture of an ICMP Destination Unreachable message (Host unreachable) is coiped below