In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you what is the first format of the TCP data segment, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
After understanding the meaning of the fields in the header of TCP, we can understand the TCP protocol more clearly. 20 bytes of the first byte of the TCP are fixed, followed by an optional option. The TCP is aligned in 32 bits (4 bytes).
Source and destination ports: TCP communicates between application processes through common slogans.
The serial number: occupies 32 bits, and the range of the serial number is 0 ~ (2 ^ 32-1). When the serial number becomes 2 ^ 32-1, the next serial number will start again from 0. If the sequence number of a message segment is 1001 and its length is 100 bytes, the sequence number of the next message segment is 1101.
Confirmation number: 32 digits. The confirmation number acknowledges the packet received. If A sends a message segment to B, the sequence number of An is 101 and the length of the message segment is 100 bytes, then B needs to send a confirmation message to An after receiving the message segment, and the confirmation number in this confirmation message segment is 201. There are the following formulas:
If the confirmation number is Number1, then all data up to the serial number N has been received.
Data offset: this field represents the length of the header of the tcp. This field occupies 4 bits and is 4 bytes. Therefore, the maximum header of a TCP is 60 bytes.
Six control bits: each control bit occupies only one bit.
UGR: emergency field. When the value is 1, this message segment contains emergency data and should be sent first. This field needs to be used in conjunction with the emergency pointer that will be discussed later.
ACK: confirm field. This field is used when establishing and disconnecting, and the data transfer phase is always 1.
PSH: push field. A value of 1 indicates data with the push flag, indicating that after receiving the message segment, the receiver should give the message segment to the application as soon as possible, rather than queuing in the buffer.
RST: resets the connection field log. Used to reset a connection that went wrong due to a host crash or other reason. Or it can be used to reject illegal message segments and reject connection requests.
SYN: synchronization field. Used to establish a connection.
FIN: termination field. Used when releasing connections.
Window: 16 bits. The range of window values is an integer between [0,2 ^ 16-1]. Note that it represents the accept window and the number of bytes allowed to be accepted. For example, B sends a confirmation message to A with a confirmation number of 101 and a window value of 1000. Then it means that the sequence number of the next accepted message segment in B should be 101, and the length of the message segment should not exceed 1000 bytes.
Checksum: 16 places. It is used to check if there are any mistakes in the paragraph of the newspaper.
Emergency pointer: 16 bits. This field is interesting only if the URG field is 1. It represents the length of emergency data
The above is all the content of the article "what is the first format of the TCP data segment". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 247
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.