Basic Network Notes-OSI Layer-7 Model

Source: Internet
Author: User
The OSI Layer-7 model is complex due to the entire network connection process, including the interconnection between hardware, software data packets, and applications. If you want to write a program that concatenates all functions of the Internet, you must rewrite the entire program when a problem occurs in a small link. Therefore, we divide the entire network into several layers, each of which has its own independent functions, and each layer of code can be written independently, because they do not interfere with each other. In this way, when a problem occurs in a small link, you only need to rewrite the code at this layer. In addition, the entire network layer can be clearer.

The transfer of information on the network is like a process of sending a package, starting from your application to stuffing data into the package on the seventh layer, and then to the package on the first layer in sequence, finally, it is transmitted to the receiving end through the transmission media, and the package is unwrapped layer by layer (because each layer only knows the same class of the other side ).

Since it is a package, we all know that there will be important information on the cover of the package, including where it comes from, where it is going, who the recipient is, and so on. The package contains real data. Similarly, in a layer-7 model, each layer has its own unique header to tell the other party what the information is, and the real data is appended to the back-end! We can use the following illustration to show the names of each layer of the seven layers, and how the data is placed in each layer of the package:


The upper-layer package is placed into the lower-layer data, and the front of the data is the data header. The second layer is special, because the second layer (Data Link junction layer) is mainly located in the middle of packet and frame, he had to put software packages into packages that could be processed by hardware, so this class was divided into two child layers to process the corresponding data. Because it is special, the data format on the second layer is quite different. There is also a check code at the end.

What are the tasks of each class? Simply put, each layer is responsible for the following tasks:

Layered

Responsible content

Layer 1
Physical Layer
Physical Layer

Because network media can only transmit strings 0 and 1, the physical layer must define the voltage and signal of the media device used, at the same time, you must understand the encoding method for converting a data frame into a bit string, connect to the Real Media, and transmit/receive a bit string.

Layer 2
Data Link completion Layer
Data-Link Layer

This layer is a special class, because the bottom layer is the definition of entities, while the top layer is the definition of software encapsulation. Therefore, the second layer is divided into two sub-layers for data conversion. In the hardware-oriented media section, we are mainly responsible for the Mac (Media Access Control). We call this datagram as a MAC frame ), mac is the main datagram encapsulation that can be processed by network media. It is also the data that is finally encoded as a bit string by the physical layer. Mac must use the communication protocol to obtain the right to use the media. Currently, the most common use is the IEEE 802.3 Ethernet protocol. For more information about Mac and Ethernet, see the following section.

The software-biased part is controlled by the Logical Link Control (LLC) layer, which is mainly used to process packets from the upper layer and convert them into Mac formats, responsible for information exchange, traffic control, and troubleshooting of errors.

Layer 3
Network Layer
Network Layer

This layer is what we are most interested in, because the IP (Internet Protocol) we mentioned is defined at this layer. At the same time, it also defines the online establishment, termination and maintenance between computers, and the transmission path selection of data packets. Therefore, in this level, the most important except IP address, it is the concept of route for packets to reach their destination!

Layer 4
Transport Layer
Transport Layer

This layer defines the online technologies (such as TCP and UDP) between the sending end and the receiving end, and also includes the packet format of this technology, data packets are transmitted, the process is controlled, and the detection check and recovery of the transmission process are re-transmitted to ensure that each data packet can arrive at the target end correctly.

Layer 5
Conversation Layer
Session Layer

At this level, the connection and hanging of the online channels between two addresses are defined. In addition, you can also establish an Application Discussion, provide other enhanced services such as network management, sign-in and sign-off, and control the discussion. If the transport layer is determining whether data packets can reach the target correctly, the conversation layer is confirming that the network service is established online.

Layer 6
Presentation Layer
Presentation Layer

The data format we created on the application does not necessarily conform to the standard encoding format for network transmission! Therefore, at this level, the main action is to convert (or recode) the data format from the local application into the standard format of the network, then it is handed over to the bottom transfer layer and other protocols for processing. Therefore, at this level, we mainly define the conversion of data formats between network services (or programs), including data encryption and decryption.

Layer 7
Application Layer
Application Layer

The Application Layer does not belong to the application itself. Instead, it defines how the application enters the communication interface at this layer to receive or transmit data to the application and finally display the data to the user.

In fact, the OSI Layer-7 protocol is only a reference model. Currently, there is no well-known operating system using the Internet program code of the OSI Layer-7 protocol in the network society. So what are you doing? This is because the layer-7 protocol defined by OSI can be interpreted very well in terms of network transmission. Therefore, we all use the layer-7 OSI protocol as an understanding of network teaching and concepts. As for the actual code of the networked program, let's give it to TCP/IP!



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.