OSI Layer-7 Reference Model for Communication Principles (I)

Source: Internet
Author: User
1. What is a computer network?

The principle of computer communication cannot be separated from computer networks, so what is computer networks. Official definition: A computer network is a system composed of two or more computers connected by network devices, in this system, data communication, data sharing, and collaboration between computers can be performed to complete some data processing tasks.

To put it bluntly, a network composed of computers or many computers in this network system. Computers here refer not only to our computers, but also to all network devices in the network, such as mobile phones and tablets.

2. Communication between computers

With computers and other devices, you have to consider how to connect them. This is the question of how to communicate between them. A computer is a hardware device. How to connect a computer with a computer requires the support of software. So what is the software that supports computer communication? Is the computer network reference model. The computer network reference model is computer network software. The most classic of course is the Reference Model of the International Standard OSI (Open System Interconnect Open System Interconnection. It interacts with processes on another machine through one application process. Next, let's take a look at this model.

2.1 OSI Layer-7 Model

As we know above, computers are connected by two software processes. However, to allow process communication between the two processes, many problems still need to be solved. The OSI reference model solves this problem by layering. In short, the communication between the two processes is completed through seven major components, that is, the OSI seven-layer reference model. Each layer completes an independent task in the network.

The following figure shows the layer-7 model:

This figure looks really complicated. Let's take a look at the decomposition. The processes of both host a and host B are divided into seven layers. Next, let's first understand the role of each layer.

(1) Physical Layer

In the OSI reference model, the physical layer is the lowest layer of the Reference Model and the first layer of the OSI model. The main function of the physical layer is to use the transmission media to provide physical connections to the data link layer for transparent transmission of bit streams. Implement transparent transmission of bit streams between adjacent computer nodes, and eliminate the differences between specific transmission media and physical devices as much as possible. So that the above data link layer does not have to consider the specific transmission media of the network. "Transparent transfer bit stream" indicates that the bit stream transmitted by the actual circuit has not changed. The physical layer task is to provide a physical connection for the previous layer, as well as their mechanical, electrical, functional and procedural features. For example, specifying the type of cables and connectors and the voltage for transmitting signals. At this layer, the data has not yet been organized and is processed only as the original bit stream or electrical voltage. The unit is bit. It is really difficult to understand, but in a word, it is to take the initial current and provide physical connections for the previous layer. Ensure the transparency of current and so on.

(2) Data Link Layer

Datalink layer, the second layer of the OSI reference model. It controls network generation and physical communication, and is a bridge, its main function is to transmit data reliably on unreliable physical lines. To put it bluntly, it is to ensure the reliability of transmission. To ensure transmission, the data received from the network layer is divided into specific frames that can be transmitted by the physical layer. A frame is a structure package used to move data. It not only contains raw data, but also the physical addresses of the sender and receiver, as well as error detection and control information. The address determines where the frame will be sent, and the error correction and control information ensures that the frame has no error. If the receiving point detects an error in the transmitted data during data transmission, it must notify the sender to resend this frame. The function of the data link layer is independent of the network, its nodes, and the physical layer type used, and does not care whether Word, Excel, or Internet is running. Some connected devices, such as switches, work on the data link layer because they need to decode frames and send data to the correct receiver using frame information. The data link layer establishes a data link between adjacent nodes based on the bit stream service provided by the physical layer. It provides data frames with error-free transmission on the channel through error control and carries out action series on each circuit. The data link layer provides reliable transmission on unreliable physical media. The role of this layer includes physical address addressing, data frame formation, traffic control, data error detection, and re-transmission. It is hard to understand. To ensure the reliability of data transmission, there are also error correction and re-transmission mechanisms. (3) network layer, Layer 3 of the OSI reference model. The main function is to translate the network address into the corresponding physical address and decide how to route data from the sender to the receiver. The Network Layer determines the optimal path from node A in one network to Node B in another network by considering the transmission priority, network congestion, service quality, and the cost of optional routes. Because the network layer processes and intelligently guides data transmission, the router connects to each segment of the network, so the router belongs to the network layer. The network is responsible for establishing the routes they use between the source and target machines. This layer does not have any error detection and correction mechanisms. Therefore, the network layer must rely on the reliable transmission service provided by DLL between terminals. Simply put, you can find a path in the network and transmit it over a period of time. Because the data link layer ensures that the data between two points is correct, the data from the source to the destination is also correct, in this way, the information on one machine can be uploaded to another. However, the end user of the computer network is not a host, but an application process on the host. This process is implemented by the transport layer. (4) transport layer, the fourth layer of the OSI reference model. The transmission protocol simultaneously controls traffic or specifies an appropriate sending rate based on the speed at which the recipient can receive data. In addition, the transport layer forcibly splits long data packets according to the maximum size that can be processed by the network. For example, Ethernet cannot receive packets larger than 1500 bytes. The transmission layer of the sender node divides the data into smaller data slices, and arranges a serial number for each data segment so that the data can reach the transmission layer of the receiver node, can be reorganized in the correct order. This process is called sorting. One service that works on the transport layer is TCP (Transport Control Protocol) in the TCP/IP protocol suite, and the other is the SPX (sequence packet switching) in the IPX/SPX protocol set ). After the network layer is handed over to the transport layer, the transport layer must identify the process request for the service and the request to be handed over. When I deliver something to you, I want to inform you of the work at the Session Layer. (5) Session Layer, the fifth layer of the OSI reference model. Establishes, maintains, and terminates communications between two nodes in the network. The Session Layer functions include establishing communication links, keeping the communication links in the session process unblocked, synchronizing the conversations between the two nodes, and deciding whether the communication is interrupted and where to resend the communication when the communication is interrupted. Inform someone to say hello to you to make a call. Just like talking to you now, you can understand what you hear. But if the following is a foreigner, does he understand my voice? He cannot understand. In terms of computer networks, the client sends a request to the server, and the server should be able to understand what the request is, so what is the next question? There are two levels of understanding. I speak Chinese and he can only understand English, so there should be a translation. After Translating Chinese into English, the job will be handed over to the presentation layer at the next layer. (6) Presentation Layer presentation layer, the sixth layer in the OSI reference model. The interpreter between the application and the network. In the presentation layer, the data is formatted according to the solution that the network can understand. This formatting varies depending on the network type. The presentation layer manages data decryption and encryption, such as system password processing. For example, querying your bank account on the Internet is a secure connection. Your account data is encrypted before being sent. At the other end of the network, the data is decrypted. In addition, the presentation layer protocol also decodes and encodes the image and file format information. (7) Application Layer: The top layer in the OSI reference model, that is, Layer 7. An application layer is also called an application entity (AE). It consists of several specific application service elements (SASE) and one or more common application service elements (CASE. Each SASE provides specific application services, such as file transport access and management (FTAM), electronic and electronic processing (MHS), and virtual terminal protocol (VAP. Case provides a set of public application services, such as contact control service elements (ACSE), reliable transport service elements (rtse), and remote operation service elements (Rose. It is mainly responsible for providing interfaces to the software so that the program can use network services. The term "Application Layer" does not refer to a special application running on the network. The services provided by the application layer include file transmission, file management, and email information processing. For example, I am talking about Mandarin. The opposite party can only speak English. The other party translates my words into Mandarin through the presentation layer, but not necessarily some special guys, the meaning of a phrase. Therefore, you need professional knowledge and domain knowledge before you can understand it. The Application Layer does this. For computers, each application has a specific expression. Summary: 1. Physical Layer: mainly defines the physical device standards, such as the interface type of the network cable, the interface type of the optical fiber, and the transmission rate of various transmission media. Its main function is to transmit the bit stream (that is, it is converted from 1, 0 to the current strength for transmission, and then converted to 1, 0 after reaching the destination, that is, the digital-to-analog conversion and digital-to-analog conversion ). The data at this layer is called bits. 2. data link layer: defines how to format data for transmission and how to control access to physical media. This layer usually provides error detection and correction to ensure reliable data transmission. 3. Network Layer: Provides the connection and path selection between two host systems in a network located in different geographic locations. The development of Internet greatly increases the number of users accessing information from various sites in the world, and the network layer is the layer for managing such connections. 4. transmission Layer: defines some data transmission protocols and port numbers (WWW port 80, etc.), such as TCP (transmission control protocol, low transmission efficiency, high reliability, high transmission reliability requirements, large data volume), UDP (User Datagram Protocol, which is the opposite of TCP, is used to transmit data with low reliability requirements and small data volume, for example, QQ chat data is transmitted in this way ). Data received from the lower layer is segmented and transmitted, and then reorganized after the destination address is reached. This layer of data is often called segments. 5. Session Layer: establishes a data transmission path through the transport layer (port number: Transmission port and receiving port. It is mainly used to initiate a session or accept a session request between your systems (devices need to know each other, either an IP address, a MAC address, or a host name ). 6. Presentation Layer: ensure that the information sent by the application layer of one system can be read by the application layer of another system. For example, a PC program communicates with another computer. Does one computer use an extended Gbit/s exchange (ebcdic), and the other uses the American Standard ASCII code (ASCII) to indicate the same characters. If necessary, the presentation layer uses a common format to convert multiple data formats. 7. Application Layer: the OSI Layer closest to the user. This layer provides network services for your applications (such as email, file transfer, and terminal simulation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.