TCP/IP Basic Knowledge Notes

Application layer: provide users with application functions, such as HTTP, FTP, Telnet, DNS, SMTP, etc.

                The application layer is the user state that works in the operating system, and the transport layer and below work in the kernel state.

Transport layer: Provides network support for the application layer.

                *TCP includes many features such as flow control, timeout retransmission, congestion control, etc., so reliable transmission can be achieved.

                *UDP is only responsible for transmission regardless of whether it arrives or not. It is unreliable transmission, but it has good real-time performance.

                *When the data packet size of the transport layer exceeds MSS (TCP maximum segment length), the data packet must be divided into application layer data packets, and the transport layer is divided into TCP segments;

                *Port: Application number of the application layer.

                *The port number will be carried in the message of the transport layer, so the receiver can identify which application the message is sent to.

                *The actual transmission function is handed over to the next layer as a medium for data transmission between applications to realize application-to-application communication

Network Layer: Responsible for transferring data from one device to another

                *It is necessary to divide the IP address into two meanings:

                        One is the network number , which is responsible for identifying which "subnet" the IP address belongs to;

                        One is the host number , which is responsible for identifying different hosts under the same "subnet";

                * Only the subnet mask can be used to calculate the network number and host number of the IP address.

                        Bitwise AND of IP address and subnet mask to obtain network number

                        Invert the IP address and subnet mask and then bitwise AND to get the host number

                *The IP protocol will use the transport layer message as the data part, and then assemble the IP packet header into an IP message. If the size of the IP message exceeds the MTU (generally 1500 bytes in Ethernet), it will be fragmented again

Network interface layer: responsible for sending data frames on the underlying network such as Ethernet and WiFi

 

 The transmission unit of the network interface layer is the frame (frame)

The transmission unit of the IP layer is the packet

The transmission unit of the TCP layer is a segment (segment)

The transmission unit of HTTP is a message or message (message)

However, there is no essential distinction between these nouns, and they can be collectively referred to as data packets .

Guess you like

Origin blog.csdn.net/m0_61843855/article/details/131730232