Internet chat, what have you learned?

Internet chat, what have you learned?

I believe there is no need to elaborate on what the Internet is. We usually "surf the Internet" and cannot do without it. In this article, we will translate what the ** is called ** network.

The concept of network

We may have heard of many terms for the Internet, such as the Internet, the World Wide Web, and the Internet. The relationship between the three is actually:

Internet > World Wide Web

Then a simple network would look like this:

A simple network consists of multiple nodes (AKA computers) and links connecting them. Just like if you have 3 computers at home, and they are all connected to each other, then your 3 computers at home form a simple network. The so-called Internet is a network of networks, as shown below:

Different networks can be connected to each other through routers, forming a larger Internet. So in general, the network connects many computers, and the Internet connects many networks together. Therefore, the Internet is also the largest computer network in the world.

The development of the Internet

Phase 1

The origin of the Internet has a bit of a war background. It originated in the 1960s, during the Cold War, when the US Department of Defense developed a distributed communication network that was expected to be able to withstand nuclear attacks. This was the prototype of the world's first Internet - ARPANET.

In 1983, the TCP/IP protocol became the standard protocol on ARPANET. As long as the TCP/IP protocol is used, computers can communicate with each other.

Phase II

In 1985, the National Science Foundation of the United States built a computer network around six large computer centers. The characteristic of this stage was the formation of a three-level Internet structure, namely: backbone network, regional network, and campus network (enterprise network). This three-level network covered major universities and research institutes in the United States at that time. Subsequently, more and more companies connected to the Internet, resulting in a surge in network traffic. Since the Internet was maintained by the government at that time, its capacity could no longer meet the needs at that time, so the US government decided to transfer the backbone network to private enterprises for operation and began to charge fees.

Phase 3

As the backbone network began to be operated by private enterprises, a multi-level ISP structure of the Internet was formed in this stage. What is an ISP? In fact, it is an Internet service provider. Let me give you an example and you will understand. For example, the three giants in our country: China Unicom, China Telecom, and China Mobile are typical ISPs.

ISP is actually also a proxy, because they also apply for a bunch of IP addresses from the Internet Administration Agency. Then we go to the ISP to apply for broadband, pay the fees, and then we can use this IP address to "surf" the Internet during the period of use.

Internet Protocols

After so many years of development, the Internet has evolved into an extremely complex network spanning the globe. It is like the interior of each of our cities is connected to each other through various roads, and cities are also connected to each other, and all these cities are connected to each other to form this large "national Internet". Machines connected to the Internet can communicate with each other, and cities in the "national Internet" can also "communicate" with each other.

Do you think it is possible for a package to be lost during transportation? Of course it is possible, and there are many such cases. Similarly, the data packets we send out may also be lost.

Therefore, in order to ensure the accurate delivery of data packets, the Internet uses many protocols, such as TCP/IP, which we are very familiar with. TCP stands for Transmission Control Protocol and IP stands for Internet Protocol.

They have clear division of labor. IP is responsible for routing data packets, allowing them to jump from one "transit station" to the next "transit station", while TCP ensures that the packages arrive at the "transit station" reliably, accurately and orderly.

Of course, in the huge concept of the Internet, TCP/IP protocol is not everything. There are also DNS (Domain Name System) and HTTP (Hypertext Transfer Protocol) that we are very familiar with.

If you are not familiar with DNS and its underlying principles, you can read this article I wrote before: How does your domain name become an IP address?

There are also network security encryption protocols such as SSL and TLS, which allow our data to be transmitted safely on the Internet. Of course, TLS has now replaced SSL because TLS has higher security and stronger authentication mechanisms.

In the communication and data exchange process of the Internet, the protocol plays a very critical role. This is just like when people communicate with each other, language is very important. If the language is not common, communication is very difficult. The premise of communication is that both parties need to use the same protocol.

The protocol is actually a bunch of rules that specify the details of information exchange. For example, our old friends three-way handshake and four-way wave are part of the TCP/IP protocol. What are the benefits of using these protocols?

The answer is of course standardization, using standardization to shield the differences between different manufacturers or systems. For example, if different manufacturers use different protocols for their phones, then a certain APP can be used on manufacturer A but not on manufacturer B, or different operating systems cannot communicate with each other. Such problems are definitely unacceptable from today's perspective.

Let's take another example of a standardized protocol. For example, the Type-C charging cable we use is a standard. No matter which manufacturer produces it, as long as it follows this standard, consumers can use it normally. Let's take another example of different protocols. Different countries use different charger standards. If you want to charge between different standards, you need to use an adapter, which is very inconvenient.

Network layer model

OSI seven-layer model

I believe everyone has been asked this question before: "Please briefly describe the OSI seven-layer model." What does this network model mean? How did it come about? In other words, why do we need this network model?

