What exactly is the TCP/IP protocol talking about? 【Lebo TestPro】

Use metaphors and comics to explain the relationship between various protocols and HTTP protocols to those in need.

content:

IP protocol responsible for transmission
TCP protocol to ensure reliability
Relationship between various protocols and HTTP protocol

1. IP protocol responsible for transmission

insert image description here

According to the level, IP (full name: Internet Protocol) network protocol is located in the network layer. The name Internet Protocol sounds exaggerated, but in fact all systems that use the Internet use the IP protocol. IP in the TCP/IP protocol suite refers to the Internet Protocol, which occupies a general position in the protocol name. Some people may confuse "IP" with "IP address", "IP" is actually the name of a protocol.

The role of the IP protocol is to transmit various data packets to the other party, and to ensure that they are indeed transmitted to the other party, and various conditions need to be met. Two important conditions are IP address and MAC address (Media Access Control Address)

The IP address indicates the address to which the node is assigned, and the MAC address refers to the fixed address to which the network card belongs. IP addresses can be paired with MAC addresses. The IP address can be changed, but the MAC address basically does not change.

The ARP protocol is used to communicate by means of MAC addresses.

Communication between IPs relies on MAC addresses. On the network, it is rare that the two communicating parties are in the same local area network (LAN), and it is usually only after multiple computers and network devices that they can connect to each other. During the transfer, the MAC address of the next-stop transfer device will be used to search for the next transfer destination. At this time, the ARP protocol (Address Resolution Protocol) will be used. ARP is a protocol used to resolve addresses, and the corresponding MAC address can be found out according to the IP address of the communicating party. No one can fully grasp the transmission status in the Internet. During the transit process before reaching the communication target, those network devices such as computers and routers can only learn a very rough transmission route. Communication between them relies on MAC addresses. On the network, it is rare that the two communicating parties are in the same local area network (LAN), and it is usually only after multiple computers and network devices that they can connect to each other. During the transfer, the MAC address of the next-stop transfer device will be used to search for the next transfer destination. At this time, the ARP protocol (Address Resolution Protocol) will be used. ARP is a protocol used to resolve addresses, and the corresponding MAC address can be found out according to the IP address of the communicating party. No one can fully grasp the transmission status in the Internet. During the transit process before reaching the communication target, those network devices such as computers and routers can only learn a very rough transmission route.

This mechanism becomes the router of choice, a bit like the delivery process of a courier company. People who want to send express, as long as they send their goods to the distribution center, they can know whether the express company is willing to receive and deliver the goods. The distribution center of the express company checks the delivery address of the goods and makes clear which area to send to the next station. distribution center. Then, the distribution center in that area will automatically determine whether it can be delivered to the other party's home.

The TCP protocol to ensure reliability is
divided into layers. TCP is located at the transport layer and provides reliable byte stream services.

The so-called byte stream service refers to the convenience of transmission, dividing large blocks of data into data packets in segments (segment) for management. The reliable transmission service means that the data can be accurately and reliably transmitted to the other party. The TCP protocol divides the data to make it easier to transmit large data, and the TCP protocol can confirm whether the data is finally sent to the other party.

Make sure data reaches its target

In order to accurately deliver the data to the destination, the TCP protocol adopts a three-way handshake strategy. After the data packet is sent out with the TCP protocol, TCP will not ignore the situation after transmission, and it will definitely confirm to the other party whether it is successfully delivered.

The TCP flag (flag) - SYN (synchronize) and ACK (acknowledgement) is used in the handshake process. The sender first sends a data packet with the SYN flag to the other party. After the receiving end receives it, it returns a data packet with the SYN/ACK flag to convey confirmation information. Finally, the sender sends back a data packet with an ACK flag, which means the end of the "handshake". If the handshake process is interrupted inexplicably at some stage, the TCP protocol will send the same packets again in the same order.

insert image description here

In addition to the above three-way handshake, the TCP protocol has various other means to ensure the reliability of communication.

The relationship between various protocols and the HTTP protocol
After learning the various protocols in the TCP/IP protocol suite, which are inseparable from the HTTP protocol, we will use this picture to understand how the IP protocol, TCP protocol and DNS service use the HTTP protocol. What role does each play in the communication process?

insert image description here
If you need the whole book, you can leave a comment~

Guess you like

Origin blog.csdn.net/leboxy/article/details/110089663