ip-sysctl.txt

ip-sysctl.txt - v i а SеrgеniuS, Сб, 30 апр. 2011, 12:37:41 +0400

Загрузить (16,96 КБ)

 
1
/proc/sys/net/ipv4/* Variables:
2
3
ip_forward - BOOLEAN
4
	0 - disabled (default)
5
	not 0 - enabled 
6
7
	Forward Packets between interfaces.
8
9
	This variable is special, its change resets all configuration
10
	parameters to their default state (RFC1122 for hosts, RFC1812
11
	for routers)
12
13
ip_default_ttl - INTEGER
14
	default 64
15
16
ip_no_pmtu_disc - BOOLEAN
17
	Disable Path MTU Discovery.
18
	default FALSE
19
20
IP Fragmentation:
21
22
ipfrag_high_thresh - INTEGER
23
	Maximum memory used to reassemble IP fragments. When 
24
	ipfrag_high_thresh bytes of memory is allocated for this purpose,
25
	the fragment handler will toss packets until ipfrag_low_thresh
26
	is reached.
27
	
28
ipfrag_low_thresh - INTEGER
29
	See ipfrag_high_thresh	
30
31
ipfrag_time - INTEGER
32
	Time in seconds to keep an IP fragment in memory.	
33
34
INET peer storage:
35
36
inet_peer_threshold - INTEGER
37
	The approximate size of the storage.  Starting from this threshold	
38
	entries will be thrown aggressively.  This threshold also determines
39
	entries' time-to-live and time intervals between garbage collection
40
	passes.  More entries, less time-to-live, less GC interval.
41
42
inet_peer_minttl - INTEGER
43
	Minimum time-to-live of entries.  Should be enough to cover fragment
44
	time-to-live on the reassembling side.  This minimum time-to-live  is
45
	guaranteed if the pool size is less than inet_peer_threshold.
46
	Measured in jiffies.
47
48
inet_peer_maxttl - INTEGER
49
	Maximum time-to-live of entries.  Unused entries will expire after
50
	this period of time if there is no memory pressure on the pool (i.e.
51
	when the number of entries in the pool is very small).
52
	Measured in jiffies.
53
54
inet_peer_gc_mintime - INTEGER
55
	Minimum interval between garbage collection passes.  This interval is
56
	in effect under high memory pressure on the pool.
57
	Measured in jiffies.
58
59
inet_peer_gc_maxtime - INTEGER
60
	Minimum interval between garbage collection passes.  This interval is
61
	in effect under low (or absent) memory pressure on the pool.
62
	Measured in jiffies.
63
64
TCP variables: 
65
66
tcp_syn_retries - INTEGER
67
	Number of times initial SYNs for an active TCP connection attempt
68
	will be retransmitted. Should not be higher than 255. Default value
69
	is 5, which corresponds to ~180seconds.
70
71
tcp_synack_retries - INTEGER
72
	Number of times SYNACKs for a passive TCP connection attempt will
73
	be retransmitted. Should not be higher than 255. Default value
74
	is 5, which corresponds to ~180seconds.
75
76
tcp_keepalive_time - INTEGER
77
	How often TCP sends out keepalive messages when keepalive is enabled.
78
	Default: 2hours.
79
80
tcp_keepalive_probes - INTEGER
81
	How many keepalive probes TCP sends out, until it decides that the
82
	connection is broken. Default value: 9.
83
84
tcp_keepalive_interval - INTEGER
85
	How frequently the probes are send out. Multiplied by
86
	tcp_keepalive_probes it is time to kill not responding connection,
87
	after probes started. Default value: 75sec i.e. connection
88
	will be aborted after ~11 minutes of retries.
89
90
tcp_retries1 - INTEGER
91
	How many times to retry before deciding that something is wrong
92
	and it is necessary to report this suspection to network layer.
93
	Minimal RFC value is 3, it is default, which corresponds
94
	to ~3sec-8min depending on RTO.
95
96
tcp_retries2 - INTEGER
97
	How may times to retry before killing alive TCP connection.
98
	RFC1122 says that the limit should be longer than 100 sec.
99
	It is too small number.	Default value 15 corresponds to ~13-30min
100
	depending on RTO.
101
102
tcp_orphan_retries - INTEGER
103
	How may times to retry before killing TCP connection, closed
104
	by our side. Default value 7 corresponds to ~50sec-16min
105
	depending on RTO. If you machine is loaded WEB server,
106
	you should think about lowering this value, such sockets
107
	may consume significant resources. Cf. tcp_max_orphans.
108
109
tcp_fin_timeout - INTEGER
110
	Time to hold socket in state FIN-WAIT-2, if it was closed
111
	by our side. Peer can be broken and never close its side,
112
	or even died unexpectedly. Default value is 60sec.
113
	Usual value used in 2.2 was 180 seconds, you may restore
114
	it, but remember that if your machine is even underloaded WEB server,
115
	you risk to overflow memory with kilotons of dead sockets,
116
	FIN-WAIT-2 sockets are less dangerous than FIN-WAIT-1,
117
	because they eat maximum 1.5K of memory, but they tend
118
	to live longer.	Cf. tcp_max_orphans.
119
120
tcp_max_tw_buckets - INTEGER
121
	Maximal number of timewait sockets held by system simultaneously.
122
	If this number is exceeded time-wait socket is immediately destroyed
123
	and warning is printed. This limit exists only to prevent
124
	simple DoS attacks, you _must_ not lower the limit artificially,
125
	but rather increase it (probably, after increasing installed memory),
126
	if network conditions require more than default value.
127
128
tcp_tw_recycle - BOOLEAN
129
	Enable fast recycling TIME-WAIT sockets. Default value is 1.
130
	It should not be changed without advice/request of technical
131
	experts.
132
133
tcp_max_orphans - INTEGER
134
	Maximal number of TCP sockets not attached to any user file handle,
135
	held by system.	If this number is exceeded orphaned connections are
136
	reset immediately and warning is printed. This limit exists
137
	only to prevent simple DoS attacks, you _must_ not rely on this
138
	or lower the limit artificially, but rather increase it
139
	(probably, after increasing installed memory),
140
	if network conditions require more than default value,
141
	and tune network services to linger and kill such states
142
	more aggressively. Let me to remind again: each orphan eats
143
	up to ~64K of unswappable memory.
144
145
tcp_abort_on_overflow - BOOLEAN
146
	If listening service is too slow to accept new connections,
147
	reset them. Default state is FALSE. It means that if overflow
148
	occurred due to a burst, connection will recover. Enable this
149
	option _only_ if you are really sure that listening daemon
150
	cannot be tuned to accept connections faster. Enabling this
151
	option can harm clients of your server.
152
153
tcp_syncookies - BOOLEAN
154
	Only valid when the kernel was compiled with CONFIG_SYNCOOKIES
155
	Send out syncookies when the syn backlog queue of a socket 
156
	overflows. This is to prevent against the common 'syn flood attack'
157
	Default: FALSE
158
159
	Note, that syncookies is fallback facility.
160
	It MUST NOT be used to help highly loaded servers to stand
161
	against legal connection rate. If you see synflood warnings
162
	in your logs, but investigation	shows that they occur
163
	because of overload with legal connections, you should tune
164
	another parameters until this warning disappear.
165
	See: tcp_max_syn_backlog, tcp_synack_retries, tcp_abort_on_overflow.
166
167
	syncookies seriously violate TCP protocol, do not allow
168
	to use TCP extensions, can result in serious degradation
169
	of some services (f.e. SMTP relaying), visible not by you,
170
	but your clients and relays, contacting you. While you see
171
	synflood warnings in logs not being really flooded, your server
172
	is seriously misconfigured.
173
174
tcp_stdurg - BOOLEAN
175
	Use the Host requirements interpretation of the TCP urg pointer field.
176
	Most hosts use the older BSD interpretation, so if you turn this on
177
	Linux might not communicate correctly with them.	
178
	Default: FALSE 
179
	
180
tcp_max_syn_backlog - INTEGER
181
	Maximal number of remembered connection requests, which are
182
	still did not receive an acknowledgement from connecting client.
183
	Default value is 1024 for systems with more than 128Mb of memory,
184
	and 128 for low memory machines. If server suffers of overload,
185
	try to increase this number. Warning! If you make it greater
186
	than 1024, it would be better to change TCP_SYNQ_HSIZE in
187
	include/net/tcp.h to keep TCP_SYNQ_HSIZE*16<=tcp_max_syn_backlog
188
	and to recompile kernel.
189
190
tcp_window_scaling - BOOLEAN
191
	Enable window scaling as defined in RFC1323.
192
193
tcp_timestamps - BOOLEAN
194
	Enable timestamps as defined in RFC1323.
195
196
tcp_sack - BOOLEAN
197
	Enable select acknowledgments (SACKS).
198
199
tcp_fack - BOOLEAN
200
	Enable FACK congestion avoidance and fast restransmission.
201
	The value is not used, if tcp_sack is not enabled.
202
203
tcp_dsack - BOOLEAN
204
	Allows TCP to send "duplicate" SACKs.
205
206
tcp_ecn - BOOLEAN
207
	Enable Explicit Congestion Notification in TCP.
208
209
tcp_reordering - INTEGER
210
	Maximal reordering of packets in a TCP stream.
211
	Default: 3	
212
213
tcp_retrans_collapse - BOOLEAN
214
	Bug-to-bug compatibility with some broken printers.
215
	On retransmit try to send bigger packets to work around bugs in
216
	certain TCP stacks.
217
218
tcp_wmem - vector of 3 INTEGERs: min, default, max
219
	min: Amount of memory reserved for send buffers for TCP socket.
220
	Each TCP socket has rights to use it due to fact of its birth.
221
	Default: 4K
222
223
	default: Amount of memory allowed for send buffers for TCP socket
224
	by default. This value overrides net.core.wmem_default used
225
	by other protocols, it is usually lower than net.core.wmem_default.
226
	Default: 16K
227
228
	max: Maximal amount of memory allowed for automatically selected
229
	send buffers for TCP socket. This value does not override
230
	net.core.wmem_max, "static" selection via SO_SNDBUF does not use this.
231
	Default: 128K
232
233
tcp_rmem - vector of 3 INTEGERs: min, default, max
234
	min: Minimal size of receive buffer used by TCP sockets.
235
	It is guaranteed to each TCP socket, even under moderate memory
236
	pressure.
237
	Default: 8K
238
239
	default: default size of receive buffer used by TCP sockets.
240
	This value overrides net.core.rmem_default used by other protocols.
241
	Default: 87380 bytes. This value results in window of 65535 with
242
	default setting of tcp_adv_win_scale and tcp_app_win:0 and a bit
243
	less for default tcp_app_win. See below about these variables.
244
245
	max: maximal size of receive buffer allowed for automatically
246
	selected receiver buffers for TCP socket. This value does not override
247
	net.core.rmem_max, "static" selection via SO_RCVBUF does not use this.
248
	Default: 87380*2 bytes.
249
250
tcp_mem - vector of 3 INTEGERs: min, pressure, max
251
	low: below this number of pages TCP is not bothered about its
252
	memory appetite.
253
254
	pressure: when amount of memory allocated by TCP exceeds this number
255
	of pages, TCP moderates its memory consumption and enters memory
256
	pressure mode, which is exited when memory consumtion falls
257
	under "low".
258
259
	high: number of pages allowed for queueing by all TCP sockets.
260
261
	Defaults are calculated at boot time from amount of available
262
	memory.
263
264
tcp_app_win - INTEGER
265
	Reserve max(window/2^tcp_app_win, mss) of window for application
266
	buffer. Value 0 is special, it means that nothing is reserved.
267
	Default: 31
268
269
tcp_adv_win_scale - INTEGER
270
	Count buffering overhead as bytes/2^tcp_adv_win_scale
271
	(if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale),
272
	if it is <= 0.
273
	Default: 2
274
275
tcp_rfc1337 - BOOLEAN
276
	If set, the TCP stack behaves conforming to RFC1337. If unset,
277
	we are not conforming to RFC, but prevent TCP TIME_WAIT
278
	asassination.	
279
	Default: 0
280
281
ip_local_port_range - 2 INTEGERS
282
	Defines the local port range that is used by TCP and UDP to
283
	choose the local port. The first number is the first, the 
284
	second the last local port number. Default value depends on
285
	amount of memory available on the system:
286
	> 128Mb 32768-61000
287
	< 128Mb 1024-4999 or even less.
288
	This number defines number of active connections, which this
289
	system can issue simultaneously to systems not supporting
290
	TCP extensions (timestamps). With tcp_tw_recycle enabled
291
	(i.e. by default) range 1024-4999 is enough to issue up to
292
	2000 connections per second to systems supporting timestamps.
293
294
ip_nonlocal_bind - BOOLEAN
295
	If set, allows processes to bind() to non-local IP adresses,
296
	which can be quite useful - but may break some applications.
297
	Default: 0
298
299
ip_dynaddr - BOOLEAN
300
	If set non-zero, enables support for dynamic addresses.
301
	If set to a non-zero value larger than 1, a kernel log
302
	message will be printed when dynamic address rewriting
303
	occurs.
304
	Default: 0
305
306
icmp_echo_ignore_all - BOOLEAN
307
icmp_echo_ignore_broadcasts - BOOLEAN
308
	If either is set to true, then the kernel will ignore either all
309
	ICMP ECHO requests sent to it or just those to broadcast/multicast
310
	addresses, respectively.
311
312
icmp_destunreach_rate - INTEGER
313
icmp_paramprob_rate - INTEGER
314
icmp_timeexceed_rate - INTEGER
315
icmp_echoreply_rate - INTEGER (not enabled per default)
316
	Limit the maximal rates for sending ICMP packets to specific targets.
317
	0 to disable any limiting, otherwise the maximal rate in jiffies(1)
318
	See the source for more information.
319
320
icmp_ignore_bogus_error_responses - BOOLEAN
321
	Some routers violate RFC 1122 by sending bogus responses to broadcast
322
	frames.  Such violations are normally logged via a kernel warning.
323
	If this is set to TRUE, the kernel will not give such warnings, which
324
	will avoid log file clutter.
325
	Default: FALSE
326
327
(1) Jiffie: internal timeunit for the kernel. On the i386 1/100s, on the
328
Alpha 1/1024s. See the HZ define in /usr/include/asm/param.h for the exact
329
value on your system. 
330
331
igmp_max_memberships - INTEGER
332
	Change the maximum number of multicast groups we can subscribe to.
333
	Default: 20
334
335
conf/interface/*: 
336
conf/all/* is special and changes the settings for all interfaces.
337
	Change special settings per interface.
338
339
log_martians - BOOLEAN
340
	Log packets with impossible addresses to kernel log.
341
342
accept_redirects - BOOLEAN
343
	Accept ICMP redirect messages.
344
	default TRUE (host)
345
		FALSE (router)
346
347
forwarding - BOOLEAN
348
	Enable IP forwarding on this interface.
349
350
mc_forwarding - BOOLEAN
351
	Do multicast routing. The kernel needs to be compiled with CONFIG_MROUTE
352
	and a multicast routing daemon is required.
353
354
proxy_arp - BOOLEAN
355
	Do proxy arp.
356
357
shared_media - BOOLEAN
358
	Send(router) or accept(host) RFC1620 shared media redirects.
359
	Overrides ip_secure_redirects.
360
	default TRUE
361
362
secure_redirects - BOOLEAN
363
	Accept ICMP redirect messages only for gateways,
364
	listed in default gateway list.
365
	default TRUE
366
367
send_redirects - BOOLEAN
368
	Send redirects, if router. Default: TRUE
369
370
bootp_relay - BOOLEAN
371
	Accept packets with source address 0.b.c.d destined
372
	not to this host as local ones. It is supposed, that
373
	BOOTP relay daemon will catch and forward such packets.
374
375
	default FALSE
376
	Not Implemented Yet.
377
378
accept_source_route - BOOLEAN
379
	Accept packets with SRR option.
380
	default TRUE (router)
381
		FALSE (host)
382
383
rp_filter - BOOLEAN
384
	1 - do source validation by reversed path, as specified in RFC1812
385
	    Recommended option for single homed hosts and stub network
386
	    routers. Could cause troubles for complicated (not loop free)
387
	    networks running a slow unreliable protocol (sort of RIP),
388
	    or using static routes.
389
390
	0 - No source validation. 
391
392
	Default value is 0. Note that some distributions enable it
393
	in startip scripts.
394
395
Alexey Kuznetsov.
396
kuznet@ms2.inr.ac.ru
397
398
Updated by:
399
Andi Kleen
400
ak@muc.de
401
402
403
404
405
406
407
/proc/sys/net/ipv6/* Variables:
408
409
IPv6 has no global variables such as tcp_*.  tcp_* settings under ipv4/ also
410
apply to IPv6 [XXX?].
411
412
conf/default/*:
413
	Change the interface-specific default settings.
414
415
416
conf/all/*:
417
	Change all the interface-specific settings.  
418
419
	[XXX:  Other special features than forwarding?]
420
421
conf/all/forwarding - BOOLEAN
422
	Enable global IPv6 forwarding between all interfaces.  
423
424
	IPv4 and IPv6 work differently here; e.g. netfilter must be used 
425
	to control which interfaces may forward packets and which not.
426
427
	This also sets all interfaces' Host/Router setting 
428
	'forwarding' to the specified value.  See below for details.
429
430
	This referred to as global forwarding.
431
432
conf/interface/*:
433
	Change special settings per interface.
434
435
	The functional behaviour for certain settings is different 
436
	depending on whether local forwarding is enabled or not.
437
438
accept_ra - BOOLEAN
439
	Accept Router Advertisements; autoconfigure using them.
440
	
441
	Functional default: enabled if local forwarding is disabled.
442
			    disabled if local forwarding is enabled.
443
444
accept_redirects - BOOLEAN
445
	Accept Redirects.
446
447
	Functional default: enabled if local forwarding is disabled.
448
			    disabled if local forwarding is enabled.
449
450
autoconf - BOOLEAN
451
	Configure link-local addresses using L2 hardware addresses.
452
453
	Default: TRUE
454
455
dad_transmits - INTEGER
456
	The amount of Duplicate Address Detection probes to send.
457
	Default: 1
458
	
459
forwarding - BOOLEAN
460
	Configure interface-specific Host/Router behaviour.  
461
462
	Note: It is recommended to have the same setting on all 
463
	interfaces; mixed router/host scenarios are rather uncommon.
464
465
	FALSE:
466
467
	By default, Host behaviour is assumed.  This means:
468
469
	1. IsRouter flag is not set in Neighbour Advertisements.
470
	2. Router Solicitations are being sent when necessary.
471
	3. If accept_ra is TRUE (default), accept Router 
472
	   Advertisements (and do autoconfiguration).
473
	4. If accept_redirects is TRUE (default), accept Redirects.
474
475
	TRUE:
476
477
	If local forwarding is enabled, Router behaviour is assumed. 
478
	This means exactly the reverse from the above:
479
480
	1. IsRouter flag is set in Neighbour Advertisements.
481
	2. Router Solicitations are not sent.
482
	3. Router Advertisements are ignored.
483
	4. Redirects are ignored.
484
485
	Default: FALSE if global forwarding is disabled (default),
486
		 otherwise TRUE.
487
488
hop_limit - INTEGER
489
	Default Hop Limit to set.
490
	Default: 64
491
492
mtu - INTEGER
493
	Default Maximum Transfer Unit
494
	Default: 1280 (IPv6 required minimum)
495
496
router_solicitation_delay - INTEGER
497
	Number of seconds to wait after interface is brought up
498
	before sending Router Solicitations.
499
	Default: 1
500
501
router_solicitation_interval - INTEGER
502
	Number of seconds to wait between Router Solicitations.
503
	Default: 4
504
505
router_solicitations - INTEGER
506
	Number of Router Solicitations to send until assuming no 
507
	routers are present.
508
	Default: 3
509
510
IPv6 Update by:
511
Pekka Savola
512
pekkas@netcore.fi
513
514
$Id: ip-sysctl.txt,v 1.5 2002/08/19 13:34:26 blueflux Exp $
Спасибо!