ipvs-sysctl.txt 7.4 KB

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