Some humble opinions on TCP

Source: Internet
Author: User

Since childhood, we have been taught TCP three handshake, four times wave.

In fact, textbooks limit our thinking to death, the reality of the situation is more interesting. For example, the server side will also actively "say hi", the client and the server side will also send a syn.

Bo Master summed up the following several machines for the TCP signal response to the so-called "client" and "server-side" are applicable.

Rules for establishing a connection:

1. Received SYN must reply Ack2. When a SYN is received in the listen state, an additional SYN, the SYN + ACK, is restored and converted to the SYN-RCVD State 3. Receive the SYN in the Syn-sent state, also to the SYN-RCVD state 4. Send SYN in Listen state, convert to Syn-sent State 5. Receive ACK under Syn-sent or SYN-RCVD, convert to established close connection rule: 1. Receive fin must reply Ack2. In Establishe D send fin after conversion fin-wait-13. After receiving an ACK in fin-wait-1, convert the fin-wait-24. Received after fin conversion time-wait5 under Fin-wait-2. Fin received at established After conversion close-wait, wait for all data to send fin after delivery, and then convert Last-ack State 6. Receive an ACK under conversion closing7.closing under Fin-wait-1 received under fin After conversion to time-wait8.time-wait wait timer expires (2MSL) after entering closed you can follow this figure a verification: three times handshake four times wave

Some humble opinions on TCP

Related Article

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.