<s>
The	O
Internet	B-Protocol
Control	I-Protocol
Message	I-Protocol
Protocol	I-Protocol
(	O
ICMP	O
)	O
is	O
a	O
supporting	O
protocol	O
in	O
the	O
Internet	B-Protocol
protocol	I-Protocol
suite	I-Protocol
.	O
</s>
<s>
It	O
is	O
used	O
by	O
network	B-Device
devices	I-Device
,	O
including	O
routers	B-Protocol
,	O
to	O
send	O
error	O
messages	O
and	O
operational	O
information	O
indicating	O
success	O
or	O
failure	O
when	O
communicating	O
with	O
another	O
IP	B-Protocol
address	I-Protocol
,	O
for	O
example	O
,	O
an	O
error	O
is	O
indicated	O
when	O
a	O
requested	O
service	O
is	O
not	O
available	O
or	O
that	O
a	O
host	B-Application
or	O
router	B-Protocol
could	O
not	O
be	O
reached	O
.	O
</s>
<s>
ICMP	O
differs	O
from	O
transport	B-Architecture
protocols	I-Architecture
such	O
as	O
TCP	B-Protocol
and	O
UDP	B-Protocol
in	O
that	O
it	O
is	O
not	O
typically	O
used	O
to	O
exchange	O
data	O
between	O
systems	O
,	O
nor	O
is	O
it	O
regularly	O
employed	O
by	O
end-user	O
network	O
applications	O
(	O
with	O
the	O
exception	O
of	O
some	O
diagnostic	O
tools	O
like	O
ping	B-Protocol
and	O
traceroute	B-Protocol
)	O
.	O
</s>
<s>
ICMP	O
for	O
IPv4	B-Protocol
is	O
defined	O
in	O
.	O
</s>
<s>
A	O
separate	O
ICMPv6	B-Protocol
,	O
defined	O
by	O
RFC	O
4443	O
,	O
is	O
used	O
with	O
IPv6	B-Protocol
.	O
</s>
<s>
ICMP	O
is	O
part	O
of	O
the	O
Internet	B-Protocol
protocol	I-Protocol
suite	I-Protocol
as	O
defined	O
in	O
RFC	O
792	O
.	O
</s>
<s>
ICMP	O
messages	O
are	O
typically	O
used	O
for	O
diagnostic	O
or	O
control	O
purposes	O
or	O
generated	O
in	O
response	O
to	O
errors	O
in	O
IP	B-Protocol
operations	O
(	O
as	O
specified	O
in	O
RFC	O
1122	O
)	O
.	O
</s>
<s>
ICMP	O
errors	O
are	O
directed	O
to	O
the	O
source	O
IP	B-Protocol
address	I-Protocol
of	O
the	O
originating	O
packet	O
.	O
</s>
<s>
For	O
example	O
,	O
every	O
device	O
(	O
such	O
as	O
an	O
intermediate	O
router	B-Protocol
)	O
forwarding	O
an	O
IP	B-Protocol
datagram	B-Protocol
first	O
decrements	O
the	O
time	B-Protocol
to	I-Protocol
live	I-Protocol
(	O
TTL	O
)	O
field	O
in	O
the	O
IP	B-Protocol
header	O
by	O
one	O
.	O
</s>
<s>
If	O
the	O
resulting	O
TTL	O
is	O
0	O
,	O
the	O
packet	O
is	O
discarded	O
and	O
an	O
ICMP	O
time	O
exceeded	O
in	O
transit	O
message	O
is	O
sent	O
to	O
the	O
datagram	B-Protocol
's	O
source	O
address	O
.	O
</s>
<s>
The	O
traceroute	B-Protocol
command	O
can	O
be	O
implemented	O
by	O
transmitting	O
IP	B-Protocol
datagrams	B-Protocol
with	O
specially	O
set	O
IP	B-Protocol
TTL	O
header	O
fields	O
,	O
and	O
looking	O
for	O
ICMP	O
time	O
exceeded	O
in	O
transit	O
and	O
Destination	O
unreachable	O
messages	O
generated	O
in	O
response	O
.	O
</s>
<s>
The	O
related	O
ping	B-Protocol
utility	I-Protocol
is	O
implemented	O
using	O
the	O
ICMP	B-Protocol
echo	I-Protocol
request	I-Protocol
and	O
echo	B-Protocol
reply	I-Protocol
messages	O
.	O
</s>
<s>
ICMP	O
uses	O
the	O
basic	O
support	O
of	O
IP	B-Protocol
as	O
if	O
it	O
were	O
a	O
higher-level	O
protocol	O
,	O
however	O
,	O
ICMP	O
is	O
actually	O
an	O
integral	O
part	O
of	O
IP	B-Protocol
.	O
</s>
<s>
Although	O
ICMP	O
messages	O
are	O
contained	O
within	O
standard	O
IP	B-Protocol
packets	O
,	O
ICMP	O
messages	O
are	O
usually	O
processed	O
as	O
a	O
special	O
case	O
,	O
distinguished	O
from	O
normal	O
IP	B-Protocol
processing	O
.	O
</s>
<s>
In	O
many	O
cases	O
,	O
it	O
is	O
necessary	O
to	O
inspect	O
the	O
contents	O
of	O
the	O
ICMP	O
message	O
and	O
deliver	O
the	O
appropriate	O
error	O
message	O
to	O
the	O
application	O
responsible	O
for	O
transmitting	O
the	O
IP	B-Protocol
packet	O
that	O
prompted	O
the	O
ICMP	O
message	O
to	O
be	O
sent	O
.	O
</s>
<s>
ICMP	O
is	O
a	O
network-layer	B-Application
protocol	O
,	O
this	O
makes	O
it	O
layer	B-Application
3	I-Application
protocol	O
by	O
the	O
7	O
layer	O
OSI	O
model	O
.	O
</s>
<s>
Based	O
on	O
the	O
4	O
layer	O
TCP/IP	B-Protocol
model	I-Protocol
,	O
ICMP	O
is	O
an	O
internet-layer	B-Protocol
protocol	O
,	O
which	O
makes	O
it	O
layer	O
2	O
protocol	O
(	O
internet	O
standard	O
RFC	O
1122	O
TCP/IP	B-Protocol
model	I-Protocol
with	O
4	O
layers	O
)	O
or	O
layer	B-Application
3	I-Application
protocol	O
based	O
on	O
modern	O
5	O
layer	O
TCP/IP	B-Protocol
protocol	I-Protocol
definitions	O
(	O
by	O
Kozierok	O
,	O
Comer	O
,	O
Tanenbaum	O
,	O
Forouzan	O
,	O
Kurose	O
,	O
Stallings	O
)	O
.	O
</s>
<s>
Forouzan	O
and	O
Kurose	O
use	O
network-layer	B-Application
instead	O
of	O
internet-layer	B-Protocol
in	O
their	O
TCP/IP	B-Protocol
model	I-Protocol
definition	O
.	O
</s>
<s>
There	O
is	O
no	O
TCP	B-Protocol
or	O
UDP	B-Protocol
port	O
number	O
associated	O
with	O
ICMP	O
packets	O
as	O
these	O
numbers	O
are	O
associated	O
with	O
the	O
transport	B-Architecture
layer	I-Architecture
above	O
.	O
</s>
<s>
The	O
ICMP	O
packet	O
is	O
encapsulated	O
in	O
an	O
IPv4	B-Protocol
packet	O
.	O
</s>
<s>
The	O
ICMP	O
header	O
starts	O
after	O
the	O
IPv4	B-Protocol
header	O
and	O
is	O
identified	O
by	O
IP	B-Protocol
protocol	I-Protocol
number	I-Protocol
'	O
1	O
 '	O
