brintos

brintos / linux-shallow public Read only

0
0
Text · 11.4 KiB · 3fb5fa1 Raw
333 lines · plain
1.. SPDX-License-Identifier: GPL-2.02 3===========4IPvs-sysctl5===========6 7/proc/sys/net/ipv4/vs/* Variables:8==================================9 10am_droprate - INTEGER11	default 1012 13	It sets the always mode drop rate, which is used in the mode 314	of the drop_rate defense.15 16amemthresh - INTEGER17	default 102418 19	It sets the available memory threshold (in pages), which is20	used in the automatic modes of defense. When there is no21	enough available memory, the respective strategy will be22	enabled and the variable is automatically set to 2, otherwise23	the strategy is disabled and the variable is  set  to 1.24 25backup_only - BOOLEAN26	- 0 - disabled (default)27	- not 0 - enabled28 29	If set, disable the director function while the server is30	in backup mode to avoid packet loops for DR/TUN methods.31 32conn_reuse_mode - INTEGER33	1 - default34 35	Controls how ipvs will deal with connections that are detected36	port reuse. It is a bitmap, with the values being:37 38	0: disable any special handling on port reuse. The new39	connection will be delivered to the same real server that was40	servicing the previous connection.41 42	bit 1: enable rescheduling of new connections when it is safe.43	That is, whenever expire_nodest_conn and for TCP sockets, when44	the connection is in TIME_WAIT state (which is only possible if45	you use NAT mode).46 47	bit 2: it is bit 1 plus, for TCP connections, when connections48	are in FIN_WAIT state, as this is the last state seen by load49	balancer in Direct Routing mode. This bit helps on adding new50	real servers to a very busy cluster.51 52conntrack - BOOLEAN53	- 0 - disabled (default)54	- not 0 - enabled55 56	If set, maintain connection tracking entries for57	connections handled by IPVS.58 59	This should be enabled if connections handled by IPVS are to be60	also handled by stateful firewall rules. That is, iptables rules61	that make use of connection tracking.  It is a performance62	optimisation to disable this setting otherwise.63 64	Connections handled by the IPVS FTP application module65	will have connection tracking entries regardless of this setting.66 67	Only available when IPVS is compiled with CONFIG_IP_VS_NFCT enabled.68 69cache_bypass - BOOLEAN70	- 0 - disabled (default)71	- not 0 - enabled72 73	If it is enabled, forward packets to the original destination74	directly when no cache server is available and destination75	address is not local (iph->daddr is RTN_UNICAST). It is mostly76	used in transparent web cache cluster.77 78debug_level - INTEGER79	- 0          - transmission error messages (default)80	- 1          - non-fatal error messages81	- 2          - configuration82	- 3          - destination trash83	- 4          - drop entry84	- 5          - service lookup85	- 6          - scheduling86	- 7          - connection new/expire, lookup and synchronization87	- 8          - state transition88	- 9          - binding destination, template checks and applications89	- 10         - IPVS packet transmission90	- 11         - IPVS packet handling (ip_vs_in/ip_vs_out)91	- 12 or more - packet traversal92 93	Only available when IPVS is compiled with CONFIG_IP_VS_DEBUG enabled.94 95	Higher debugging levels include the messages for lower debugging96	levels, so setting debug level 2, includes level 0, 1 and 297	messages. Thus, logging becomes more and more verbose the higher98	the level.99 100drop_entry - INTEGER101	- 0  - disabled (default)102 103	The drop_entry defense is to randomly drop entries in the104	connection hash table, just in order to collect back some105	memory for new connections. In the current code, the106	drop_entry procedure can be activated every second, then it107	randomly scans 1/32 of the whole and drops entries that are in108	the SYN-RECV/SYNACK state, which should be effective against109	syn-flooding attack.110 111	The valid values of drop_entry are from 0 to 3, where 0 means112	that this strategy is always disabled, 1 and 2 mean automatic113	modes (when there is no enough available memory, the strategy114	is enabled and the variable is automatically set to 2,115	otherwise the strategy is disabled and the variable is set to116	1), and 3 means that the strategy is always enabled.117 118drop_packet - INTEGER119	- 0  - disabled (default)120 121	The drop_packet defense is designed to drop 1/rate packets122	before forwarding them to real servers. If the rate is 1, then123	drop all the incoming packets.124 125	The value definition is the same as that of the drop_entry. In126	the automatic mode, the rate is determined by the follow127	formula: rate = amemthresh / (amemthresh - available_memory)128	when available memory is less than the available memory129	threshold. When the mode 3 is set, the always mode drop rate130	is controlled by the /proc/sys/net/ipv4/vs/am_droprate.131 132est_cpulist - CPULIST133	Allowed	CPUs for estimation kthreads134 135	Syntax: standard cpulist format136	empty list - stop kthread tasks and estimation137	default - the system's housekeeping CPUs for kthreads138 139	Example:140	"all": all possible CPUs141	"0-N": all possible CPUs, N denotes last CPU number142	"0,1-N:1/2": first and all CPUs with odd number143	"": empty list144 145est_nice - INTEGER146	default 0147	Valid range: -20 (more favorable) .. 19 (less favorable)148 149	Niceness value to use for the estimation kthreads (scheduling150	priority)151 152expire_nodest_conn - BOOLEAN153	- 0 - disabled (default)154	- not 0 - enabled155 156	The default value is 0, the load balancer will silently drop157	packets when its destination server is not available. It may158	be useful, when user-space monitoring program deletes the159	destination server (because of server overload or wrong160	detection) and add back the server later, and the connections161	to the server can continue.162 163	If this feature is enabled, the load balancer will expire the164	connection immediately when a packet arrives and its165	destination server is not available, then the client program166	will be notified that the connection is closed. This is167	equivalent to the feature some people requires to flush168	connections when its destination is not available.169 170expire_quiescent_template - BOOLEAN171	- 0 - disabled (default)172	- not 0 - enabled173 174	When set to a non-zero value, the load balancer will expire175	persistent templates when the destination server is quiescent.176	This may be useful, when a user makes a destination server177	quiescent by setting its weight to 0 and it is desired that178	subsequent otherwise persistent connections are sent to a179	different destination server.  By default new persistent180	connections are allowed to quiescent destination servers.181 182	If this feature is enabled, the load balancer will expire the183	persistence template if it is to be used to schedule a new184	connection and the destination server is quiescent.185 186ignore_tunneled - BOOLEAN187	- 0 - disabled (default)188	- not 0 - enabled189 190	If set, ipvs will set the ipvs_property on all packets which are of191	unrecognized protocols.  This prevents us from routing tunneled192	protocols like ipip, which is useful to prevent rescheduling193	packets that have been tunneled to the ipvs host (i.e. to prevent194	ipvs routing loops when ipvs is also acting as a real server).195 196nat_icmp_send - BOOLEAN197	- 0 - disabled (default)198	- not 0 - enabled199 200	It controls sending icmp error messages (ICMP_DEST_UNREACH)201	for VS/NAT when the load balancer receives packets from real202	servers but the connection entries don't exist.203 204pmtu_disc - BOOLEAN205	- 0 - disabled206	- not 0 - enabled (default)207 208	By default, reject with FRAG_NEEDED all DF packets that exceed209	the PMTU, irrespective of the forwarding method. For TUN method210	the flag can be disabled to fragment such packets.211 212secure_tcp - INTEGER213	- 0  - disabled (default)214 215	The secure_tcp defense is to use a more complicated TCP state216	transition table. For VS/NAT, it also delays entering the217	TCP ESTABLISHED state until the three way handshake is completed.218 219	The value definition is the same as that of drop_entry and220	drop_packet.221 222sync_threshold - vector of 2 INTEGERs: sync_threshold, sync_period223	default 3 50224 225	It sets synchronization threshold, which is the minimum number226	of incoming packets that a connection needs to receive before227	the connection will be synchronized. A connection will be228	synchronized, every time the number of its incoming packets229	modulus sync_period equals the threshold. The range of the230	threshold is from 0 to sync_period.231 232	When sync_period and sync_refresh_period are 0, send sync only233	for state changes or only once when pkts matches sync_threshold234 235sync_refresh_period - UNSIGNED INTEGER236	default 0237 238	In seconds, difference in reported connection timer that triggers239	new sync message. It can be used to avoid sync messages for the240	specified period (or half of the connection timeout if it is lower)241	if connection state is not changed since last sync.242 243	This is useful for normal connections with high traffic to reduce244	sync rate. Additionally, retry sync_retries times with period of245	sync_refresh_period/8.246 247sync_retries - INTEGER248	default 0249 250	Defines sync retries with period of sync_refresh_period/8. Useful251	to protect against loss of sync messages. The range of the252	sync_retries is from 0 to 3.253 254sync_qlen_max - UNSIGNED LONG255 256	Hard limit for queued sync messages that are not sent yet. It257	defaults to 1/32 of the memory pages but actually represents258	number of messages. It will protect us from allocating large259	parts of memory when the sending rate is lower than the queuing260	rate.261 262sync_sock_size - INTEGER263	default 0264 265	Configuration of SNDBUF (master) or RCVBUF (slave) socket limit.266	Default value is 0 (preserve system defaults).267 268sync_ports - INTEGER269	default 1270 271	The number of threads that master and backup servers can use for272	sync traffic. Every thread will use single UDP port, thread 0 will273	use the default port 8848 while last thread will use port274	8848+sync_ports-1.275 276snat_reroute - BOOLEAN277	- 0 - disabled278	- not 0 - enabled (default)279 280	If enabled, recalculate the route of SNATed packets from281	realservers so that they are routed as if they originate from the282	director. Otherwise they are routed as if they are forwarded by the283	director.284 285	If policy routing is in effect then it is possible that the route286	of a packet originating from a director is routed differently to a287	packet being forwarded by the director.288 289	If policy routing is not in effect then the recalculated route will290	always be the same as the original route so it is an optimisation291	to disable snat_reroute and avoid the recalculation.292 293sync_persist_mode - INTEGER294	default 0295 296	Controls the synchronisation of connections when using persistence297 298	0: All types of connections are synchronised299 300	1: Attempt to reduce the synchronisation traffic depending on301	the connection type. For persistent services avoid synchronisation302	for normal connections, do it only for persistence templates.303	In such case, for TCP and SCTP it may need enabling sloppy_tcp and304	sloppy_sctp flags on backup servers. For non-persistent services305	such optimization is not applied, mode 0 is assumed.306 307sync_version - INTEGER308	default 1309 310	The version of the synchronisation protocol used when sending311	synchronisation messages.312 313	0 selects the original synchronisation protocol (version 0). This314	should be used when sending synchronisation messages to a legacy315	system that only understands the original synchronisation protocol.316 317	1 selects the current synchronisation protocol (version 1). This318	should be used where possible.319 320	Kernels with this sync_version entry are able to receive messages321	of both version 1 and version 2 of the synchronisation protocol.322 323run_estimation - BOOLEAN324	0 - disabled325	not 0 - enabled (default)326 327	If disabled, the estimation will be suspended and kthread tasks328	stopped.329 330	You can always re-enable estimation by setting this value to 1.331	But be careful, the first estimation after re-enable is not332	accurate.333