Story: Tang Sanzang's journey to the west: the whole process of network communication

Story: Tang Sanzang's journey to the west: the whole process of network communication

In the first year of Zhenguan, Xuanzang formed a group and presented a petition. The king of the Tang Dynasty in the East (referring to the browser) asked Tang Sanzang (referring to the data message to be transmitted) to travel west to seek the true scriptures (referring to the target IP address).

At this time, Tang Sanzang's only mission was to obtain the true scriptures, but he didn't know the specific location of the scriptures. So Tang Sanzang took out a notebook, which clearly showed the longitude and latitude corresponding to the place name.

After some research (DNS query), it turns out that the place where the scriptures were obtained is called Tianzhu Kingdom (domain name), located at xxx north latitude and xxx east longitude (IP address).

Since Tang Sanzang decided to go west, he had to pack his luggage and prepare to leave. The king of the Tang Dynasty in the East gave Tang Sanzang a letter (referring to the data message information in the application layer), saying that if he obtained the true scriptures, he must not forget to personally deliver this letter given to him by the king to the elder in the west.

But in order to prevent the letter from being lost, it was sewn onto his body to ensure that it would not be stolen on the road (referring to the use of HTTPS protocol for transmission).

At the same time, the cover of the letter will have some instructions, such as who can read the letter and who wrote it (here refers to some information about the content of the message in the HTTP header).

Afterwards, Tang Sanzang was sent to the transportation department (referring to the transport layer) to choose a way to travel west. The Minister of Transportation asked, "Would you choose to walk (referring to UDP) or ride a horse (referring to TCP)?"

If you walk, we cannot guarantee that you can reach your destination smoothly (UDP is a stateless connection protocol). If you get lost halfway, we will continue to send people westward (referring to resending data packets).

If you choose to ride a horse, you will be given a good horse that can ensure that you can reach your destination smoothly (TCP is connection-oriented and has good stability).

At the same time, these horses are trained, and when they arrive there, they will know which door (referring to the port number) to enter the courtyard and find the elders of the temple. Otherwise, if they go to the wrong temple or gate, they will not be able to deliver the letter accurately.

Tang Sanzang thought, it is not easy to go west. I am not only lost, but I am afraid I will lose the letter given to me by the king. It is more stable to ride a horse, so he chose a spiritual horse and named it Little White Dragon.

At this time, Tang Sanzang planned to start his journey on horseback from the Tang Dynasty in the East, but encountered a problem. Although the notebook had accurate longitude and latitude, was the address local or abroad (in this network or other local area networks)?

Finally, he asked the king of the Tang Dynasty in the East, and the king sent a messenger to the library to check the longitude and latitude identification information (referring to the IP address header) given by Xuanzang. Well, this address is abroad, and he was informed that it needs to pass through many countries (referring to routing/gateways) to reach it.

On the way westward, one will pass through many countries and villages, including Baoxiang Kingdom, Wuji Kingdom, Chechi Kingdom, Xiliang Women's Kingdom, Jisai Kingdom, Zhuzi Kingdom, Shituo Kingdom, Bhikkhu Kingdom, Miefah Kingdom, Fengxian County, Yuhua Prefecture, Jinping Prefecture and more than a dozen other countries.

The kings of different countries were in contact with each other and had commercial dealings with each other (meaning there was a routing table). When Tang Sanzang came to a country and didn't know where to go, the king would tell him how to get to the next country. The kings were more familiar with each other than those of neighboring countries.

The longitude and latitude of these countries (referring to the IP address of the gateway) are all issued by the United Nations (referring to the DHCP protocol). The country is divided into many small towns, and the longitude and latitude of each small town (referring to the IP address of the host in the LAN) are all allocated by each country.

If the king wants to know which town is at a certain longitude and latitude, he will send multiple messengers (referring to the ARP protocol) to various towns to ask. At this time, Zhu Bajie from Gao Village responds that the longitude and latitude of my home is the same as the longitude and latitude (IP address) you asked about, but the real name of my home is Gao Village (referring to the MAC address).

Tang Sanzang and his three disciples came to Baoxiang Kingdom (the Yellow Robe Monster in Boyue Cave in Wanzi Mountain) and met the king of Baoxiang Kingdom.

Tang Monk asked: "I came to the West from Tang Dynasty to seek Buddhist scriptures. I passed by this place. Do you know where to go next?"

