This is a preface, which first takes you to understand some basic information of the transport layer. The following chapters will capture packets with pictures to understand specific details

What is the TCP/IP protocol

  • TCP/IP (Transmission Control Protocol/Internet Protocol) is not a single protocol, but a group of special protocols, including TCP, IP, UDP, ARP, etc. These are called sub-protocols. Of these protocols, the most important and well-known are TCP and IP. Therefore, most network administrators refer to the entire protocol family as TCP/IP.

  • TCP/IP’s rapid popularity can be attributed to its low cost, ability to communicate across different platforms, and its open nature. “Open” means that software developers are free to use and modify TCP/IP’s core protocols. TCP/IP is the actual standard used on the Internet. UNIX and Linux have always used TCP/IP, and Windows network operating systems use TCP/IP as the default protocol.

Network layering concept

  • The link layer
  • The network layer
  • The transport layer
  • The application layer

  1. Layer 1: Network interface layer: the lowest layer of TCP/IP, which manages the actual network media, including device drivers in the operating system and network interfaces corresponding to computers
  2. Layer 2: Network layer: This layer is responsible for communication between computers on the same or different networks. It mainly deals with packets and routing. A packet is the smallest unit of data transmitted over a network. To send a packet to a peer over a transmission route. IP,ICMP, and IGMP protocols. In the IP layer, ARP is used to translate IP addresses into physical addresses, and ICMP is used to report errors and transmit control information. IP protocol is the core of TCP/IP protocol group.
  3. Layer 3: Transport layer: provides two protocols, TCP(Transmission control Protocol) and UDP (User Datagram Protocol), which are used to format data, confirm data, and retransmit lost data.
  4. Layer 4: Application layer: The application layer of TCP/IP protocol is equivalent to the session layer, presentation layer and application layer of OSI model, FTP(file transfer protocol), DNS (domain name System), HTTP protocol, Telnet (Network remote access protocol), and various application services

This paper focuses on layer 3 TCP transmission control protocol

The paper

TCP sorts packets, checks for errors, and connects virtual circuits. TCP packets contain ordinals and acknowledgements, so out-of-order packets can be sorted and damaged packets can be retransmitted.

TCP is connection-oriented. Before either party sends data to the other, a connection must be established between the two parties. In TCP/IP, TCP provides a reliable connection service that is initialized with a three-way handshake. The purpose of the three-way handshake is to synchronize the serial numbers and confirmation numbers of the two connected parties and exchange TCP window size information.

TCP package structure

Ethernet packets are fixed in size, starting at 1518 bytes and later increasing to 1522 bytes. 1500 bytes are payload and 22 bytes are head information. The Maximum Transmission Unit (MTU) is 1500

TCP packet size: MTU Byte size 1500-IP header information 20-TCP header length 20-TCP timestrap Option12 = 1448 bytes

According to the figure above, it can be known that IP packets are in Ethernet packets and TCP packets are in IP packets.

— — — — — — — — — — — — — — this article wrote this — — — — — — — — — — followed by everyone to learn more about the details of the three-way handshake, there will be caught in field take you through the theory of boring time