1ICMP(7) Linux Programmer's Manual ICMP(7)
2
3
4
6 icmp - Linux IPv4 ICMP kernel module.
7
9 This kernel protocol module implements the Internet Control Message
10 Protocol defined in RFC 792. It is used to signal error conditions and
11 for diagnosis. The user doesn't interact directly with this module;
12 instead it communicates with the other protocols in the kernel and
13 these pass the ICMP errors to the application layers. The kernel ICMP
14 module also answers ICMP requests.
15
16 A user protocol may receive ICMP packets for all local sockets by open‐
17 ing a raw socket with the protocol IPPROTO_ICMP. See raw(7) for more
18 information. The types of ICMP packets passed to the socket can be
19 filtered using the ICMP_FILTER socket option. ICMP packets are always
20 processed by the kernel too, even when passed to a user socket.
21
22 Linux limits the rate of ICMP error packets to each destination.
23 ICMP_REDIRECT and ICMP_DEST_UNREACH are also limited by the destination
24 route of the incoming packets.
25
26 /proc interfaces
27 ICMP supports a set of /proc interfaces to configure some global IP
28 parameters. The parameters can be accessed by reading or writing files
29 in the directory /proc/sys/net/ipv4/. Most of these parameters are
30 rate limitations for specific ICMP types. Linux 2.2 uses a token
31 bucket filter to limit ICMPs. The value is the timeout in jiffies
32 until the token bucket filter is cleared after a burst. A jiffy is a
33 system dependent unit, usually 10ms on i386 and about 1ms on alpha and
34 ia64.
35
36 icmp_destunreach_rate (Linux 2.2 to 2.4.9)
37 Maximum rate to send ICMP Destination Unreachable packets. This
38 limits the rate at which packets are sent to any individual
39 route or destination. The limit does not affect sending of
40 ICMP_FRAG_NEEDED packets needed for path MTU discovery.
41
42 icmp_echo_ignore_all (since Linux 2.2)
43 If this value is nonzero, Linux will ignore all ICMP_ECHO
44 requests.
45
46 icmp_echo_ignore_broadcasts (since Linux 2.2)
47 If this value is nonzero, Linux will ignore all ICMP_ECHO pack‐
48 ets sent to broadcast addresses.
49
50 icmp_echoreply_rate (Linux 2.2 to 2.4.9)
51 Maximum rate for sending ICMP_ECHOREPLY packets in response to
52 ICMP_ECHOREQUEST packets.
53
54 icmp_errors_use_inbound_ifaddr (Boolean; default: disabled; since Linux
55 2.6.12)
56 If disabled, ICMP error messages are sent with the primary
57 address of the exiting interface.
58
59 If enabled, the message will be sent with the primary address of
60 the interface that received the packet that caused the ICMP
61 error. This is the behavior that many network administrators
62 will expect from a router. And it can make debugging compli‐
63 cated network layouts much easier.
64
65 Note that if no primary address exists for the interface
66 selected, then the primary address of the first non-loopback
67 interface that has one will be used regardless of this setting.
68
69 icmp_ignore_bogus_error_responses (Boolean; default: disabled; since
70 Linux 2.2)
71 Some routers violate RFC1122 by sending bogus responses to
72 broadcast frames. Such violations are normally logged via a
73 kernel warning. If this parameter is enabled, the kernel will
74 not give such warnings, which will avoid log file clutter.
75
76 icmp_paramprob_rate (Linux 2.2 to 2.4.9)
77 Maximum rate for sending ICMP_PARAMETERPROB packets. These
78 packets are sent when a packet arrives with an invalid IP
79 header.
80
81 icmp_ratelimit (integer; default: 1000; since Linux 2.4.10)
82 Limit the maximum rates for sending ICMP packets whose type
83 matches icmp_ratemask (see below) to specific targets. 0 to
84 disable any limiting, otherwise the minimum space between
85 responses in milliseconds.
86
87 icmp_ratemask (integer; default: see below; since Linux 2.4.10)
88 Mask made of ICMP types for which rates are being limited.
89
90 Significant bits: IHGFEDCBA9876543210
91 Default mask: 0000001100000011000 (0x1818)
92
93 Bit definitions (see the Linux kernel source file
94 include/linux/icmp.h):
95
96
97 0 Echo Reply
98 3 Destination Unreachable *
99 4 Source Quench *
100 5 Redirect
101 8 Echo Request
102 B Time Exceeded *
103 C Parameter Problem *
104 D Timestamp Request
105 E Timestamp Reply
106 F Info Request
107 G Info Reply
108 H Address Mask Request
109 I Address Mask Reply
110
111 The bits marked with an asterisk are rate limited by default (see the
112 default mask above).
113
114 icmp_timeexceed_rate (Linux 2.2 to 2.4.9)
115 Maximum rate for sending ICMP_TIME_EXCEEDED packets. These
116 packets are sent to prevent loops when a packet has crossed too
117 many hops.
118
120 Support for the ICMP_ADDRESS request was removed in 2.2.
121
122 Support for ICMP_SOURCE_QUENCH was removed in Linux 2.2.
123
125 As many other implementations don't support IPPROTO_ICMP raw sockets,
126 this feature should not be relied on in portable programs.
127
128 ICMP_REDIRECT packets are not sent when Linux is not acting as a
129 router. They are also accepted only from the old gateway defined in
130 the routing table and the redirect routes are expired after some time.
131
132 The 64-bit timestamp returned by ICMP_TIMESTAMP is in milliseconds
133 since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
134
135 Linux ICMP internally uses a raw socket to send ICMPs. This raw socket
136 may appear in netstat(8) output with a zero inode.
137
139 ip(7)
140
141 RFC 792 for a description of the ICMP protocol.
142
144 This page is part of release 3.53 of the Linux man-pages project. A
145 description of the project, and information about reporting bugs, can
146 be found at http://www.kernel.org/doc/man-pages/.
147
148
149
150Linux 2012-05-10 ICMP(7)