[Computer Network] Lesson 3 - Computer Network Architecture

        Welcome to blogger Apeiron's blog, I wish you a pleasant journey! When it is time to stop, it will stop; when it is time to go, it will go. Movement and stillness do not lose their time, and the way is bright.


 

Table of contents

1. Common computer network architecture

2. The necessity of layering computer network architecture

2.1. Physical layer

2.2. Data link layer

2.3. Network layer

2.4. Transport layer

2.5. Application layer

3. Professional terminology in computer network architecture

4. Summary 


1. Common computer network architecture

        In order to enable computer networks of different architectures to be interconnected , the International Organization for Standardization established a special agency in 1977 to study this issue. Soon, they proposed a standard framework that attempts to interconnect various computers into a network around the world, which is the famous "Open Systems Interconnection Reference Model" , referred to as OSI (Open Systems Interconnection) .

        By the early 1990s, although the entire set of OSI international standards had been formulated, the Internet had already covered a considerable area around the world. The Internet began to use the TCP/IP protocol suite in 1983, and gradually evolved into the TCP/IP reference model.

         In the past, organizations that formulated standards were often dominated by experts and scholars. But now, many companies are squeezing into various standardization organizations, giving technical standards a strong commercial flavor. The emergence of a new standard sometimes does not necessarily reflect that its technical level is the most advanced, but often has a certain market background. In this sense, what can occupy the market is the standard.

The reasons for the failure of the OSI standard can be summarized as follows:

① OSI experts lack practical experience and have no commercial drive when completing OSI standards.

② The OSI protocol is too complex to implement and its operating efficiency is very low

③ The development cycle of OSI standards is too long, which makes it impossible for equipment produced according to OSI standards to enter the market in time. 

④ The hierarchical division of OSI is also unreasonable, and some functions are repeated in multiple layers.

        The network interface layer of the TCP/IP architecture does not stipulate any specific content. The purpose of this is to interconnect various network interfaces around the world , such as wired Ethernet interfaces and wireless LAN WIFI interfaces, without limitation. Use one or more network interfaces. Therefore, essentially the TCP/IP architecture only has the upper three layers.

        The IP protocol is the core protocol of the Internet layer of the TCP/IP architecture. TCP and UDP are two important protocols at the transport layer of the TCP/IP architecture. The application layer of the TCP/IP architecture includes a large number of application layer protocols, such as HTTP, SMTP, DNS, RTP, etc.

        The IP protocol can interconnect different network interfaces and provide network interconnection services to the TCP protocol and UDP protocol on it. On the basis of enjoying the network interconnection services provided by the IP protocol, the TCP protocol can provide reliable transmission services to the corresponding protocols at the application layer . On the basis of enjoying the network interconnection services provided by the IP protocol, the UDP protocol can provide  unreliable transmission services to the corresponding protocols at the application layer . 

        Since the TCP/IP architecture is designed to interconnect different network interfaces, its network interface layer does not specify any specific content. However, for our complete system of learning computer networks, there will be a missing part of the content, that is, the physical layer content is missing. Therefore, when learning computer network principles, a compromise approach is often adopted, that is, combining the advantages of OSI and TCP/IP and adopting a five-layer protocol principle architecture .

        It can be seen that the principle architecture of the five-layer protocol re-divides the network interface layer of the TCP/IP architecture into the physical layer and the data link layer. In this way, it is more conducive to our learning of computer network principles.


2. The necessity of layering computer network architecture

        "Layering"  can transform large and complex problems into several smaller local problems, and these smaller local problems are easier to study and deal with.

        Next, let's take a look at the main problems faced in implementing computer networks in order from simple to complex, and how to divide these problems into corresponding levels and deal with them layer by layer.


2.1. Physical layer

Physical Layer : This is the lowest layer, responsible for defining the physical specifications of transmission media and data transmission, such as cables, optical fibers, wireless signals, etc. 

        First, let's look at the simplest case, where two computers are connected through a network cable.

         For this simplest case, we need to consider the following questions:

