Introduction to OSI Models
We already know that TCP/IP can be applied to different networks. This requires a set of standards that everyone complies with to ensure communication between them. Because the dedicated nature and technology in the field of data communication are too broad, no computer expert is familiar with all the content.
Therefore, there must be a set of accepted and general reference architectures for clarification of standards. Before we understand the TCP/IP protocol, we must first understand a well-recognized network model, which is composed of International Standardization Organisation (ISO) A set of standard architecture developed in 1978: Reference Model for Open System Interconnection (OSI) Model. OSI is often cited to describe the structure and functions of data communication protocols. It has become a common basis for discussion in the communication age and has been widely used and recognized by the communication industry.
OSI divides various data communication functions into seven levels and performs their respective duties, but they are interdependent and cooperative. However, they can be divided into two groups ﹕
· Network Group: consists of the entity layer, data connection layer, and network region.
· User group: consists of the transport layer, conversation layer, presentation layer, and application layer.
You can view the arrangement of each protocol layer ﹕
Application)
Presentation)
Session Layer)
Transport)
Network)
Data Link)
Physical)
OSI reference model
OSI provides a very useful model for interpreting network protocols at different levels. These protocols are stacked like stacked wood. Therefore, this architecture is often called a stack) or protocol stack. Each agreement communicates only with the corresponding agreement, and then the structure is interpreted to the adjacent agreement. There is an inevitable agreement between each other on how to transmit data, and the agreements are deducted from each other to work together to complete the task. The layers do not need to know how other layers work. They only care about the protocols at the same level, but there is a set of established protocols between the layers to exchange processing results. There is an obvious advantage: This leaves the layers with their own design and development space. When a layer requires protocol updates, other layers do not need to be modified at the same time.
The following is a simple description of each one ﹕
Physical Layer)
In this layer, you must make mechanical and electronic decisions, that is, to define the devices to be used between the terminal and the network. At the same time, we need to determine what kind of wiring is used here> This layer actually defines various device specifications for applications in network transmission, and how to convert the signals carried by hardware into computers. electronic Signal (0 and 1) this is usually the Firmware function on the device. These specifications are generally developed by hardware manufacturers, such as the connector, voltage, wavelength, phase, and so on of the data cable.
For example, network cables, network cards, telephone lines, and so on all belong to the physical layer, that is, the media that can carry data to connect two computers: copper wires, infrared wires, and it can be an optical fiber. Our common physical layer is the Ethernet and Token Ring Lines used to connect the office network, or the telephone lines connected to the modem. The network card on the machine, or the modem connected to the remote end, can convert the electronic pulse on the physical media into the 0 and 1 that the computer can read.
Data Link Layer)
This layer specifies the information unit to be used (message unit, usually the Information unit on the LAN is called frame and translated as "frame" or "frame package ") and their format, and how to use the network. Each frame is assigned a MAC address code and a checksum value ).
The Data Link Layer Frame of Ethernet looks like ﹕
Data Link Layer Frame structure
Data is transmitted in bit units on the physical layer. The data connection layer must formulate data frame packages of different network forms to ensure that data can be transmitted in different network entities (such as coaxial cables ﹑ twisted Pair wires, optical fiber cables, telephone data lines, etc) for data transmission. There is a Binary Synchronous Communications protocol that determines how long it will take to resend a box packet if it is lost, and how to handle the resend box packet and packet validation. This agreement is also defined in this layer. The PPP protocol we usually use to dial Internet access is defined in this layer. At the same time, the xDLC Protocol generally used for Mainframe also falls within this scope.
The data connection layer generally has the following functions ﹕
· Physical Address, also known as the MAC Address
· Virtual Circuit connection and Logical Link establishment and Termination
· Transfer and Error Detection Methods of Control Box packages
· Transfer and receipt sequence and transmission mode of the Box package
· Determine the boundary between the establishment and restructuring of the Box package
· Confirmation of the detection Box package, as well as the Program for fixing in the case of no response or repeated sending
· Process object Layer conversion and Management
· Check and confirm the received Box package
· Check the physical address of the sending Box package to ensure that the information is correctly delivered to the destination network layer
In the IEEE802 standard, the data connection layer is further divided into two layers: Media Access Control and Logical Link Control. See the following table ﹕
IEEE 802/803. x standard
In general, this layer of work is to ensure a non-error physical data transmission.
Network Layer)
This layer is like an intermediary between network functions and user functions. It defines the routing and processing process of packets moving in the network. This layer also determines how the network performs management functions, such as sending status information to contacts and regulating Packet Flow..
The main function of the network layer is to allow packets to be successfully transmitted between different networks. It specifies the network addressing mode, and the transmission mode for processing data between different networks, processing the transmission between sub-networks, determining the routing path, network environment, data processing sequence, and so on.
Before a packet is sent, the sender creates a header for it as the basis for routing between networks or subnets. When identifying and processing data, the network layer ignores the definition defined by the high-level agreement and is only responsible for establishing, maintaining, and terminating connections between one or more networks.
The network layer usually has the following features ﹕
· If the packet does not belong to the same network, it will be handled by the router.
· Control data traffic. When the buffer zone of the router is saturated, the data transmission device is notified to use another path or to suspend sending packets.
· When the volume of the packet exceeds the MTU (Maximum Transmission Unit) value of the router, the router can reorganize the packet before transmitting it. (Some so-called software that increases the modem's Internet access speed is because it can optimize the MTU value of the computer and minimize the packet restructuring of the router to achieve the highest data transmission efficiency .)
· Responsible for the interpretation and conversion between MAC addresses and network addresses (such as IP addresses and IPX addresses)
One interesting thing is that the network layer can also hide the underlying protocol (network function) from the upper-layer protocol (User Function. In this way, users on the network can use different types of hardware. This is a very good thing, if you use different materials to build the network.
Transport Layer)
At this layer, we will set how to control data transmission between nodes, as well as methods for error detection and correction.
Because most networks, such as Ethernet and Token Ring, generally only thousands of bytes of data are transmitted at a time due to physical limitations (the maximum IP Packet Volume is 65536 bytes) however, many data that needs to be transmitted over the network will exceed this value. The main function of the transport layer is to ensure that the computer information is transmitted to the destination correctly. Its job is to "package", that is, to convert computer data into a package form, and then assign some testing means to pass the information correctly to the target computer, and then re-organize the packets back. information. If a packet is incomplete, it is re-sent. Duplicate packets can also be removed.
The transfer layer can send data only when the amount of data collected is large enough, not every time the application generates one data, this reduces the number of unnecessary transfers to ensure efficient transfer of tokens. Conversely, when an application generates a large amount of data, it splits the data into smaller packets for transmission.
The transport layer provides the following functions ﹕
· Take over the information sent from the upper-level agreement and perform "splitting" and "packaging.
· Use point-to-point methods for data transmission and response confirmation.
· After obtaining the data buffer saturation information of the receiving end, the data transmission will be suspended temporarily.
· Process different program protocols (such as ftp, http, and telnet) on a single address, and perform tracing and conversion respectively.
Session Layer)
This layer defines how to connect and disconnect, and how to exchange data on the network.
This layer is responsible for establishing and managing the communication mode between the computer and the computer, that is, setting and establishing connections before the data is actually transmitted. It defines the request and end of the connection, the setting of the transmission and receipt status, and other actions.
When node A is connected to Node B, A "connection request" message is sent first. If the other party accepts the connection, then, in response to the "establish request" message, the two sides will establish A meeting. When the meeting ends, node A will first send an "end request" message and wait for the other party to confirm the request. then the talks will be over.
The main functions of the conversation layer are as follows ﹕
· The program can be registered as a unique address on the network by computer name.
· Establish, monitor, and end Virtual circuits between computers ).
· Responsible for information synchronization between computers, monitoring data communication status, and handling error information.
The conversation layer provides reliable communication channels for different programs and their corresponding programs on another computer. Half-duplex (half duplex, that is, one-way) is used in some communication channels, while full-duplex (full duplex, that is, two-way) is used in some communication channels) the Mode for mutual agreement between programs, and synchronization, management, and other responsibilities are shared by the talks layer.
Presentation Layer)
At this layer, syntax, change, and format of data are defined. When the syntax and format of an application are different, this layer also defines how to translate these differences.
If you want to connect your PC to the mainframe computer over the network, you must use the appropriate mainframe text string, usually EBCDIS (External Binary Coded Decimal for Interchange Code) however, your PC uses the American Standard Code for Information Interchange. These two encoding formats are completely different. The presentation layer is mainly responsible for encoding and conversion between different machines.
Related Articles]
- Analysis and Summary of TCP/IP attack principles
- Detailed description of TCP/IP protocol datagram Structure
- Interpreting TCP/IP protocol by connecting to an instance