As the front-end, we most often contact with the HTTP protocol in the application layer, many students do not know OSI, TCP/IP network model, because it seems to be useless for development work (laugh).

However, on the other hand, as a computer and Internet technology practitioner, it is also a basic quality to know some knowledge of network model, and you never have enough knowledge, you may ask for it in an interview one day.

OSI network model

OSI stands for Open System Interconnection. The International Organization for Standardization (ISO) developed the OSI model, which defines the standards for interconnecting different computers and is the basic framework for designing and describing computer network communication. OSI model divides the work of network communication into seven layers, namely physical layer, data link layer, network layer, transport layer, session layer, presentation layer and application layer. ———— Baidu Encyclopedia

The Open System Interconnection (OSI), developed by the International Organization for Standardization (ISO), consists of seven layers:

In the OSI model, each layer is relatively independent but interdependent. Here is a brief description of the functions of each layer:

The OSI reference model divides the whole network very carefully. Although the seven-layer network structure is reasonable and easy to understand, its defects are also obvious: the whole system is too complex to implement, and the OSI work efficiency is low.

For a variety of reasons, like monarchs in constitutional monarchies, OSI is a universal international standard in name only. In practice, TCP/IP four-tier model is more acceptable.

TCP/IP reference model

The TCP/IP reference model is the reference model for computer networking’s grandfather, ARPANET, and its successor, Internet use. ARPANET is a research network sponsored by the U.S.Department of Defense (DoD). Gradually it connected hundreds of universities and government departments through leased telephone lines. When wireless networks and satellites emerged, existing protocols had problems connecting to them, and a new reference architecture was needed. This architecture is known as the TCP/IP Reference Model after the emergence of its two main protocols. — Baidu Encyclopedia

The TCP/IP reference model is divided into four layers and is structured as follows:

The TCP/IP reference model can be viewed as a condensed version of the OSI model, and they are represented by the following correspondence:

Compared with the OSI network model, the TCP/IP reference model greatly reduces the layering, omits some meaningless divisions and details, and circumvents the disadvantage of OSI being too sophisticated and complex.

But the shortcomings of the TCP/IP reference model are also obvious:

  • It is unclear on the distinction between services, interfaces, and protocols;
  • Its hierarchical structure is not perfect, in a sense, the division of the physical layer and the data link layer is necessary and reasonable, but TCP/IP is not divided.

The end of the

Knowing the network model doesn’t help us with front-end development, but it’s always good to learn more.

Of course, this article is only a small summary of the learning process, there are inevitably omissions, I hope you correct, but also hope to friends can have some reference value.