OSI has 7 layers, application layer, presentation layer, Session Layer, transmission layer, data link layer, and physical layer.
- The application layer is the only window in which the network can provide application services to end users. Its purpose is to support the requirements of applications connected to users. Due to different user requirements, the application layer contains a variety of application entities that support different applications, providing a variety of application services, such as email (MHS), file transfer (FTAM), virtual terminal (VT) and electronic data exchange (EDI. The main protocols include FTP (port 21), SMTP (port 25), DNS, and HTTP (port 80 ).
- One of the functions of the presentation layer is to provide a public language for communications between different hosts for interoperability. This type of service is required because different computer architectures use different data representations. For example, the IBM host uses ebcdic encoding, while most PCs use ASCII codes. In this case, the Session Layer is required to complete the conversion. Other functions include data encryption and data compression.
- The Session Layer provides services that allow applications to establish and maintain sessions and synchronize sessions. The Session Layer uses the verification point to resume communication from the verification point when the communication fails, that is, to control the interaction of information. This capability is extremely important for transferring large files.
- The transport layer is the first end-to-end Layer for data communication between two computers over the network. When the network layer service quality does not meet the requirements, it improves the Service to meet the requirements of the senior level. When the network layer service quality is good, it only uses a small amount of work. The transport layer can also be reused, that is, multiple logical connections can be created on a network connection. The transport layer is also called the transport layer. The transport layer only exists in the end-to-end open system. It is a layer between the low-Layer 3 Communication Subnet system and the high-Layer 3, but it is a very important layer. It is the last layer from the source to the target to control data transmission. An end-to-end service is provided. An end-to-end service indicates a source port number and a destination port number in the Protocol. The source port number and destination port number can be unique and indicate a process in the whole network. The Protocol is UDP/TCP. Network Devices: gateways are used for interconnection between the transport layer and the transport layer.
- The emergence of the network layer is also the result of network development. In the environment of online system and line switching, the functions of the network layer are not significant. When the number of data terminals increases. They are connected by a relay device. In this case, the requirement of a terminal is not only to communicate with the only one, but to communicate with multiple terminals. This is the problem of connecting the data of any two data terminal devices, that is, routing or route finding. In addition, when a physical channel is established and used by a user, many idle time is often wasted. People naturally want to share a link with multiple users. To solve this problem, the logical channel technology and virtual circuit technology have emerged. The network layer and lower layers provide point-to-point services, that is, data communication between hosts in the network. Protocol: IP/ICMP/IGMP/arp/RARP. network Devices: vro (the working principle of vro is that if a wants to communicate with B, A and B are interconnected through the vro, A receives the data with the TCP/UDP header from its transmission layer, adds the IP protocol to the data link layer, and adds the frame header to the data link layer for physical layer transmission, when the router receives the data sent from a, it unpacks the data and submits it to the router's network layer. The network layer finds the forwarding Port Based on the IP address, then, check whether the network protocols of B and A are the same. If they are different, unpack the router and package it in sequence according to the network protocol of B, and then transfer it to B.
- The data link layer can be roughly understood as a data channel. The physical layer provides transmission media and connections for data communication between devices. The media is persistent and the connection has a lifetime. During the connection lifetime, data communication between the two ends can be performed once or multiple times. Each communication requires the establishment of communication contacts and the removal of communication contacts. This established data transmission and receiving relationship is called a data link. However, data transmitted on physical media is inevitably affected by various unreliable factors and may cause errors. In order to make up for the deficiencies in the physical layer, it provides error-free data transmission for the upper layer, it is necessary to check and correct the data. The establishment and removal of data links, data error detection and error correction are the basic tasks of the data link layer. Network Devices: bridges (the working principle of bridges is: 1) act as a bridge to receive data, filter addresses, and forward data, it is used to realize data exchange between multiple network systems. 2) the bridge is mainly used to connect two LAN networks and determine whether to forward received data frames through the MAC address of the data link layer. Host a and host B need to communicate. When the bridge receives data from host, determine whether A and B are in the same LAN Based on the MAC address and an address table maintained by the bridge software. If A and B are in the same LAN, the received frame is discarded, if not, it will be automatically forwarded to the network where B is located.), switch. Bridges with multiple ports are switches.
- The physical layer provides a data transmission path for a data device. The data path can be a physical media or a connection from multiple physical media. network devices include Relay Links and hubs. A repeater with multiple ports is a hub (for example, if the transmission distance of twisted pair wires is m and the signal length exceeds the whole length, the communication fails. In this case, we need a repeater to expand the signal !).
Conclusion: In the osi7 layer protocol, when user a communicates with user B Over FTP, user a first activates port 21 at the application layer and needs to provide file transfer service for himself,
After port 21 is activated, the data is sent to the presentation layer. The presentation layer encrypts and compresses the data, and then the presentation layer submits the data to the Session Layer. The Session Layer establishes a session and ends a session, but establishes a session, end the session. If you do not implement the session, you only need to manage the session. The establishment of a specific session requires the implementation of the transport layer. The Transport Layer selects a connection method, TCP/UDP, however, it still does not establish a connection. Instead, it selects a connection method and adds the protocol header to the network layer. The network layer selects a route for this session, after the protocol header is added and handed over to the data link layer, the data link layer is responsible for establishing the session, establishing the connection, and adding the frame header to the physical layer for bit stream transmission.
[Switch] OSI Layer-7 model details