OSDN Git Service

(split) LDP: Update original to LDP v3.51.
[linuxjm/LDP_man-pages.git] / original / man7 / icmp.7
1 .\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
2 .\"
3 .\" %%%LICENSE_START(VERBATIM_ONE_PARA)
4 .\" Permission is granted to distribute possibly modified copies
5 .\" of this page provided the header is included verbatim,
6 .\" and in case of nontrivial modification author and date
7 .\" of the modification is added to the header.
8 .\" %%%LICENSE_END
9 .\"
10 .\" $Id: icmp.7,v 1.6 2000/08/14 08:03:45 ak Exp $
11 .\"
12 .TH ICMP 7 2012-05-10 "Linux" "Linux Programmer's Manual"
13 .SH NAME
14 icmp \- Linux IPv4 ICMP kernel module.
15 .SH DESCRIPTION
16 This kernel protocol module implements the Internet Control
17 Message Protocol defined in RFC\ 792.
18 It is used to signal error conditions and for diagnosis.
19 The user doesn't interact directly with this module;
20 instead it communicates with the other protocols in the kernel
21 and these pass the ICMP errors to the application layers.
22 The kernel ICMP module also answers ICMP requests.
23 .PP
24 A user protocol may receive ICMP packets for all local sockets by opening
25 a raw socket with the protocol
26 .BR IPPROTO_ICMP .
27 See
28 .BR raw (7)
29 for more information.
30 The types of ICMP packets passed to the socket can be filtered using the
31 .B ICMP_FILTER
32 socket option.
33 ICMP packets are always processed by the kernel too, even
34 when passed to a user socket.
35 .LP
36 Linux limits the rate of ICMP error packets to each destination.
37 .B ICMP_REDIRECT
38 and
39 .B ICMP_DEST_UNREACH
40 are also limited by the destination route of the incoming packets.
41 .SS /proc interfaces
42 ICMP supports a set of
43 .I /proc
44 interfaces to configure some global IP parameters.
45 The parameters can be accessed by reading or writing files in the directory
46 .IR /proc/sys/net/ipv4/ .
47 Most of these parameters are rate limitations for specific ICMP types.
48 Linux 2.2 uses a token bucket filter to limit ICMPs.
49 .\" FIXME better description needed
50 The value is the timeout in jiffies until the token bucket filter is
51 cleared after a burst.
52 A jiffy is a system dependent unit, usually 10ms on i386 and
53 about 1ms on alpha and ia64.
54 .TP
55 .IR icmp_destunreach_rate " (Linux 2.2 to 2.4.9)"
56 .\" Precisely: from 2.1.102
57 Maximum rate to send ICMP Destination Unreachable packets.
58 This limits the rate at which packets are sent to any individual
59 route or destination.
60 The limit does not affect sending of
61 .B ICMP_FRAG_NEEDED
62 packets needed for path MTU discovery.
63 .TP
64 .IR icmp_echo_ignore_all " (since Linux 2.2)"
65 .\" Precisely: 2.1.68
66 If this value is nonzero, Linux will ignore all
67 .B ICMP_ECHO
68 requests.
69 .TP
70 .IR icmp_echo_ignore_broadcasts " (since Linux 2.2)"
71 .\" Precisely: from 2.1.68
72 If this value is nonzero, Linux will ignore all
73 .B ICMP_ECHO
74 packets sent to broadcast addresses.
75 .TP
76 .IR icmp_echoreply_rate " (Linux 2.2 to 2.4.9)"
77 .\" Precisely: from 2.1.102
78 Maximum rate for sending
79 .B ICMP_ECHOREPLY
80 packets in response to
81 .B ICMP_ECHOREQUEST
82 packets.
83 .TP
84 .IR icmp_errors_use_inbound_ifaddr " (Boolean; default: disabled; since Linux 2.6.12)"
85 .\" The following taken from 2.6.28-rc4 Documentation/networking/ip-sysctl.txt
86 If disabled, ICMP error messages are sent with the primary address of
87 the exiting interface.
88
89 If enabled, the message will be sent with the primary address of
90 the interface that received the packet that caused the ICMP error.
91 This is the behavior that many network administrators will expect from
92 a router.
93 And it can make debugging complicated network layouts much easier.
94
95 Note that if no primary address exists for the interface selected,
96 then the primary address of the first non-loopback interface that
97 has one will be used regardless of this setting.
98 .TP
99 .IR icmp_ignore_bogus_error_responses " (Boolean; default: disabled; since Linux 2.2)"
100 .\" precisely: since 2.1.32
101 .\" The following taken from 2.6.28-rc4 Documentation/networking/ip-sysctl.txt
102 Some routers violate RFC1122 by sending bogus responses to broadcast frames.
103 Such violations are normally logged via a kernel warning.
104 If this parameter is enabled, the kernel will not give such warnings,
105 which will avoid log file clutter.
106 .TP
107 .IR icmp_paramprob_rate " (Linux 2.2 to 2.4.9)"
108 .\" Precisely: from 2.1.102
109 Maximum rate for sending
110 .B ICMP_PARAMETERPROB
111 packets.
112 These packets are sent when a packet arrives with an invalid IP header.
113 .TP
114 .IR icmp_ratelimit " (integer; default: 1000; since Linux 2.4.10)"
115 .\" The following taken from 2.6.28-rc4 Documentation/networking/ip-sysctl.txt
116 Limit the maximum rates for sending ICMP packets whose type matches
117 .IR icmp_ratemask
118 (see below) to specific targets.
119 0 to disable any limiting,
120 otherwise the minimum space between responses in milliseconds.
121 .TP
122 .IR icmp_ratemask " (integer; default: see below; since Linux 2.4.10)"
123 .\" The following taken from 2.6.28-rc4 Documentation/networking/ip-sysctl.txt
124 Mask made of ICMP types for which rates are being limited.
125
126 Significant bits: IHGFEDCBA9876543210
127 .br
128 Default mask:     0000001100000011000 (0x1818)
129
130 Bit definitions (see the Linux kernel source file
131 .IR include/linux/icmp.h ):
132
133 .in +4n
134 .nf
135 0 Echo Reply
136 3 Destination Unreachable *
137 4 Source Quench *
138 5 Redirect
139 8 Echo Request
140 B Time Exceeded *
141 C Parameter Problem *
142 D Timestamp Request
143 E Timestamp Reply
144 F Info Request
145 G Info Reply
146 H Address Mask Request
147 I Address Mask Reply
148 .fi
149 .in
150
151 The bits marked with an asterisk are rate limited by default
152 (see the default mask above).
153 .TP
154 .IR icmp_timeexceed_rate " (Linux 2.2 to 2.4.9)"
155 Maximum rate for sending
156 .B ICMP_TIME_EXCEEDED
157 packets.
158 These packets are
159 sent to prevent loops when a packet has crossed too many hops.
160 .SH VERSIONS
161 Support for the
162 .B ICMP_ADDRESS
163 request was removed in 2.2.
164 .PP
165 Support for
166 .B ICMP_SOURCE_QUENCH
167 was removed in Linux 2.2.
168 .SH NOTES
169 As many other implementations don't support
170 .B IPPROTO_ICMP
171 raw sockets, this feature
172 should not be relied on in portable programs.
173 .\" not really true ATM
174 .\" .PP
175 .\" Linux ICMP should be compliant to RFC 1122.
176 .PP
177 .B ICMP_REDIRECT
178 packets are not sent when Linux is not acting as a router.
179 They are also accepted only from the old gateway defined in the
180 routing table and the redirect routes are expired after some time.
181 .PP
182 The 64-bit timestamp returned by
183 .B ICMP_TIMESTAMP
184 is in milliseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
185 .PP
186 Linux ICMP internally uses a raw socket to send ICMPs.
187 This raw socket may appear in
188 .BR netstat (8)
189 output with a zero inode.
190 .SH SEE ALSO
191 .BR ip (7)
192 .PP
193 RFC\ 792 for a description of the ICMP protocol.