What exactly is the difference between ICMP type 3 code 1 and code 7 messages? By reading their descriptions they seem to be used for the same purpose. I am trying to understand when a router will choose to send one or the other.

1 Answer 1


The differences are explained in RFC 1812 IPv4 Router Requirements, page 81:

1 = Host Unreachable - generated by a router if a forwarding path (route) to the destination host on a directly connected network is not available (does not respond to ARP);

7 = Destination Host Unknown - generated only when a router can determine (from link layer advice) that the destination host does not exist;

Later in the RFC, it requires routers not to send a "Network Unreachable" instead of Type 3 Codes 1 or 7 when other hosts on the subnet are reachable...

Routers MUST use Host Unreachable or Destination Host Unknown codes whenever other hosts on the same destination network might be reachable; otherwise, the source host may erroneously conclude that all hosts on the network are unreachable, and that may not be the case.

Speaking practically, I haven't seen a router implement Type 3 Code 7 (Destination Host Unknown), normally I see Type 3 Code 1 (Host Unreachable).

  • Agreed, I think I may have seen a Destination Host Unknown once. IIRC, the host in question was directly connected to a router Ethernet port and powered off at the time.
    – YLearn
    Commented Jun 3, 2014 at 1:38
  • 1
    I would be quite interested in seeing the conditions which would trigger Tpe 3 Code 7; I spent about 30 minutes trying to kick my lab switches into sending one but never found a way to trigger it. Commented Jun 3, 2014 at 1:41
  • I was thinking about doing this as well, but it has been many years since this happened and don't remember the hardware details. I suspect that sending Type 3 Code 1 in cases that are this similar is easier to program than adding code for Type 3 Code 7, so hardly anything will actually do so.
    – YLearn
    Commented Jun 3, 2014 at 1:47
  • @Mike , I was also trying to generate a code 7 on my lab but was unable to actually get one. That was the trigger to post the question. As YLearn mentions, it might have something to do with the code. Thanks for the information!
    – user5469
    Commented Jun 3, 2014 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.