TCP/IP is the general name of a group of protocols, including theBeijing website productionApplication layer protocol, transport layer protocol and network layer protocol are shown in Figure 4-3.This section will introduce the working principle of TCP/IP from top to bottom through several common protocols, focusing on the working methods of TCP and IP.
Before introducing the working principle of TCP/IP, the unified network terms to be used are as follows.
It can be seen from Figure 4-4 that in the data communication between host 1 and host 2, the data generated by an application of host 1 needs to be encapsulated from top to bottom through a four layer protocol, and then transmitted to the host through the physical network as bits. After host 2 receives the bit stream, it unpacks the data from bottom to top through a four layer peer layer protocol, and finally the data is delivered to the peer application of host 2.
In the whole process of data transmission, the relevant terms used are: the data unit transmitted in the LAN is called MAC frame;The data units transmitted in the IP network are called IP packets;In the transport layer, the data unit transmitted via TCP protocol is called data packet, and the data unit transmitted via UDP protocol is called datagram;The data generated by the application program is called the message.In addition, when data is transferred between protocol layers, the data transferred between application layer and transport layer is datagram;The data transmitted between the transport layer and the network layer is TCP datagram or UDP datagram;The data transmitted between the network layer and the physical access layer is IP datagram, the data stream entering the communication medium from the network access layer is data frame, and the data signal transmitted in the communication medium is bit stream.This agreement is not absolute. Different textbooks may have different references.