.	O
</s>
<s>
ICMP	O
error	O
messages	O
contain	O
a	O
data	O
section	O
that	O
includes	O
a	O
copy	O
of	O
the	O
entire	O
IPv4	B-Protocol
header	O
,	O
plus	O
at	O
least	O
the	O
first	O
eight	O
bytes	O
of	O
data	O
from	O
the	O
IPv4	B-Protocol
packet	O
that	O
caused	O
the	O
error	O
message	O
.	O
</s>
<s>
This	O
data	O
is	O
used	O
by	O
the	O
host	B-Application
to	O
match	O
the	O
message	O
to	O
the	O
appropriate	O
process	O
.	O
</s>
<s>
If	O
a	O
higher	O
level	O
protocol	O
uses	O
port	O
numbers	O
,	O
they	O
are	O
assumed	O
to	O
be	O
in	O
the	O
first	O
eight	O
bytes	O
of	O
the	O
original	O
datagram	B-Protocol
's	O
data	O
.	O
</s>
<s>
In	O
the	O
"	O
Ping	B-Protocol
of	O
death	O
"	O
,	O
large	O
or	O
fragmented	B-Protocol
ICMP	O
packets	O
are	O
used	O
for	O
denial-of-service	O
attacks	O
.	O
</s>
<s>
These	O
channels	O
are	O
known	O
as	O
ICMP	B-Application
tunnels	I-Application
.	O
</s>
<s>
Some	O
control	O
messages	O
have	O
been	O
deprecated	B-General_Concept
since	O
the	O
protocol	O
was	O
first	O
introduced	O
.	O
</s>
<s>
Source	O
Quench	O
requests	O
that	O
the	O
sender	O
decrease	O
the	O
rate	O
of	O
messages	O
sent	O
to	O
a	O
router	B-Protocol
or	O
host	B-Application
.	O
</s>
<s>
This	O
message	O
may	O
be	O
generated	O
if	O
a	O
router	B-Protocol
or	O
host	B-Application
does	O
not	O
have	O
sufficient	O
buffer	O
space	O
to	O
process	O
the	O
request	O
,	O
or	O
may	O
occur	O
if	O
the	O
router	B-Protocol
or	O
host	B-Application
buffer	O
is	O
approaching	O
its	O
limit	O
.	O
</s>
<s>
Data	O
is	O
sent	O
at	O
a	O
very	O
high	O
speed	O
from	O
a	O
host	B-Application
or	O
from	O
several	O
hosts	O
at	O
the	O
same	O
time	O
to	O
a	O
particular	O
router	B-Protocol
on	O
a	O
network	O
.	O
</s>
<s>
Although	O
a	O
router	B-Protocol
has	O
buffering	O
capabilities	O
,	O
the	O
buffering	O
is	O
limited	O
to	O
within	O
a	O
specified	O
range	O
.	O
</s>
<s>
The	O
router	B-Protocol
cannot	O
queue	O
any	O
more	O
data	O
than	O
the	O
capacity	O
of	O
the	O
limited	O
buffering	O
space	O
.	O
</s>
<s>
But	O
as	O
no	O
acknowledgement	O
mechanism	O
is	O
present	O
in	O
the	O
network	B-Application
layer	I-Application
,	O
the	O
client	O
does	O
not	O
know	O
whether	O
the	O
data	O
has	O
reached	O
the	O
destination	O
successfully	O
.	O
</s>
<s>
Hence	O
some	O
remedial	O
measures	O
should	O
be	O
taken	O
by	O
the	O
network	B-Application
layer	I-Application
to	O
avoid	O
these	O
kind	O
of	O
situations	O
.	O
</s>
<s>
In	O
a	O
source	O
quench	O
mechanism	O
,	O
the	O
router	B-Protocol
sees	O
that	O
the	O
incoming	O
data	O
rate	O
is	O
much	O
faster	O
than	O
the	O
outgoing	O
data	O
rate	O
,	O
and	O
sends	O
an	O
ICMP	O
message	O
to	O
the	O
clients	O
,	O
informing	O
them	O
that	O
they	O
should	O
slow	O
down	O
their	O
data	O
transfer	O
speeds	O
or	O
wait	O
for	O
a	O
certain	O
amount	O
of	O
time	O
before	O
attempting	O
to	O
send	O
more	O
data	O
.	O
</s>
<s>
When	O
a	O
client	O
receives	O
this	O
message	O
,	O
it	O
will	O
automatically	O
slow	O
down	O
the	O
outgoing	O
data	O
rate	O
or	O
wait	O
for	O
a	O
sufficient	O
amount	O
of	O
time	O
,	O
which	O
enables	O
the	O
router	B-Protocol
to	O
empty	O
the	O
queue	O
.	O
</s>
<s>
Thus	O
the	O
source	O
quench	O
ICMP	O
message	O
acts	O
as	O
flow	O
control	O
in	O
the	O
network	B-Application
layer	I-Application
.	O
</s>
<s>
Since	O
research	O
suggested	O
that	O
"	O
ICMP	O
Source	O
Quench	O
 [ was ] 	O
