In-depth analysis of each layer of the tcp ip protocol stack (1)

Source: Internet
Author: User

If you know a lot about the network protocol and know the large user of the tcp ip network protocol, we need to know a lot about the tcp ip protocol, this time, we will focus on the content of the protocol stack. We know that the tcp ip protocol stack is divided into four layers: Application layer, Transport layer Transport, Network layer, and Link layer, as shown in.

Figure tcp ip protocol stack

The process of communication between the two computers through the tcp ip protocol is as follows:

Figure TCP/IP communication process

The transport layer and its following mechanisms are provided by the kernel, and the application layer is provided by the user process. Later, we will introduce how to use the socket API to write applications.) The application will explain the meaning of the communication data, the transmission layer and its following processes the communication details and sends the data from one computer to another through a certain path. when application layer data is sent to the network through the protocol stack, a data header must be added to each layer of the Protocol), which is called Encapsulation), as shown in

Figure encapsulation of TCP/IP packets

Different protocol layers have different names for data packets. The transport layer is called segment, and the network layer is called the datagram datasync). The link layer is called the frame ). data is encapsulated into frames and sent to the transmission media. After arriving at the target host, the Protocol at each layer is removed from the corresponding header. Finally, the application layer data is handed over to the application for processing.

It corresponds to the situation where two computers are in the same CIDR block. If the two computers are in different CIDR blocks, data must be transmitted from one computer to another through one or more routers, as shown in

Figure cross-router communication process


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.