I: Overview Summary
Network transport protocols TCP importance of self-evident, no exaggeration to say that only a deep understanding of the TCP protocol to go further on this road. When school was exposed to it the TCP is a reliable, connection-oriented, byte-stream, full-duplex protocol. TCP series of articles will answer it these general definitions, of course, will be essential to use Wireshark、PacketDrill
other tools, will be in-depth analysis netstat、nc、tcpdump、telnet
and other commonly used Linux network commands. Series after reading all of them are finishing the Nuggets brochure summarizes interest is best to buy a small booklet, written value for money
Two: TCP / IP layered
Excellent architectural design of course will remain single responsibility, TCP / IP protocol model the different responsibilities of the agreement is divided into four hierarchical namely: the application layer , transport layer , network layer , link layer . Each level corresponding protocols have their own responsibility, which is located in the transport layer TCP protocol
Three: TCP protocol structure
Four: protocol header port
When the network traffic in order: 发送端应用层 -- 发送端传输层 -- 发送端网络层 -- 发送端链路层 -- 接收端链路层 -- 接收端网络层 -- 接收端传输层 -- 接收端应用层
to run more than one application on a server certainly, the data packets belonging to a specific application will determine the need to rely on the port, port monitoring application which is commonplace
Five: the first two protocol number
Sequence number and acknowledgment number are important to ensure a safe and reliable TCP protocol, the initial value of the interaction in connection establishment, the subsequent data transmission to ensure that the sequence number packet sequence, an acknowledgment number to ensure that packet arrives. Follow-up will explain in detail the retransmission process connected with the creation of three-way handshake packet loss, which you can see both long-sleeved waving
Six: the first signs agreement
By WireShark capture these flags can be seen in detail in the TCP protocol, identifies the packet type. Which will be part of the handshake SYN, ACK, waving aspects of FIN, and RST, and so close
Seven: protocol header window
Follow-up window will be devoted to the design of TCP sliding window, the window will be derived from the transmitting end transmits, like the receiving end receive window concept. It should be remembered that this window is only connected to each other to tell I receive window size
Eight: protocol header checksum
Network transmission process has many unpredictable factors, the result is likely to result in loss of data transmission packet. Since the TCP protocol is a reliable transport protocol, a natural need to ensure data integrity, and checking the integrity of the role of the receiver is that this value is determined based on the packet
Nine: the first option agreement
There will be many interesting options in the concept of data, such as the more important MSS, Window Scale, SACK and other information, which will be explained in detail in subsequent articles