This is because in the 1970s, the rapid development of the network led to the development of different network architectures. Due to global economic development, there is an urgent need to enable users in different network architectures to communicate and exchange information. In order to achieve this goal, the International Organization for Standardization established a special organization in 1977 to study this issue.

The result of their research is the famous OSI model. The OSI model contains a total of 7 layers (many people have reflexively started to recite the whole text at this point), from bottom to top: physical layer, data link layer, transport layer, network layer, session layer, presentation layer, and application layer.

However, the design of the OSI model is idealistic but realistic. OSI has only achieved theoretical results. When designing, these experts did not consider commercialization. In addition, the OSI protocol design is too complicated, which leads to low efficiency. In addition, there are repeated layers in the OSI layer.

So to sum up the OSI seven-layer model in one sentence: it is both complex and impractical.

TCP/IP system

Compared with the impracticality of OSI, TCP/IP is a four-layer architecture, namely: application layer, transport layer, internet layer, network interface layer. The comparison with OSI is shown in the following figure:

How messages are sent

After briefly understanding some background, let's take a look at how messages are sent on the network. So what does communication look like in general? It may look like this:

Suppose there are two machines, A and B, with IP addresses 1.2.3.4 and 4.3.2.1 respectively. Their IP addresses are different and they need to communicate through the "network" in the figure above. If A wants to send a message to B, how should this message be "transmitted" to B? Of course, it is through the network cable connected to machine B (assuming it is wired). We know that what is transmitted in the line is electrical signals. This conversion process does not need to be implemented manually. These functions are built into the computer, and the conversion mentioned above is completed by the protocol stack. The general workflow of the protocol stack is as follows:

This is a bit abstract. For example, we don't know what a protocol stack is and how it processes data. The concepts related to the protocol stack and the general process of sending and receiving data packets are described in detail in my previous article What a data packet goes through from sending to receiving, so I won't repeat them here.

Here we take the TCP/IP protocol stack as an example. It is divided into 4 layers and looks like this:

  • The application layer, such as the HTTP protocol used in this article
  • Transport layer, TCP protocol
  • Network layer, IP protocol
  • The hardware layer uses the Ethernet protocol to convert binary data into electrical signals and convert between them, such as network cards.

Then combined with the above picture, it will become like this:

This process is very similar to the online shopping and express delivery examples mentioned above. When we place an order, the seller will package the items layer by layer. This "packaging" process is very similar to the protocol stack's processing of data packets, from top to bottom, processing the data "Hi, there" step by step. For us who receive express delivery, we will open the package little by little from the outside to the inside, and finally get the goods we purchased. For the 4.3.2.1 protocol stack, the same principle applies to the step-by-step restoration of electrical signals to "Hi, there".

If we add this packaging detail to the above diagram, it will look like this, in terms of HTTP protocol:

It can be seen that each layer of the packet is composed of XX header and XX data packet. Through the "layer by layer coding" of the protocol stack, the key information required for communication will also be packaged in:

  • The transport layer adds the HTTP message to the TCP data packet and adds the sender and receiver port numbers to the TCP header.
  • The network layer adds the TCP packet from the previous layer to the IP data packet and adds the sender and receiver's IP addresses to the IP header.
  • The hardware layer adds the IP packet to the Ethernet data packet and adds the sender and receiver's Mac addresses to the Ethernet header.

Now the question is, we only know that there is a "network" in the middle, so how does the data packet from 1.2.3.4 machine A find the machine 4.3.2.1 B? A knows which route to take from the beginning.

The data sent by 1.2.3.4 will be processed from top to bottom by the protocol stack and become data packets one by one. Then, after 4.3.2.1 receives the data packet, it will also be processed from bottom to top by the protocol stack to parse the original message.

refer to

  • How Does the Internet Work?
  • Computer Networks

<<:  IoT Networks for 5G Massive Machine Type Communications (MMTC)

>>:  5G technology and its impact on the Internet of Things

Recommend

The development of 5G will open up a new track for the Internet of Things

The Ministry of Industry and Information Technolo...

The relationship and difference between URL, URI and URN

URL Uniform Resource Locator (URL) is a reference...

In 2024, the core network will usher in new opportunities!

In today’s article, let’s talk about the core net...

...

The web standard is always MIME version 1.0

Introduction There is no order without rules, and...

How 5G will impact IoT technology

According to many predictions, the Internet of Th...

Ruijie Cloud Desktop supports Beijing's COVID-19 fight

Imported from abroad, confirmed locally, the sudd...

Analysis: Advantages and limitations of wireless data centers

For data center operators, the idea of ​​a wirele...

Opportunity or chicken ribs? eMTC should not follow the NB-IoT price war

[[255921]] Recently, the official website of the ...