Contents » ICMP types Printer friendly version
Your advertisement can be placed here. Please, contact us:

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1; with the Invariant Sections being "Introduction" and all sub-sections, with the Front-Cover Texts being "Original Author: Oskar Andreasson", and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

All scripts in this tutorial are covered by the GNU General Public License. The scripts are free source; you can redistribute them and/or modify them under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 of the License.

These scripts are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License within this tutorial, under the section entitled "GNU General Public License"; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Appendix C. ICMP types

This is a complete listing of all ICMP types. Note the reference pointing to the RFC or person who introduced the type and code. For a complete and absolute up to date listing of all ICMP types and codes, look at the icmp-parameters document at Internet Assigned Numbers Authority.


Iptables and netfilter uses ICMP type 255 internally since it is not reserved for any real usage, and most likely will never have any real usage. If you set a rule to match iptables -A INPUT -p icmp --icmp-type 255 -j DROP, this will DROP all ICMP packets. It is in other words used to match all ICMP types.

Table C-1. ICMP types

TYPE CODE Description Query Error Reference
0 0 Echo Reply x   RFC792
3 0 Network Unreachable   x RFC792
3 1 Host Unreachable   x RFC792
3 2 Protocol Unreachable   x RFC792
3 3 Port Unreachable   x RFC792
3 4 Fragmentation needed but no frag. bit set   x RFC792
3 5 Source routing failed   x RFC792
3 6 Destination network unknown   x RFC792
3 7 Destination host unknown   x RFC792
3 8 Source host isolated (obsolete)   x RFC792
3 9 Destination network administratively prohibited   x RFC792
3 10 Destination host administratively prohibited   x RFC792
3 11 Network unreachable for TOS   x RFC792
3 12 Host unreachable for TOS   x RFC792
3 13 Communication administratively prohibited by filtering   x RFC1812
3 14 Host precedence violation   x RFC1812
3 15 Precedence cutoff in effect   x RFC1812
4 0 Source quench     RFC792
5 0 Redirect for network     RFC792
5 1 Redirect for host      
5 2 Redirect for TOS and network     RFC792
5 3 Redirect for TOS and host     RFC792
8 0 Echo request x   RFC792
9 0 Router advertisement - Normal router advertisement     RFC1256
9 16 Router advertisement - Does not route common traffic     RFC2002
10 0 Route selection     RFC1256
11 0 TTL equals 0 during transit   x RFC792
11 1 TTL equals 0 during reassembly   x RFC792
12 0 IP header bad (catchall error)   x RFC792
12 1 Required options missing   x RFC1108
12 2 IP Header bad length   x RFC792
13 0 Timestamp request (obsolete) x   RFC792
14   Timestamp reply (obsolete) x   RFC792
15 0 Information request (obsolete) x   RFC792
16 0 Information reply (obsolete) x   RFC792
17 0 Address mask request x   RFC950
18 0 Address mask reply x   RFC950
20-29   Reserved for robustness experiment     Zaw-Sing Su
30 0 Traceroute x   RFC1393
31 0 Datagram Conversion Error   x RFC1475
32 0 Mobile Host Redirect     David Johnson
33 0 IPv6 Where-Are-You x   Bill Simpson
34 0 IPv6 I-Am-Here x   Bill Simpson
35 0 Mobile Registration Request x   Bill Simpson
36 0 Mobile Registration Reply x   Bill Simpson
39 0 SKIP     Tom Markson
40 0 Photuris     RFC2521
Hosted by HB.BY 2008 ©