an	O
ineffective	O
(	O
and	O
unfair	O
)	O
antidote	O
for	O
congestion	O
"	O
,	O
routers	B-Protocol
 '	O
creation	O
of	O
source	O
quench	O
messages	O
was	O
deprecated	B-General_Concept
in	O
1995	O
by	O
RFC	O
1812	O
.	O
</s>
<s>
Furthermore	O
,	O
forwarding	O
of	O
and	O
any	O
kind	O
of	O
reaction	O
to	O
(	O
flow	O
control	O
actions	O
)	O
source	O
quench	O
messages	O
was	O
deprecated	B-General_Concept
from	O
2012	O
by	O
RFC	O
6633	O
.	O
</s>
<s>
ICMP	O
Redirect	O
is	O
a	O
mechanism	O
for	O
routers	B-Protocol
to	O
convey	O
routing	O
information	O
to	O
hosts	O
.	O
</s>
<s>
The	O
message	O
informs	O
a	O
host	B-Application
to	O
update	O
its	O
routing	O
information	O
(	O
to	O
send	O
packets	O
on	O
an	O
alternative	O
route	O
)	O
.	O
</s>
<s>
If	O
a	O
host	B-Application
tries	O
to	O
send	O
data	O
through	O
a	O
router	B-Protocol
(	O
R1	O
)	O
and	O
R1	O
sends	O
the	O
data	O
on	O
another	O
router	B-Protocol
(	O
R2	O
)	O
and	O
a	O
direct	O
path	O
from	O
the	O
host	B-Application
to	O
R2	O
is	O
available	O
(	O
that	O
is	O
,	O
the	O
host	B-Application
and	O
R2	O
are	O
on	O
the	O
same	O
subnetwork	B-Protocol
)	O
,	O
then	O
R1	O
will	O
send	O
a	O
redirect	O
message	O
to	O
inform	O
the	O
host	B-Application
that	O
the	O
best	O
route	O
for	O
the	O
destination	O
is	O
via	O
R2	O
.	O
</s>
<s>
The	O
host	B-Application
should	O
then	O
change	O
its	O
route	O
information	O
and	O
send	O
packets	O
for	O
that	O
destination	O
directly	O
to	O
R2	O
.	O
</s>
<s>
The	O
router	B-Protocol
will	O
still	O
send	O
the	O
original	O
datagram	B-Protocol
to	O
the	O
intended	O
destination	O
.	O
</s>
<s>
However	O
,	O
if	O
the	O
datagram	B-Protocol
contains	O
routing	O
information	O
,	O
this	O
message	O
will	O
not	O
be	O
sent	O
even	O
if	O
a	O
better	O
route	O
is	O
available	O
.	O
</s>
<s>
RFC	O
1122	O
states	O
that	O
redirects	O
should	O
only	O
be	O
sent	O
by	O
gateways	B-Application
and	O
should	O
not	O
be	O
sent	O
by	O
Internet	B-Device
hosts	I-Device
.	O
</s>
<s>
IP	B-Protocol
address	I-Protocol
is	O
the	O
32-bit	O
address	O
of	O
the	O
gateway	B-Application
to	O
which	O
the	O
redirection	O
should	O
be	O
sent	O
.	O
</s>
<s>
IP	B-Protocol
header	O
and	O
additional	O
data	O
is	O
included	O
to	O
allow	O
the	O
host	B-Application
to	O
match	O
the	O
reply	O
with	O
the	O
request	O
that	O
caused	O
the	O
redirection	O
reply	O
.	O
</s>
<s>
Time	O
Exceeded	O
is	O
generated	O
by	O
a	O
gateway	B-Application
to	O
inform	O
the	O
source	O
of	O
a	O
discarded	O
datagram	B-Protocol
due	O
to	O
the	O
time	B-Protocol
to	I-Protocol
live	I-Protocol
field	O
reaching	O
zero	O
.	O
</s>
<s>
A	O
time	O
exceeded	O
message	O
may	O
also	O
be	O
sent	O
by	O
a	O
host	B-Application
if	O
it	O
fails	O
to	O
reassemble	O
a	O
fragmented	B-Protocol
datagram	B-Protocol
within	O
its	O
time	O
limit	O
.	O
</s>
<s>
Time	O
exceeded	O
messages	O
are	O
used	O
by	O
the	O
traceroute	B-Protocol
utility	O
to	O
identify	O
gateways	B-Application
on	O
the	O
path	O
between	O
two	O
hosts	O
.	O
</s>
<s>
|	O
Time-to-live	B-Protocol
exceeded	O
in	O
transit	O
.	O
</s>
<s>
IP	B-Protocol
header	O
and	O
first	O
64	O
bits	O
of	O
the	O
original	O
payload	O
are	O
used	O
by	O
the	O
source	O
host	B-Application
to	O
match	O
the	O
time	O
exceeded	O
message	O
to	O
the	O
discarded	O
datagram	B-Protocol
.	O
</s>
<s>
For	O
higher-level	O
protocols	O
such	O
as	O
UDP	B-Protocol
and	O
TCP	B-Protocol
the	O
64-bit	O
payload	O
will	O
include	O
the	O
source	O
and	O
destination	O
ports	O
of	O
the	O
discarded	O
packet	O
.	O
</s>
<s>
Identifier	O
and	O
Sequence	B-Protocol
Number	I-Protocol
can	O
be	O
used	O
by	O
the	O
client	O
to	O
match	O
the	O
timestamp	O
reply	O
with	O
the	O
timestamp	O
request	O
.	O
</s>
<s>
Identifier	O
and	O
Sequence	B-Protocol
number	I-Protocol
can	O
be	O
used	O
by	O
the	O
client	O
to	O
match	O
the	O
reply	O
with	O
the	O
request	O
that	O
caused	O
the	O
reply	O
.	O
</s>
<s>
The	O
use	O
of	O
Timestamp	O
and	O
Timestamp	O
Reply	O
messages	O
to	O
synchronize	O
the	O
clocks	O
of	O
Internet	O
nodes	O
has	O
largely	O
been	O
replaced	O
by	O
the	O
UDP-based	O
Network	B-Protocol
Time	I-Protocol
Protocol	I-Protocol
and	O
the	O
Precision	B-Protocol
Time	I-Protocol
Protocol	I-Protocol
.	O
</s>
<s>
Address	B-Protocol
mask	I-Protocol
request	O
is	O
normally	O
sent	O
by	O
a	O
host	B-Application
to	O
a	O
router	B-Protocol
in	O
order	O
to	O
obtain	O
an	O
appropriate	O
subnet	B-Protocol
mask	I-Protocol
.	O
</s>
<s>
Recipients	O
should	O
reply	O
to	O
this	O
message	O
with	O
an	O
Address	B-Protocol
mask	I-Protocol
reply	O
message	O
.	O
</s>
<s>
ICMP	O
Address	B-Protocol
Mask	I-Protocol
Request	O
may	O
be	O
used	O
as	O
a	O
part	O
of	O
reconnaissance	O
attack	O
to	O
gather	O
information	O
on	O
the	O
target	O
network	O
,	O
therefore	O
ICMP	O
Address	B-Protocol
Mask	I-Protocol
Reply	O
is	O
disabled	O
by	O
default	O
on	O
Cisco	O
IOS	O
.	O
</s>
<s>
Address	B-Protocol
mask	I-Protocol
reply	O
is	O
used	O
to	O
reply	O
to	O
an	O
address	B-Protocol
mask	I-Protocol
request	O
message	O
with	O
an	O
appropriate	O
subnet	B-Protocol
mask	I-Protocol
.	O
</s>
<s>
Destination	O
unreachable	O
is	O
generated	O
by	O
the	O
host	B-Application
or	O
its	O
inbound	O
gateway	B-Application
to	O
inform	O
the	O
client	O
that	O
the	O
destination	O
is	O
unreachable	O
for	O
some	O
reason	O
.	O
</s>
<s>
Reasons	O
for	O
this	O
message	O
may	O
include	O
:	O
the	O
physical	O
connection	O
to	O
the	O
host	B-Application
does	O
not	O
exist	O
(	O
distance	O
is	O
infinite	O
)	O
;	O
the	O
indicated	O
protocol	O
or	O
port	O
is	O
not	O
active	O
;	O
the	O
data	O
must	O
be	O
fragmented	B-Protocol
but	O
the	O
'	O
do	O
n't	O
fragment	O
 '	O
