Layer-7 network functions
The layer-7 network includes the physical layer, data link layer, network layer, transmission layer, Session Layer, presentation layer, and application layer. The physical layer, data link layer, and network layer are usually called the media layer, which is the object of network engineers. The transport layer, Session Layer, presentation layer, and application layer are called the host layer, it is the content that users face and care about.
So what are the specific definitions and responsibilities of the layer-7 network? It is the protocol stack diagram of the OSI Layer-7 model. They are:
Level 1-physical layer: the physical layer defines the electrical or mechanical properties of the physical link between communication networks, and the operations for activating, maintaining, and disabling this link. Physical Layer feature parameters include voltage, data transmission rate, maximum transmission distance, and physical connection media.
Layer 2-data link layer: the actual physical link is unreliable and there will always be errors. The function of the data link layer is to divide the data into frames, transmission in data frame units) converts a faulty physical link into a data link that is not faulty for the upper layer. Its characteristic parameters include: physical address, network topology, error warning mechanism, sorting of transmitted data frames, and traffic control. The physical address is relative to the network layer address. It represents the node identification technology of the data link layer. The "Topology" is a term often encountered in the network, indicates how each device is connected, for example, bus-all devices are connected to a bus, and star-all devices are connected through a central node; an error warning is an error reported during data transmission to the upstream protocol. data frame sorting can re-arrange the transmitted data. traffic control is used to adjust the data transmission rate so that the acceptor is not overloaded.
OSL Reference Model (simple figure 1)
Application Layer
Presentation Layer
Session Layer
Transport Layer
Network Layer
Data Link Layer
Physical Layer
Layer 3-network layer: the network layer divides data into groups of a certain length and identifies the logical addresses of the source and target nodes in the group header. These addresses are like blocks and house numbers, it is the identifier of each node. The core function of the network layer is to obtain the path from the source to the destination based on these addresses. When multiple paths exist, it is also responsible for routing selection.
Layer 4-Transport Layer: provides reliable data transmission that is transparent to the upper layer (independent from the specific network. If the network layer is concerned with point-to-point transfer, it can be said that the transport layer is concerned with the final effect of "end-to-end" (from the source end to the target end. Its functions include flow control, multi-channel technology, virtual circuit management, error correction, and recovery. Among them, multi-channel technology enables the data of multiple different applications to be transmitted together through a single physical link; virtual circuits are the logical channel for data transmission, which is established, maintained, and terminated at the transmission layer; the error correction function can detect errors and take measures (such as retransmission) to solve the problem.
Layer 5-Session Layer: establishes, manages, and terminates communication application service requests and responses among network entities.
Layer 6-presentation layer: defines a series of code and code conversion functions to ensure that the source data can be recognized at the destination, such as the ASCII code of the text data that everyone is familiar, indicates the GIF of an image or the mpeg of an animation.
Layer 7-Application Layer: the application layer is the highest level for users. It enables direct conversations between networks and users through software applications, such as finding the target communication party, identifying available resources, and synchronizing operations.
The layer-7 bottom layer (physical layer, data link layer, and network layer) is usually called the media layer. They are not what users see, but silently play a supporting role in the network. They are the objects of network engineers; the upper layer (transport layer, Session Layer, presentation layer, and application layer) is called the host layer, which is the content that users are facing and concerned about. These programs often combine the functions of each layer, form a whole in front of the user. The web applications WWW, FTP, and telnet that everyone is familiar with are integrated with these multi-layer functions.
In actual data transmission, the sender sends the data to the application layer, and adds the control information of the layer to the presentation layer. The presentation layer is processed as a method, and the data is marked with its own ID to the Session Layer. Likewise, each layer adds the control information of the current layer to the received data and sends it to the next layer. When it finally reaches the physical layer, the data is transmitted to the receiver through the actual physical media. The acceptor performs the opposite operation with the sender. from the bottom up, the IDs are removed layer by layer and restored to the original data. It can be seen that the data communication parties must adopt the same protocol in the Peer layer and define the same data identification format, so as to ensure the correct transmission of data.
OSI and practical application model
The layer-7 model is a theoretical model, and its practical application is ever-changing. It is entirely possible to have variations. For most applications, we just roughly match the protocol family (protocol stack) with the layer-7 model to see if the specific Protocol actually used belongs to a child layer in layer-7, it also includes the upper and lower layers.
Do the protocols actually used in the network strictly follow these seven layers? This is not the case. The layer-7 model is a theoretical model, and its actual application is ever-changing. It is entirely possible to have variations. Some applications have been around for a long time and cannot be overturned after the launch of the layer-7 model. Therefore, for most applications, we just roughly match the protocol family (protocol stack) with the layer-7 model to see if the specific Protocol actually used belongs to a child layer in layer-7, it also includes the upper and lower layers. We have previously introduced the TCP/IP protocol. its correspondence with the layer-7 model is as follows:
Relationship between OSL and TCP/IP model (figure 2)
Application Layer *
Presentation layer application layer
Session Layer *
Transport Layer
Network Layer
Data link layer network interface layer
Physical Layer *
As shown in figure 2, most TCP/IP application protocols combine the functions of the OSI application layer, presentation layer, and Session Layer to form the application layer. Typical protocols include: HTTP, FTP, telnet, etc. The TCP/UDP protocol corresponds to the OSI transport layer and provides upper-layer data transmission assurance. The IP protocol corresponds to the OSI network layer, which defines the well-known IP address format, as the basis for finding the path in the inter-network. The bottom layer of TCP/IP is implemented by the network interface layer, which is equivalent to the OSI physical layer and data link layer, in fact, TCP/IP does not strictly define this layer, but applies the existing underlying network for transmission. This is why it is widely used.
Tcpip protocol tutorial this TCP/IP tutorial mainly takes into account that almost all the current Internet is based on the TCP/IP protocol, so we should understand what the TCP/IP architecture is? How it serves us. It becomes the foundation of the global Internet or internet, and connects most computers, no matter what operating system you use, it can be seen that the TCP/IP system is the fundamental cornerstone of Internet development in this century. For Network programmers, you can understand the TCP/IP mechanism and have basic elements for constructing any network application, such as winsocket, serial communication, and even Trojans.
I
First, let's talk about the layers of network protocols. network protocols are usually developed at different levels, and each layer is responsible for different communication functions. A protocol family, such as t c p/I p, is a combination of multiple protocols at different levels.
(1) The link layer, also known as the data link layer or network interface layer, usually includes the device driver in the operating system and the network interface card corresponding to the computing. They work together with the physical interface details of the cable (or any other transmission medium.
(2) the network layer, also known as the Internet layer, Processes Group Activities in the network, such as group routing. In the t c p/I p protocol family, network layer protocols include I p protocol (Internet Protocol ), I c m p protocol (I n t e r n e t Internet Control Packet protocol), And I g m p protocol (I n t e r n e t Group Management Protocol ).
(3) Transport layer, which provides end-to-end communication for applications on two hosts. In the t c p/I p protocol family, there are two different transmission protocols: T C P (Transmission Control Protocol) and U D p (User Datagram Protocol ). T c p provides high-reliability data communication for the two hosts. The work it does includes dividing the data that an application has handed over to it into small pieces and handing it over to the network layer below, confirming the received group, and setting the timeout clock for sending the final confirmation group. Because the transport layer provides high-reliability end-to-end communication, the application layer can ignore all these details. On the other hand, u d p provides a very simple service for the application layer. It only sends a group called a datagram from one host to another, but it does not guarantee that the datagram can reach the other end. Any required reliability must be provided by the application layer.
Application Layer telnet, FTP, and e-mail
Transport Layer TCP and UDP
Network Layer IP, ICMP, and IGMP
Link Layer device drivers and interface cards
(4) The application layer is responsible for handling specific application details. Almost all different t c p/I p implementations provide the following common applications :? Telnet Remote logon, FTP File Transfer Protocol, SMTP Simple Mail Transfer Protocol, SNMP Simple Network Management Protocol, what I want to tell you is that most network applications are designed as customer-server models. On the same layer, both parties have one or more protocols for communication. For example, a protocol allows the t c p layer to communicate, while another protocol allows the two I p layers to communicate.
In fact, the application layer does not pay attention to data transmission and exchange. It is generally only a user process. The Transport Layer mentioned above and the following three layers aim to process communication, they do not care about your application, but have a clear division of labor.