ipvs-sysctl.txt 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. /proc/sys/net/ipv4/vs/* Variables:
  2. am_droprate - INTEGER
  3. default 10
  4. It sets the always mode drop rate, which is used in the mode 3
  5. of the drop_rate defense.
  6. amemthresh - INTEGER
  7. default 1024
  8. It sets the available memory threshold (in pages), which is
  9. used in the automatic modes of defense. When there is no
  10. enough available memory, the respective strategy will be
  11. enabled and the variable is automatically set to 2, otherwise
  12. the strategy is disabled and the variable is set to 1.
  13. backup_only - BOOLEAN
  14. 0 - disabled (default)
  15. not 0 - enabled
  16. If set, disable the director function while the server is
  17. in backup mode to avoid packet loops for DR/TUN methods.
  18. conntrack - BOOLEAN
  19. 0 - disabled (default)
  20. not 0 - enabled
  21. If set, maintain connection tracking entries for
  22. connections handled by IPVS.
  23. This should be enabled if connections handled by IPVS are to be
  24. also handled by stateful firewall rules. That is, iptables rules
  25. that make use of connection tracking. It is a performance
  26. optimisation to disable this setting otherwise.
  27. Connections handled by the IPVS FTP application module
  28. will have connection tracking entries regardless of this setting.
  29. Only available when IPVS is compiled with CONFIG_IP_VS_NFCT enabled.
  30. cache_bypass - BOOLEAN
  31. 0 - disabled (default)
  32. not 0 - enabled
  33. If it is enabled, forward packets to the original destination
  34. directly when no cache server is available and destination
  35. address is not local (iph->daddr is RTN_UNICAST). It is mostly
  36. used in transparent web cache cluster.
  37. debug_level - INTEGER
  38. 0 - transmission error messages (default)
  39. 1 - non-fatal error messages
  40. 2 - configuration
  41. 3 - destination trash
  42. 4 - drop entry
  43. 5 - service lookup
  44. 6 - scheduling
  45. 7 - connection new/expire, lookup and synchronization
  46. 8 - state transition
  47. 9 - binding destination, template checks and applications
  48. 10 - IPVS packet transmission
  49. 11 - IPVS packet handling (ip_vs_in/ip_vs_out)
  50. 12 or more - packet traversal
  51. Only available when IPVS is compiled with CONFIG_IP_VS_DEBUG enabled.
  52. Higher debugging levels include the messages for lower debugging
  53. levels, so setting debug level 2, includes level 0, 1 and 2
  54. messages. Thus, logging becomes more and more verbose the higher
  55. the level.
  56. drop_entry - INTEGER
  57. 0 - disabled (default)
  58. The drop_entry defense is to randomly drop entries in the
  59. connection hash table, just in order to collect back some
  60. memory for new connections. In the current code, the
  61. drop_entry procedure can be activated every second, then it
  62. randomly scans 1/32 of the whole and drops entries that are in
  63. the SYN-RECV/SYNACK state, which should be effective against
  64. syn-flooding attack.
  65. The valid values of drop_entry are from 0 to 3, where 0 means
  66. that this strategy is always disabled, 1 and 2 mean automatic
  67. modes (when there is no enough available memory, the strategy
  68. is enabled and the variable is automatically set to 2,
  69. otherwise the strategy is disabled and the variable is set to
  70. 1), and 3 means that that the strategy is always enabled.
  71. drop_packet - INTEGER
  72. 0 - disabled (default)
  73. The drop_packet defense is designed to drop 1/rate packets
  74. before forwarding them to real servers. If the rate is 1, then
  75. drop all the incoming packets.
  76. The value definition is the same as that of the drop_entry. In
  77. the automatic mode, the rate is determined by the follow
  78. formula: rate = amemthresh / (amemthresh - available_memory)
  79. when available memory is less than the available memory
  80. threshold. When the mode 3 is set, the always mode drop rate
  81. is controlled by the /proc/sys/net/ipv4/vs/am_droprate.
  82. expire_nodest_conn - BOOLEAN
  83. 0 - disabled (default)
  84. not 0 - enabled
  85. The default value is 0, the load balancer will silently drop
  86. packets when its destination server is not available. It may
  87. be useful, when user-space monitoring program deletes the
  88. destination server (because of server overload or wrong
  89. detection) and add back the server later, and the connections
  90. to the server can continue.
  91. If this feature is enabled, the load balancer will expire the
  92. connection immediately when a packet arrives and its
  93. destination server is not available, then the client program
  94. will be notified that the connection is closed. This is
  95. equivalent to the feature some people requires to flush
  96. connections when its destination is not available.
  97. expire_quiescent_template - BOOLEAN
  98. 0 - disabled (default)
  99. not 0 - enabled
  100. When set to a non-zero value, the load balancer will expire
  101. persistent templates when the destination server is quiescent.
  102. This may be useful, when a user makes a destination server
  103. quiescent by setting its weight to 0 and it is desired that
  104. subsequent otherwise persistent connections are sent to a
  105. different destination server. By default new persistent
  106. connections are allowed to quiescent destination servers.
  107. If this feature is enabled, the load balancer will expire the
  108. persistence template if it is to be used to schedule a new
  109. connection and the destination server is quiescent.
  110. nat_icmp_send - BOOLEAN
  111. 0 - disabled (default)
  112. not 0 - enabled
  113. It controls sending icmp error messages (ICMP_DEST_UNREACH)
  114. for VS/NAT when the load balancer receives packets from real
  115. servers but the connection entries don't exist.
  116. secure_tcp - INTEGER
  117. 0 - disabled (default)
  118. The secure_tcp defense is to use a more complicated TCP state
  119. transition table. For VS/NAT, it also delays entering the
  120. TCP ESTABLISHED state until the three way handshake is completed.
  121. The value definition is the same as that of drop_entry and
  122. drop_packet.
  123. sync_threshold - INTEGER
  124. default 3
  125. It sets synchronization threshold, which is the minimum number
  126. of incoming packets that a connection needs to receive before
  127. the connection will be synchronized. A connection will be
  128. synchronized, every time the number of its incoming packets
  129. modulus 50 equals the threshold. The range of the threshold is
  130. from 0 to 49.
  131. snat_reroute - BOOLEAN
  132. 0 - disabled
  133. not 0 - enabled (default)
  134. If enabled, recalculate the route of SNATed packets from
  135. realservers so that they are routed as if they originate from the
  136. director. Otherwise they are routed as if they are forwarded by the
  137. director.
  138. If policy routing is in effect then it is possible that the route
  139. of a packet originating from a director is routed differently to a
  140. packet being forwarded by the director.
  141. If policy routing is not in effect then the recalculated route will
  142. always be the same as the original route so it is an optimisation
  143. to disable snat_reroute and avoid the recalculation.
  144. sync_version - INTEGER
  145. default 1
  146. The version of the synchronisation protocol used when sending
  147. synchronisation messages.
  148. 0 selects the original synchronisation protocol (version 0). This
  149. should be used when sending synchronisation messages to a legacy
  150. system that only understands the original synchronisation protocol.
  151. 1 selects the current synchronisation protocol (version 1). This
  152. should be used where possible.
  153. Kernels with this sync_version entry are able to receive messages
  154. of both version 1 and version 2 of the synchronisation protocol.