New Understanding of TCP/IP protocol (3)

Source: Internet
Author: User

New Understanding of the TCP/IP protocol (3) the two ends connected by the tcp protocol have some differences in the details of the Protocol during communication. The seq in the connection initiator syn in the connection establishment phase differs from the seq in the syn of the connection receiver. 1. When the connection is established, both parties need to report their seq start value and sliding window size, the use of the maximum number of bytes of the packet sliding window, so that the two ends of the communication do not need to receive a data, immediately issue ack, can always send, as long as seq does not exceed the initial seq value + Sliding Window value, the seq in the ack of the data receiver is equal to the seq + Data Length of the Data sender, sometimes the data may be received multiple times, each time an ack is sent, data must be copied from the application layer to the kernel, before sending data, check whether the connection has an abnormal connection. In the fin initiated by the closed connection, the seq value is the same as the seq value of the Connection closed ack. In the tcp protocol, there is an important protocol command reset, reset indicates resetting the connection. Generally, when the server verifies that the client information is inconsistent, rst is sent to the client. This command is often used by the server to restart unexpectedly, and many firewalls also use it to disconnect the client. The initiator of the reset command. When the reset command is sent, all packets in the sending buffer are cleared, and the receiver's data in the receiving buffer is cleared. The fin command is normally shut down and will be sent according to the buffer sequence, that is, the fin packet will be sent only after all the data before sending the fin, so the rst is used to close the connection abnormally.

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.