Destination Unreachable ICMP Message
The ICMP unreachable message is sent when a message cannot be delivered completely to the application at the destination host. However, packet delivery could fail for many reasons, so there are five separate unreachable functions (codes) using this single ICMP unreachable message. All five code types pertain directly to some IP, TCP, or UDP feature and are better described by using Figure 6-19 as an example network.
Assume that Fred is trying to connect to the web server, called Web. (Web uses TCP as the transport layer protocol.) Three of the ICMP unreachable codes would possibly be used by Routers A and B. The other two codes would be used by the web server. These ICMP codes would be sent to Fred as a result of the packet originally sent by Fred.
Table 6-5 summarizes the more common ICMP unreachable codes.
Table 6-5 ICMP Unreachable Codes
|
Unreachable Code |
When Used |
Typically Sent By |
|
Network unreachable |
There is no match in a routing table for the destination of the packet. |
Router |
|
The packet can be routed to a router connected to the destination subnet, but the host is not responding. |
Router |
|
|
Can't fragment |
The packet has the Don't Fragment bit set, and a router must fragment to forward the packet. |
Router |
|
Protocol unreachable |
The packet is delivered to the destination host, but the transport layer protocol is not available on that host. |
Endpoint host |
|
Port unreachable |
The packet is delivered to the destination host, but the destination port has not been opened by an application. |
Endpoint host |
The list that follows explains each code in Table 6-5 in greater detail:
- Network unreachable—A code meaning "network unreachable" will be used by Router A if Router A does not have a route telling it where to forward the packet. In this case, Router A needs a route to subnet 10.1.2.0. The ICMP unreachable message, with the code "network unreachable," is sent by Router A to Fred, in response to Fred's packet destined for 10.1.2.14.
- Host unreachable—This code implies that the single destination host is unavailable. If Router A has a route to 10.1.2.0, the packet will be delivered to Router B. However, if the web server is down, Router B will not get an ARP reply from web. The ICMP unreachable message, with code "host unreachable," will be sent by Router B to Fred, in response to Fred's packet destined for 10.1.2.14.
- Can't fragment—This code is the last of the three ICMP unreachable codes that might be sent by a router. Fragmentation defines a process in which a router needs to forward a packet, but the outgoing interface allows only packets that are smaller than the forwarded packet. The router can break the packet into pieces. However, if Router A or Router B needs to fragment the packet but the Do Not Fragment bit is set in the IP header, the router will discard the packet. The ICMP unreachable message, with code "can't fragment," will be sent by Router A or B to Fred, in response to Fred's packet destined for 10.1.2.14.
- Protocol unreachable—If the packet successfully arrives at the web server, two other unreachable codes are possible. One implies that the protocol above IP, typically TCP or UDP, is not running on that host. This is highly unlikely because most operating systems that use TCP/IP use a single software package that provides IP, TCP and UDP functions. But if the host receives the IP packet and TCP or UDP is not available, the ICMP unreachable message, with code "protocol unreachable," will be sent by the web server host to Fred, in response to Fred's packet destined for 10.1.2.14.
- Port unreachable—The final code field value is more likely today. If the server is up but the web server software is not running, the packet can get to the server but cannot be delivered to the web server software. The ICMP unreachable message, with code "port unreachable," will be sent by the web server host to Fred, in response to Fred's packet destined for 10.1.2.14.
Continue reading here: Redirect ICMP Message
Was this article helpful?
Readers' Questions
-
doreen7 months ago
- Reply
-
Jordan7 months ago
- Reply
-
kathrin trommler7 months ago
- Reply
-
Taylor8 months ago
- Reply