How can you explain the communication protocol in such a simple way?

How can you explain the communication protocol in such a simple way?

This article is reprinted from the WeChat public account "Hun Shuo Linux", written by Linux_Daily. Please contact Hun Shuo Linux public account to reprint this article.

Communication protocols are similar to traffic planning, which is about planning how drivers on the road should move.

If you buy something on Taobao, the merchant will send your purchase to you via express delivery. How can it be delivered to you through the Internet?

1. There must be traffic roads or traffic routes.

2. Have your home mailing address.

3. There must be a means of transportation (truck, airplane).

4. A courier is required.

If these four points are met, communication is possible, and aren't these four points the TCP/IP model?

1. Will there be traffic congestion on the roads? Are there any ways to reduce traffic congestion?

1). Avoid peak hours (CSMA/CD). For workers who work 996 or all night long, is it possible to avoid peak hours completely?

CSMA/CD stands for Carrier Sense Multiple Access/Collision Detection.

2). Traffic restrictions (Token), for example, Shenzhen has traffic restrictions from 7:00 to 9:00 and from 17:30 to 19:30 on weekdays.

Token can be commonly called a code. Before some data is transmitted, the code must be checked first. Different codes are authorized for different data operations.

3). Set up dedicated lanes ( virtual private networks ). For example, Shenzhen has dedicated lanes for buses during rush hour, and other vehicles cannot drive on them.

It is a virtual private network that establishes a private network on a public network. For example, when you are on a business trip, you can remotely access the service resources of the company's intranet.

4). Taking the bus or subway (CDMA) to and from get off work allows more people to commute to get off work normally while reducing vehicle travel.

CDMA generally refers to Code Division Multiple Access, which means using different pseudo-random codes to distinguish base stations. Each base station uses the same frequency and transmits information at the same time.

5). There are many workers in the factory, and the traffic around the factory is likely to be paralyzed during off-get off work hours. In this case, the factory is demolished (proxy), and the factory and workers are moved to the suburbs, and a factory is built in the suburbs.

Proxy refers to proxy software or proxy server, which can also be considered a network access method.

6). Widen the road (Frame Relay, ATM)

Frame Relay is an effective data transmission technology that can quickly and cheaply transmit digital information in one-to-one or one-to-many applications.

ATM is a switching technology that cuts digital data into multiple fixed-length data packets before sending them.

2. The correspondence address will be more troublesome. In some communities, security guards may not let you in, and you may take the wrong road in some places. There may even be recipients with the same name.

1). What should I do if the community security guards do not allow me to enter (firewall)?

a. Give the security guard a cigarette and call him handsome or cool instead of calling him "diaofu". The security guard may feel comfortable with that and let you in (ACL).

ACL refers to access control list, which is an access control technology based on packet filtering. It can filter data packets on the interface according to the set conditions, allowing them to pass or discarding them.

b. Have the security guard broadcast a notification or post a notice that the courier has arrived at the security room (ARP), so that everyone can come to the security room to claim their own courier. However, it is easy for someone else to claim it in your name (ARP spoofing).

ARP is the Address Resolution Protocol. When a host sends information, it broadcasts an ARP request containing the target IP address to all hosts on the local area network and receives a return message to determine the target's physical address. After receiving the return message, the IP address and physical address are stored in the local ARP cache and retained for a certain period of time. The next time a request is made, the ARP cache is directly queried to save resources.

ARP spoofing: When the host receives a reply message, it will not check the authenticity of the message, so the attacker will send a fake ARP reply message to the host, which constitutes an ARP spoofing. That is to say, if someone pretends to claim a package, the security guard will not check whether it is the real person who claims it. The pretender will claim it in this way, causing the real owner's package to be taken away by someone else.

2). What should I do if I go the wrong way in some places?

a. Small cities (RIP) need to learn to take shortcuts (OSPF), as traffic in small places is smoother.

RIP is a distributed distance vector-based routing protocol, which is mainly applicable to small-scale network environments.

OSPF (Open Shortest Path First) is an interior gateway protocol.

b. In big cities (such as Shenzhen), you need to learn to use map navigation (BGP) because all kinds of overpasses and viaducts will make you lost.

BGP is a routing protocol between autonomous systems. The network reachability information exchanged by BGP provides sufficient information to detect routing loops and make routing decisions based on performance priorities and policy constraints.

3). What should I do if the recipient has the same name?

a. Narrow the area to confirm the recipient. Divide the area into a certain street (subnet mask) and confirm which area the recipient is in. If the recipient with the same name is in another area, do not care.

Subnet Mask refers to the subnet mask, which is used to indicate which bits of an IP address identify the subnet where the host is located, and which bits identify the bit mask of the host.

b. Put a house number (intranet IP) on the door of each resident. Even if the recipient has the same name, the house number will not be the same.

Intranet IP is the local area network address.

3. The transport truck may have a traffic accident on the road. The transportation time of the truck determines how many days it will take for the express to be delivered to the recipient.

1). What should I do if a truck gets into a traffic accident?

a. A truck is involved in a traffic accident, resulting in the damage of the express. If the express company compensates the merchant, the merchant still has to resend (TCP) because the recipient has not received the express (ACK). As long as the recipient has not received the express, the merchant has to keep resending (SYN).

TCP is a connection-oriented, reliable communication service that requires a three-way handshake to establish a connection.

ACK is a confirmation character, which requires the recipient to receive the express and confirm receipt on Taobao.

SYN is the synchronization sequence number, which is the information about the merchant's shipment.

2). How many days will it take for the recipient to receive the express?

a. The speed of truck transportation determines when the express can be delivered. If the road is wider, there are fewer red lights and no traffic jams, the speed can be faster and the recipient can receive the express earlier. This is Shannon's theorem.

4. When the package arrives at the courier, some situations may occur. When the courier delivers the package to the recipient, the recipient finds that the package is damaged.

1). The recipient found that the express package was damaged, and the recipient inspected the package on the spot when the courier delivered it to him and refused to accept it (CRC verification).

The entire communication protocol uses a courier to describe the process from sending a package from the merchant to the recipient in a very easy-to-understand way, which should be relatively easy to understand.

This article is reprinted from the WeChat public account "HunShuoLinux", which can be followed through the following QR code. To reprint this article, please contact the HunShuoLinux public account.

<<:  5G messaging accelerates commercialization and may become the first batch of 5G applications

>>:  5G has been promoted for three years, why do some people still insist on using 4G? It turns out that I thought too simply

Recommend

5G and machine learning: Transforming cell towers from smart to genius

[[335632]] 5G ushers in new “genius” networks to ...

Demand is holding back technology. WiFi6 is not yet popular. 6E is coming.

As 5G technology develops rapidly, Wi-Fi technolo...

RackNerd Los Angeles DC02 restock, VPS promotion starts at $9.89 per year

Earlier this month, we shared a summary of RackNe...

Network-oriented, NPMD achieves 80% of functions with 20% of investment

An organization once worked with MIT to interview...