Summary of basic knowledge about the Internet

Table of contents

IP address

The port number

protocol

Protocol layering

TCP/IP five-layer model

 Transmission process

 receiving process


IP address

IP addresses are mainly used to identify network hosts and other network devices (such as routers).

in other words

IP is the ID card of the host in the network. The address of the host in the network can be located through the IP address.

The port number

In network communications, the IP address is used to identify the host network address, and the port number can identify the process in the host that sends and receives data.

in other words

When we identify the IP address and send the data to the corresponding IP address, the port number is the address of a process on the host, allowing the data to find the corresponding process (such as QQ Music, Bilibili, these have unique port number)

protocol

Protocol, short for network protocol, is a set of conventions and rules that all network devices passing through network communication (i.e. network data transmission) must comply with. Such as how to establish a connection, how to identify each other, etc. Only by complying with this agreement can computers communicate with each other.

in other words

If I want to transmit data from one host to another over the network, both the sending and receiving parties must abide by the same rules/agreements. This rule is called a protocol.

Protocol layering

Because the network environment changes at any time and is very complex, in order to ensure stability and facilitate programmers' maintenance, we split the protocol into multiple small protocols

The most widely used among them is

TCP/IP five-layer model

 Transmission process

For example, if I send a message to a sister on QQ, he will go through the following steps:

1. QQ obtains this message at the application layer, packages it, and transmits it to the transport layer

2. The transport layer adds its own header to the obtained message and then packages it and transmits it to the network layer.

3. The message obtained by the network layer adds its own header and then packages it and transmits it to the data link layer.

4. The data link layer packages the obtained message, adds its own header, and then transmits it to the physical layer

5. The physical layer passes the obtained message to the other party through the network

 receiving process

1. The physical layer obtains the packets passed on the network and forwards them to the data link layer

2. The data link layer parses the packet, removes its own header, and then passes the packet to the network layer

3. The network layer parses the packet, removes its own header, and then passes the packet to the transport layer

4. The transport layer parses the packet, removes its own header, and then passes the packet to the application layer

5. The application layer parses the packet, finds the corresponding port process (QQ), and lets QQ process the message on its own.

 

Guess you like

Origin blog.csdn.net/qq_62718027/article/details/131373407