1.1.d Explain IP operations

1.1.d [i] ICMP unreachable, redirect

from: https://www.iana.org/assignments/icmp-parameters/icmp-parameters.xhtml

I’m referencing the below table for completeness however, network, host and port will be the most common

Type 3 — Destination Unreachable

Available Formats

Codes Description Reference
0 Net Unreachable [RFC792]
1 Host Unreachable [RFC792]
2 Protocol Unreachable [RFC792]
3 Port Unreachable [RFC792]
4 Fragmentation Needed and Don’t Fragment was Set [RFC792]
5 Source Route Failed [RFC792]
6 Destination Network Unknown [RFC1122]
7 Destination Host Unknown [RFC1122]
8 Source Host Isolated [RFC1122]
9 Communication with Destination Network is Administratively Prohibited [RFC1122]
10 Communication with Destination Host is Administratively Prohibited [RFC1122]
11 Destination Network Unreachable for Type of Service [RFC1122]
12 Destination Host Unreachable for Type of Service [RFC1122]
13 Communication Administratively Prohibited [RFC1812]
14 Host Precedence Violation [RFC1812]
15 Precedence cutoff in effect [RFC1812]

network unreachable is simply a router reporting back it has no way to reach the network. the link to the network may be broken, or the typed address may be incorrect

host unreachable: the originator passes a frame from router, to router, etc, until reaching the destination gateway that believes it has a path to the host. it arps for the data link layer address, and if it does not receive one, a host unreachable is passed back. the important thing here is that a host unreachable implies that the intervening path along the way is good; the host is unknown

port unreachable will come from a host, not a router. it is significant that the router successfully arp’ed the host, but the port process of the host was unknown.

Type 5 — Redirect

from: http://www.networksorcery.com/enp/protocol/icmp/msg5.htm

The ICMP Redirect message is used to notify a remote host to send data packets on an alternative route. A host SHOULD NOT send an ICMP Redirect message. Redirects SHOULD only be sent by gateways.