View network status with netstat

Source: Internet
Author: User

SYN: (Synchronous Sequence number, Synchronize Sequence Numbers) this flag is valid only when three handshakes are used to establish a TCP connection. Indicates a New TCP connection request.

ACK: (Confirmation Number, Acknowledgement Number) indicates the confirmation of TCP requests, and prompts that the peer system has successfully received all data.

FIN: (End sign, FINish) is used to end a TCP session. However, the corresponding port is still open and is ready to receive subsequent data.

2) SYN_SENT: the client uses the application to call connect for active open. Therefore, the client tcp sends a SYN request to establish a connection. Then, the status is set to SYN_SENT.

The formation of TIME_WAIT status only occurs on the party that closes the connection.
After receiving the FIN request from the passive closing party, the active closing party changes its status from FIN_WAIT2 to TIME_WAIT after successfully sending an ACK to the other party, however, you must wait two times of MSL (Maximum Segment Lifetime, which is the time when a datagram exists in the internetwork) before both parties can change the status to CLOSED to close the connection. Currently, the time required to maintain the TIME_WAIT status in RHEL is 60 seconds.

2. About persistent connections and short connections:
In layman's terms: a short connection is a result of a TCP request, and the connection ends immediately. the persistent connection is not immediately disconnected, but maintained until the persistent connection TIMEOUT (the specific program has related parameter descriptions ). persistent connections can avoid TCP three-way handshakes and four waves.
Keepalive is maintained by the two parties continuously sending probe packets. During keepalive, the TCP connection status between the server and the client is ESTABLISHED. currently, keepalive is used by default in http 1.1 (keepalive is disabled by default in http 1.0 ), both ie6, 7/8, and firefox use http 1.1 by default (here we will not go into details about how to check which version is used by the current browser ). Apache, java

1. keepalive parameters for Linux

Default.
B. tcp_keepalive_probes-INTEGER
How many keepalive probes TCP sends out, until it decides that
Connection is broken. Default value.
C. tcp_keepalive_intvl-INTEGER
How frequently the probes are send out. Multiplied
Tcp_keepalive_probes it is time to kill not responding connection,
After probes started. Default value I. e. connection
Will be aborted after minutes of retries.

2. F5 Server Load balancer Parameters

Specify Specifies the interval at which the system sends data over an idle connection, to determine whether the connection is still valid. The defaultIs milliseconds.
B. Time Wait
Specifies the length of time that a TCP connection remains in the TIMEWAIT state before entering the CLOSED state.
Specify Specifies the number of milliseconds that a TCP connection can remain in the TIMEWAIT state. The defaultIs.

Specifies the length of time that a connection is idle (has no traffic) before the connection is eligibleDeletion.
Specify Specifies a number of seconds that the TCP connection can remain idle before the system deletes it. The defaultIs seconds.

3. Apache Parameters
The following are the default parameters and descriptions for Apache/2.0.61.

DefaultOn. Whether or not to allow persistent connections (more
One request per connection). Set to "Off" to deactivate.
B. MaxKeepAliveRequests
Default. The maximum number of requests to allow
During a persistent connection. Set to allow an unlimited amount.
We recommend you leave thisNumber high,Maximum performance.
C. KeepAliveTimeout
Default. Number of seconds to waitThe next request from
Same client on the same connection.


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.