flag	O
is	O
on	O
.	O
</s>
<s>
Unreachable	O
TCP	B-Protocol
ports	O
notably	O
respond	O
with	O
TCP	B-Protocol
RST	O
rather	O
than	O
a	O
destination	O
unreachable	O
type	O
3	O
as	O
might	O
be	O
expected	O
.	O
</s>
<s>
Destination	O
unreachable	O
is	O
never	O
reported	O
for	O
IP	B-Protocol
multicast	I-Protocol
transmissions	O
.	O
</s>
<s>
|	O
Host	B-Application
unreachable	O
error	O
.	O
</s>
<s>
|	O
Protocol	O
unreachable	O
error	O
(	O
the	O
designated	O
transport	B-Architecture
protocol	I-Architecture
is	O
not	O
supported	O
)	O
.	O
</s>
<s>
|	O
Port	O
unreachable	O
error	O
(	O
the	O
designated	O
protocol	O
is	O
unable	O
to	O
inform	O
the	O
host	B-Application
of	O
the	O
incoming	O
message	O
)	O
.	O
</s>
<s>
|	O
The	O
datagram	B-Protocol
is	O
too	O
big	O
.	O
</s>
<s>
|	O
Destination	O
host	B-Application
unknown	O
error	O
.	O
</s>
<s>
|	O
Source	O
host	B-Application
isolated	O
error	O
.	O
</s>
<s>
|	O
The	O
destination	O
host	B-Application
is	O
administratively	O
prohibited	O
.	O
</s>
<s>
|	O
The	O
host	B-Application
is	O
unreachable	O
for	O
Type	O
Of	O
Service	O
.	O
</s>
<s>
|	O
Host	B-Application
precedence	O
violation	O
(	O
indicates	O
the	O
requested	O
precedence	O
is	O
not	O
permitted	O
for	O
the	O
combination	O
of	O
host	B-Application
or	O
network	O
and	O
port	O
)	O
.	O
</s>
<s>
|	O
Precedence	O
cutoff	O
in	O
effect	O
(	O
precedence	O
of	O
datagram	B-Protocol
is	O
below	O
the	O
level	O
set	O
by	O
the	O
network	O
administrators	O
)	O
.	O
</s>
<s>
IP	B-Protocol
header	O
and	O
additional	O
data	O
is	O
included	O
to	O
allow	O
the	O
client	O
to	O
match	O
the	O
reply	O
with	O
the	O
request	O
that	O
caused	O
the	O
destination	O
unreachable	O
reply	O
.	O
</s>