The king replied: "It's not too late to sit down and have a meal for one night before setting off. I can also ask other kings of neighboring countries for you (referring to checking the routing table), and you will naturally know where to go next."

So the king sent the city guard to send a carrier pigeon to the king of the neighboring country, asking him whether the journey to the West to obtain the scriptures would pass through his country.

Although the United Nations allocates longitude and latitude (IP addresses) to each country, in transactions between countries, a unique country identifier (MAC address) is usually used to identify the country of the other party to conduct the transaction.

Then the four masters and apprentices passed through Wuji Country, Chechi Country, Xiliang Women's Country, Jisai Country, Zhuzi Country, and finally came to Tianzhu Country. When they met the king of Tianzhu Country, they said the same old line again, "I came from the Tang Dynasty in the East..." Although the four masters and apprentices came to the final country to obtain the scriptures (referring to the gateway of the target address), they did not know which specific place (referring to the target server) to go to to obtain the true scriptures.

So the king of Tianzhu sent many messengers to ask which small town could get the true scriptures. At this time, a temple master responded that you can come to me to get the true scriptures, my MAC address is Lingshan Leiyin Temple. Finally, the master and his four disciples came to Lingshan Leiyin Temple, thinking that they could get the true scriptures soon, but they never expected that...

"Except for this monk, none of you look like human beings or ghosts. You must be tested to see if you are really from the Tang Dynasty in the East before we can give you the true scriptures," said the old monk in the temple.

At this time, Xuanzang took out the documents recording the hardships and difficulties on the road, as well as the robes he wore, to verify whether he was the real Xuanzang (the target server began to split the message at each layer of the five-layer network protocol to determine the correctness of the information).

He gave the cassock to the tailor, who confirmed that it was real. He then gave the document to the Ministry of Literature, which confirmed that it was correct. He then gave the gold foil to the Ministry of Commerce for inspection, which confirmed that it was good gold. Finally, he confirmed that he was the real Tang Sanzang. After obtaining the true scriptures, Tang Sanzang found the old monk in the temple and handed him the letter from the king. The old monk expressed his gratitude.

In fact, the above process can be explained as the following process in the network.

After the message information arrives at the target server, it first takes out the Ethernet protocol MAC header to determine whether it is the same as its own MAC address.

If they are the same, then it is handed over to the upper network layer to extract the IP header and determine whether the IP address and target server are correct. It is found that they are correct.

Finally, the TCP header is taken out and handed over to the transport layer. Yes, yes, everything including the port number corresponds correctly, and the message information is passed to the corresponding application through the port.

During this journey, the four masters and apprentices experienced 81 difficulties. Tang Sanzang was not eaten by monsters, and the king's envelope was not lost, thus ensuring the integrity of the data packet in the entire communication.

If Tang Monk's flesh was eaten by monsters or he got married in the Kingdom of Women or fell into the river while crossing the river, the data packet of the entire network communication process would be lost, and they would have to send people to the West again to obtain the scriptures.

postscript

In fact, Xuanzang had not yet completed his last mission, because the people of the Eastern Tang Dynasty did not know whether Xuanzang was alive or not, so Tang Sanzang had to take the original path and return to the Eastern Tang Dynasty. People, I am back! Look what I brought back to you, hundreds of scrolls!

This article is easy to understand and may not include many details. It is mainly to allow people who have just come into contact with network principles to have a general understanding of network communication, so that it will be relatively easier to learn later. I will continue to write some articles on specific network protocols in the future.

<<:  With 30,000 layoffs, what have American operators experienced?

>>:  What is the relationship between NFV and SDN?

Blog    

Recommend

Is LoRaWAN the solution to cellular IoT challenges?

Ten years ago, there were high hopes for cellular...

National Cyber ​​Security Awareness Week 2017

[51CTO.com Shanghai report] The 2017 National Cyb...

Understanding Neutral Host Networks Using Private 5G

Enterprises have long faced wireless problems tha...

...

Ping command advanced usage

ping command The ping command is used to test the...

Transition technology from IPv4 to IPv6

As IPv4 addresses are about to be exhausted, the ...

The Implications of the ZTE Incident for Operators

Although the ZTE incident has not yet reached a f...

How can the CDN industry break through the era of negative gross profit?

Since the Ministry of Industry and Information Te...

Network Performance Monitoring and Diagnostics Market Guide (2020 Edition)

With the acceleration of cloud migration and the ...

How will 5G mainstreaming affect the Internet of Things in 2023?

The number of Internet of Things (IoT) endpoints ...