9.1 Basics of Network Communication

1. Basic concepts:

1) IP address: Describes the location of a device on the network.

2) Port number (port): distinguishes different processes on a host, and has the same function as pid, but the two are different.

3) Protocol: The meaning of network communication transmission data. The protocol represents a convention, which can be arbitrary. After the protocol is layered, the upper layer does not need to know the details of the lower layer protocol, and can flexibly adjust and replace a certain layer protocol.

2. Protocol layering:

1) OSI seven-layer network model (theory, not used):

2) TCP/IP five-layer (four-layer) network model (currently used):

a. Physical layer: Describe the specifications that some infrastructure in network communication needs to abide by (such as network cables, network ports).

b. Data link layer: the way of data transmission between adjacent nodes.

c. Network layer: path planning (there are many roads to choose from between the starting point and the ending point).

d. Transport layer: only care about the starting point and end point, not the process between (where the data starts and where it goes).

e. Application layer: what to use this data for.

3. The basic process of network data transmission (encapsulation and distribution):

1. Encapsulation: Add some protocol information on the basis of the payload, such as the header. In fact, it is the splicing of strings.

2. The data link layer will add frame headers and frame tails, and other protocols only add headers.

3. Dividing is the reverse process of encapsulation, which is peeled off one by one.

おすすめ

転載: blog.csdn.net/m0_73345579/article/details/132159455
9.1