① What kind of transmission media (medium) is used?

        For example, this is our common twisted pair network cable. 

② What kind of physical interface is used?

  

        For example, this is the RJ45 Ethernet interface. 

③ What signals are used to represent bits 0 and 1?

        For example, using a square wave signal like this, a low level represents 0 and a high level represents 1. (Here, we need to explain two points. ① Strictly speaking, the transmission media does not belong to the physical layer, and it is not included in the architecture. ② The signal transmitted in the computer network is not the square wave signal we exemplified. The reason why the example is a square wave signal is to make it easier for beginners to understand.)

        With these problems solved, the two computers can transmit bits 0 or 1 through signals. We can frame these issues down to the physical layer


2.2. Data link layer

Data Link Layer : Above the physical layer, it is responsible for data framing, error detection and correction to ensure reliable transmission of data at the physical layer.

        Practical computer networks generally consist of multiple hosts.

        Assume that we have solved the physical layer problem, that is, the hosts can send signals to transmit bits 0 or 1. Let’s take a look at what other problems we face that need to be solved on such a bus-type network ?

        As shown in the figure, host A wants to send data to host C, but the signal representing the data will be propagated through the bus to every host on the bus. So the question is, how does host C know that the data is sent to itself and it wants to accept it? And how do hosts B, D, and E know that the data is not sent to them and they should reject it? This naturally leads to the problem of how to identify each host in the network (host addressing problem, such as MAC address)

        When a host sends data, it should attach a destination address to the data. When other hosts receive it, they decide whether to accept the data based on the destination address and their own address. This leads to another problem: the destination host distinguishes the address and data from a series of bit streams represented by the signal, which means that the packet encapsulation format needs to be solved .

        In addition, for bus-type networks, the following typical problems will occur. For example, at a certain moment the bus is idle, that is, no host is using the bus to send data. After a while, hosts B and D send data to the bus at the same time, which will inevitably cause signal collision. Therefore, how to coordinate the competition among hosts for the bus is also a problem that must be solved .

        It should be noted that this bus type network has long been eliminated, and now commonly used is a switched Ethernet network that uses Ethernet switches to connect multiple hosts to each other .

        So, how is an Ethernet switch implemented? We classify all these issues into the data link layer . At this point, you may find that as long as the problems faced by the physical layer and data link layer are solved, we can realize packet transmission on a network .


2.3. Network layer

Network Layer: This layer is responsible for addressing and routing between different devices in the network to determine the best path for data in the network.

        The Internet we use every day is interconnected by a large number of networks and routers, and it cannot work properly even if it only solves the physical layer and data link layer. Let's look at the following example. This is a small Internet interconnected by 3 routers and 4 networks. We can regard it as a very small part of the Internet. 

        In the previous example, there was only one network and we did not need to identify the network. In this case, there are multiple networks. Obviously, we are faced with the problem of how to identify "each network" and "each host in the network" (the problem of joint addressing of networks and hosts, such as IP addresses) .

        For example, this is the IP address of each device on network N1. The first three decimal digits of this type of IP address are used to identify the network, and the fourth decimal digit is used to identify the host.

        Let's look at another problem. There is often more than one transmission path between the source host and the destination host, and packets can take different paths from the source host to the destination host. This raises the question of how routers forward packets and how to perform routing selection . We divide all these problems into the network layer .


2.4. Transport layer

Transport Layer : The transport layer provides end-to-end communication, is responsible for dividing data into smaller data segments, and provides flow control and reliability guarantees, such as reliable data transmission through TCP (Transmission Control Protocol).

        If we solve the respective problems of the physical layer, data link layer and network layer, we can realize the problem of packet transmission between networks. However, for computer network applications, this is still not enough. For example, assume that there are two application processes related to network communication running on this host, one is a browser process and the other is a QQ process. This server runs server processes related to network communication.

        At some point, the host receives packets from the server. Should these packets be handed over to the browser process for processing, or should they be handed over to the QQ process? This leads to how we identify application processes related to network communication , and then solve the problem of network-based communication between processes.

        In addition, if a packet has a bit error during transmission, or the router discards the packet because the router is busy, how should this be handled? We assign all these issues to the transportation layer .


