Network Parameters in proc file system (2)

Source: Internet
Author: User
Article Title: network parameters in the proc file system (2 ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Tcp_max_orphans: INTEGER

The default value is 8192.

The maximum number of TCP sockets that the system can process for any process. What if the number is exceeded? Connections that do not belong to any process will be immediately reset and a warning will be displayed. Is this restriction set? Simply to defend against those simple DoS attacks? Do not rely on this or manually reduce this limit (this value is set to 32768 in the Redhat AS version, but it is recommended that this value be modified to 2000 when many firewalls are modified)

Tcp_abort_on_overflow: BOOLEAN

The default value is 0.

When the daemon is too busy to accept new connections, it is like the other party sending a reset message. The default value is false. This means that when the cause of overflow is an accidental burst, the connection will be restored. This option is enabled only when you are sure that the daemon cannot complete the connection request. This option affects your use. (For services such as sendmail and apache that are already fully loaded, this can quickly cause the client to terminate the connection and give the service program the opportunity to process the buffer of existing connections. Therefore, we recommend that you enable sendmail on many firewalls)

Tcp_syncookies: BOOLEAN

The default value is 0.

Only CONFIG_SYNCOOKIES are selected during kernel compilation. Syncookies are sent when the syn wait queue overflows. The objective is to prevent syn flood attacks.

Note: This option cannot be used on high-load servers that do not receive attacks. If a synflood message appears in the log, but the investigation finds that the synflood attack is not received, the reason is that the connection load of legal users is too high. You should adjust other parameters to improve server performance. Refer:

Tcp_max_syn_backlog

Tcp_synack_retries

Tcp_abort_on_overflow

Syncookie seriously violates the TCP protocol and does not allow the use of TCP extensions, which may cause serious performance impact on some services (such as SMTP forwarding ). (Note: This implementation is the same as the tcp proxy used in BSD. It violates the three-way handshake Implementation of tcp connections in RFC, but it is useful for defending syn-flood .)

Tcp_stdurg: BOOLEAN

The default value is 0.

Use the host request interpretation function in the TCP urg pointer field. Most hosts use old BSD interpretations, So if you open it in Linux? It may lead to failure to communicate with them correctly.

Tcp_max_syn_backlog: INTEGER

For connection requests that are still not confirmed by the client? The maximum number of messages to be saved in the queue. For systems with more than 128 Mb of memory? The default value is 1024? If it is less than 128 Mb, It is 128. If the server is often overloaded? You can try to add this number. Warning? If you set this value to greater than 1024? It is best to modify the TCP_SYNQ_HSIZE in include/net/tcp. h? To keep TCP_SYNQ_HSIZE * 16 <= tcp_max_syn_backlog? And compiled into the core. (SYN Flood attack uses the TCP protocol to spread the handshake defect, forged fake source IP address to send a large number of TCP-SYN semi-open connection to the target system, eventually lead to the target system Socket queue resource depletion and unable to accept the new connection. To cope with such attacks, modern Unix systems generally use multi-connection queue processing to buffer (rather than solve) such attacks, it is a fully connected application (Connect () and Accept () that processes normally using a basic queue. It is a semi-open connection that is separately stored in another queue. This dual-queue processing method can effectively mitigate small-scale Syn Flood attacks when combined with other system kernel measures (such as SYN-Cookies/Caches) (it turns out <1000 p/s) increasing the length of the SYN queue can accommodate more network connections waiting for connection. Therefore, you can increase the length of the Server .)

Tcp_window_scaling: INTEGER

The default value is 1.

This file indicates whether the size of the hop window of the TCP/IP session is variable. The parameter value is a Boolean value. If it is 1, it indicates variable. If it is 0, it indicates non-variable. TCP/IP usually uses a window of up to 65535 bytes. for high-speed networks, this value may be too small. If this function is enabled, the TCP/IP sliding window size can be increased by several orders of magnitude to improve the data transmission capability (RFC 1323 ). (For an ordinary M network, disabling it will reduce the overhead, so if it is not a high-speed network, you can consider setting it to 0)

Tcp_timestamps: BOOLEAN

The default value is 1.

Timestamps is used in other things? This prevents forged sequence numbers. A 1g broadband line may re-encounter an old sequence number with an out-of-line value (if it was generated last time ). Timestamp will let it know that this is an 'old package '. (This file indicates whether to enable RTT computing in a more accurate way than timeout resend (RFC 1323). This option should be enabled for better performance .)

Tcp_sack: BOOLEAN

The default value is 1.

Use Selective ACK? It can be used to find specific lost datagram, which helps to quickly restore the status. This file indicates whether Selective Acknowledgment is enabled ), this can improve the performance by selectively responding to messages received in disordered Order (this allows the sender to send only lost packets ). (This option should be enabled for Wan communication, but this will increase CPU usage .)

Tcp_fack: BOOLEAN

The default value is 1.

Enable the FACK congestion avoidance and fast retransmission functions. (Note: When tcp_sack is set to 0, this value is invalid even if it is set to 1)

Tcp_dsack: BOOLEAN

The default value is 1.

Allow TCP to send "two identical" SACK messages.

Tcp_ecn: BOOLEAN

The default value is 0.

Enable the direct Congestion Notification function of TCP.

Tcp_reordering: INTEGER

The default value is 3.

Maximum number of datagram in a TCP stream. (We recommend that you slightly adjust this value, for example, 5)

Tcp_retrans_collapse: BOOLEAN

The default value is 1.

It provides compatibility with bugs for some printers. (You can disable this feature if you do not need this feature)

Tcp_wmem (3 INTEGER variables): min, default, max

Min: The minimum memory size reserved for the TCP socket for sending buffering. Each tcp socket can be used later. The default value is 4096 (4 K ).

Default: The amount of memory reserved for the TCP socket for sending buffering. By default, this value affects the net. core. wmem_default value, generally lower than net. core. the value of wmem_default. The default value is 16384 (16 K ).

Max: maximum memory used for TCP socket sending buffer. This value does not affect net. core. wmem_max. The "static" parameter SO_SNDBUF is not affected. The default value is 131072 (128 K ). (For the server, adding this parameter value is helpful for sending data. In my network environment, it is changed to 51200 131072 204800)

[1] [2] [3] Next page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.