2.5. Application layer

        We have solved the respective problems of the physical layer, data link layer, network layer and transport layer, and then network-based communication between processes can be achieved. On this basis, it is only necessary to formulate various application layer protocols, write corresponding applications according to protocol standards, and complete specific network applications through interaction between application processes. For example, the HTTP protocol that supports World Wide Web applications, the SMTP protocol that supports email, and the FTP protocol that supports file transfers. We divide all these issues into the application layer.

        At this point, we have classified the various main problems that need to be solved to implement computer networks into the physical layer , data link layer , network layer , transport layer and application layer , thus forming the principle architecture of the five-layer protocol system.


3. Professional terminology in computer network architecture

(1) Entity: Any hardware or software process that can send or receive information

(2) Peer entity: an entity at the same level as the sending and receiving parties

(3) Three elements of the agreement

① Grammar: Define the format of the exchanged information 

② Semantics: Define the operations to be completed by both sending and receiving parties

        For example, if the host wants to access a remote Web server, it will construct an HTTP GET request message and then send it to the Web server.

        The web server receives the message and parses it, knowing that it is an HTTP GET request message, so it searches for the requested content within itself , and encapsulates the found content in an HTTP response message and sends it back to host.

        After the host receives the HTTP response message, it parses it, takes out the requested content, and displays it by the browser. This example can show what operations the communicating parties complete after receiving the packet. This is defined by the semantics of the HTTP protocol.

③ Synchronization: Define the timing relationship between the sending and receiving parties 

        Please note that synchronization here does not refer to clock frequency synchronization. For example, this is the process in which TCP uses the "three-message handshake"  to establish a connection. In order to carry out logical communication between transport layer TCP entities, first, a connection must be established. From the connection establishment process, we can see the timing relationship between the TCP client and the TCP server, as well as their respective state transitions. Only after both parties establish a connection can TCP data transmission be carried out. This example can fully reflect the synchronization among the three elements of computer network protocols. 

 

(4) Service

        Under the control of the protocol, logical communication between two peer entities enables this layer to provide services to the upper layer. To implement this layer of protocol, you also need to use the services provided by the layer below. The protocol is "horizontal" and the service is "vertical".

        The entity can see the service provided by the adjacent lower layer, but does not know the specific protocol to implement the service. That is, the protocol below is "transparent" to the entity above  . 

(5) Service access point

        A logical interface for exchanging information between entities at two adjacent layers in the same system  , used to distinguish different service types.

① The service access point of the data link layer is the "type" field of the frame

② The service access point of the network layer is the "protocol field" in the IP datagram header.

③ The service access point of the transport layer is the "port number".

(6) Service primitives 

        The upper layer must exchange some commands with the lower layer to use the services provided by the lower layer  . These commands are called service primitives.

(7) Data unit

① Protocol data unit PDU

        In computer network architecture, there are special terms for the data packets exchanged between communicating parties. We  call the data packets transmitted between peer layers  the protocol data unit of that layer.

② Service data unit SDU

        Within the same system , the data packets exchanged between layers  are called service data units.

③ Multiple SDUs can be combined into one PDU; one SDU can also be divided into several PDUs

 


4. Summary 

        This is the summary of this issue’s sharing. If you have any questions, let’s discuss them in the comment area~~~. The author will definitely reply. See you in the next issue! ! !

It is inevitable that there will be omissions and errors in the blog, which are all due to the limited skill of the author. We sincerely ask readers to correct me!

<Computer Network> The column series is continuously updated, welcome to subscribe and follow!

Guess you like

Origin blog.csdn.net/qq_51870334/article/details/131630635