Menu
Is free
registration
home  /  Advice/ Functions of the levels of the osi model. Theory: OSI network model

Functions of the levels of the osi model. Theory: OSI network model

For a unified representation of data in networks with heterogeneous devices and software, the International Standards Organization (ISO) has developed a basic communication model open systems OSI (Open System Interconnection). This model describes the rules and procedures for transferring data in various network environments when organizing a communication session. The main elements of the model are layers, application processes and physical means of connection. On fig. 1.10 shows the structure of the basic model.

Each layer of the OSI model performs a specific task in the process of transmitting data over the network. The base model is the basis for the development of network protocols. OSI divides the communication functions in the network into seven layers, each of which serves a different part of the open systems interoperability process.

The OSI model only describes system-wide means of interaction, not end-user applications. Applications implement their own communication protocols by calling system tools.

Rice. 1.10. OSI Model

If an application can take over the functions of some of the upper layers of the OSI model, then for communication it accesses directly the system tools that perform the functions of the remaining lower layers of the OSI model.

Interaction of layers of the OSI model

The OSI model can be divided into two various models, as shown in fig. 1.11:

A horizontal model based on protocols that provides a mechanism for the interaction of programs and processes on different machines;

A vertical model based on services provided by neighboring layers to each other on the same machine.

Each layer of the sending computer interacts with the same layer of the receiving computer as if it were directly connected. Such a connection is called a logical or virtual connection. In fact, the interaction is carried out between adjacent levels of one computer.

So, the information on the sending computer must pass through all levels. Then it is transmitted over the physical medium to the receiving computer and again passes through all the layers until it reaches the same level from which it was sent on the sending computer.

In the horizontal model, two programs need a common protocol to exchange data. In a vertical model, adjacent layers communicate using Application Programming Interfaces (APIs).

Rice. 1.11. Computer Interaction Diagram in the Basic OSI Reference Model

Before being fed into the network, the data is broken into packets. A packet is a unit of information transmitted between stations on a network.

When sending data, the packet passes sequentially through all layers of the software. At each level, the control information of this level (header) is added to the packet, which is necessary for successful data transmission over the network, as shown in Fig. 1.12, where Zag is the packet header, End is the end of the packet.

On the receiving side, the packet goes through all the layers in reverse order. At each layer, the protocol at that layer reads the packet's information, then removes the information added to the packet at the same layer by the sender, and passes the packet to the next layer. When the packet reaches the Application layer, all control information will be removed from the packet and the data will return to its original form.

Rice. 1.12. Formation of a package of each level of the seven-level model

Each level of the model has its own function. The higher the level, the more difficult the task it solves.

It is convenient to think of the individual layers of the OSI model as groups of programs designed to perform specific functions. One layer, for example, is responsible for providing the conversion of data from ASCII to EBCDIC and contains the programs needed to accomplish this task.

Each layer provides a service to a higher layer, in turn requesting a service from the lower layer. The upper layers request a service in much the same way: as a rule, it is a requirement to route some data from one network to another. The practical implementation of the principles of data addressing is assigned to the lower levels. On fig. 1.13 given short description functions at all levels.

Rice. 1.13. Functions of the OSI Model Layers

The considered model determines the interaction of open systems different manufacturers in the same network. Therefore, it performs coordinating actions for them on:

Interaction of applied processes;

Data presentation forms;

Uniform data storage;

Network resource management;

Data security and information protection;

Diagnostics of programs and hardware.

Application layer

The application layer provides application processes with access to the interaction area, is the upper (seventh) level and is directly adjacent to application processes.

In fact, the application layer is a set of various protocols by which network users access shared resources such as files, printers, or hypertext Web pages, and also organize their joint work, for example, using the protocol Email. Special application service elements provide services for specific application programs such as file transfer and terminal emulation programs. If, for example, the program needs to send files, then the FTAM (File Transfer, Access, and Management) file transfer protocol will be used. In the OSI model, an application program that needs to perform a specific task (for example, update a database on a computer) sends specific data in the form of a Datagram to the application layer. One of the main tasks of this layer is to determine how an application request should be processed, in other words, what form the request should take.

The unit of data that the application layer operates on is usually called a message.

The application layer performs the following functions:

1. Performing various types of work.

File transfer;

Job management;

System management, etc;

2. Identification of users by their passwords, addresses, electronic signatures;

3. Determination of functioning subscribers and the possibility of access to new application processes;

4. Determining the sufficiency of available resources;

5. Organization of requests for connection with other application processes;

6. Transfer of applications to the representative level for the necessary methods for describing information;

7. Selection of procedures for the planned process dialogue;

8. Management of data exchanged between application processes and synchronization of interaction between application processes;

9. Determining the quality of service (delivery time of data blocks, acceptable error rate);

10. Agreement on the correction of errors and the determination of the reliability of data;

11. Coordination of restrictions imposed on the syntax (character sets, data structure).

These functions define the kinds of services that the application layer provides to application processes. In addition, the application layer transfers to application processes the service provided by the physical, data link, network, transport, session and presentation layers.

At the application level, it is necessary to provide users with already processed information. This can be handled by system and user software.

The application layer is responsible for accessing applications to the network. The tasks of this level are file transfer, mail exchange and network management.

The most common top three layer protocols are:

FTP (File Transfer Protocol) file transfer protocol;

TFTP (Trivial File Transfer Protocol) is the simplest file transfer protocol;

X.400 email;

Telnet work with a remote terminal;

SMTP (Simple Mail Transfer Protocol) is a simple mail exchange protocol;

CMIP (Common Management Information Protocol) common information management protocol;

SLIP (Serial Line IP) IP for serial lines. Protocol for serial character-by-character data transfer;

SNMP (Simple Network Management Protocol) simple network management protocol;

FTAM (File Transfer, Access, and Management) is a protocol for transferring, accessing and managing files.

Presentation layer

The functions of this level are the presentation of data transmitted between application processes in the desired form.

This layer ensures that the information passed by the application layer will be understood by the application layer in another system. If necessary, the presentation layer at the time of information transfer performs the conversion of data formats into some common presentation format, and at the time of reception, respectively, performs the reverse conversion. Thus, application layers can overcome, for example, syntactical differences in data representation. This situation can occur in a LAN with computers of different types (IBM PC and Macintosh) that need to exchange data. So, in the fields of databases, information should be presented in the form of letters and numbers, and often in the form of a graphic image. You need to process this data, for example, as floating point numbers.

The common data representation is based on the ASN.1 system, which is common for all levels of the model. This system serves to describe the structure of files, and also solves the problem of data encryption. At this level, data encryption and decryption can be performed, thanks to which the secrecy of data exchange is ensured immediately for all application services. An example of such a protocol is the Secure Socket Layer (SSL) protocol, which provides secure messaging for the application layer protocols of the TCP/IP stack. This layer provides data transformation (encoding, compression, etc.) of the application layer into an information stream for the transport layer.

The representative layer performs the following main functions:

1. Generation of requests to establish interaction sessions between application processes.

2. Coordination of data presentation between application processes.

3. Implementation of data presentation forms.

4. Presentation of graphic material (drawings, drawings, diagrams).

5. Classification of data.

6. Sending requests to terminate sessions.

Presentation layer protocols are usually part of the protocols of the top three layers of the model.

Session layer

The session layer is the layer that defines the procedure for conducting sessions between users or application processes.

The session layer provides conversation control to keep track of which side is currently active and also provides a means of synchronization. The latter allow you to insert checkpoints into long transfers so that in case of a failure, you can go back to the last checkpoint, instead of starting all over again. In practice, few applications use the session layer, and it is rarely implemented.

The session layer controls the transfer of information between application processes, coordinates the reception, transmission and issuance of one communication session. In addition, the session layer additionally contains the functions of password management, conversation control, synchronization and cancellation of communication in a transmission session after a failure due to errors in the lower layers. The functions of this layer are to coordinate communication between two application programs running on different workstations. It comes in the form of a well-structured dialogue. These functions include creating a session, managing the transmission and reception of message packets during a session, and terminating a session.

At the session level, it is determined what the transfer between two application processes will be:

Half duplex (processes will send and receive data in turn);

Duplex (processes will send data and receive them at the same time).

In half-duplex mode, the session layer issues a data token to the process that initiates the transfer. When the time comes for the second process to respond, the data token is passed to it. The session layer allows transmission only to the party that possesses the data token.

The session layer provides the following functions:

1. Establishment and completion at the session level of a connection between interacting systems.

2. Performing normal and urgent data exchange between application processes.

3. Managing the interaction of applied processes.

4. Synchronization of session connections.

5. Notification of application processes about exceptional situations.

6. Establishment of labels in the applied process, allowing, after a failure or error, to restore its execution from the nearest label.

7. Interruption in the necessary cases of the application process and its correct resumption.

8. Termination of the session without data loss.

9. Transmission of special messages about the progress of the session.

The session layer is responsible for organizing data exchange sessions between end machines. Session layer protocols are usually a component of the protocols of the top three layers of the model.

Transport Layer

The transport layer is designed to transfer packets through a communication network. At the transport layer, packets are divided into blocks.

On the way from the sender to the recipient, packets can be corrupted or lost. While some applications have their own error handling, there are some that prefer to deal with a reliable connection right away. The job of the transport layer is to ensure that applications or upper layers of the model (application and session) transfer data with the degree of reliability that they require. The OSI model defines five classes of service provided by the transport layer. These types of services differ in the quality of the services provided: urgency, the ability to restore interrupted communications, the availability of multiplexing facilities for multiple connections between different application protocols through a common transport protocol, and most importantly, the ability to detect and correct transmission errors such as distortion, loss and duplication of packets.

The transport layer determines the addressing of physical devices (systems, their parts) in the network. This layer guarantees the delivery of blocks of information to recipients and manages this delivery. Its main task is to provide efficient, convenient and reliable forms of information transfer between systems. When more than one packet is in processing, the transport layer controls the order in which the packets pass through. If a duplicate of a previously received message passes, then this layer recognizes this and ignores the message.

The functions of the transport layer include:

1. Network transmission control and ensuring the integrity of data blocks.

2. Detection of errors, their partial elimination and reporting of uncorrected errors.

3. Recovery of transmission after failures and malfunctions.

4. Consolidation or division of data blocks.

5. Granting of priorities at transfer of blocks (normal or urgent).

6. Transfer confirmation.

7. Elimination of blocks in deadlock situations in the network.

Starting from the transport layer, all higher protocols are implemented in software, usually included in the network operating system.

The most common transport layer protocols include:

TCP (Transmission Control Protocol) TCP/IP stack transmission control protocol;

UDP (User Datagram Protocol) is the user datagram protocol of the TCP/IP stack;

NCP (NetWare Core Protocol) basic protocol for NetWare networks;

SPX (Sequenced Packet eXchange) Novell Stack Sequenced Packet Exchange;

TP4 (Transmission Protocol) - class 4 transmission protocol.

Network Layer

The network layer provides for the laying of channels connecting subscriber and administrative systems through a communication network, choosing the route of the fastest and most reliable way.

The network layer establishes communication in computer network between two systems and provides virtual circuits between them. A virtual or logical channel is such a functioning of network components that creates the illusion of laying the necessary path between the interacting components. In addition, the network layer informs the transport layer about errors that occur. Network layer messages are commonly referred to as packets. They contain pieces of data. The network layer is responsible for their addressing and delivery.

Laying the best path for data transmission is called routing, and its solution is the main task of the network layer. This problem is compounded by the fact that the shortest path is not always the best. Often the criterion for choosing a route is the time of data transfer along this route; it depends on the bandwidth of communication channels and traffic intensity, which can change over time. Some routing algorithms try to adapt to load changes, while others make decisions based on long-term averages. Route selection can also be based on other criteria, such as transmission reliability.

The link layer protocol provides data delivery between any nodes only in a network with an appropriate typical topology. This is a very strict limitation that does not allow building networks with a developed structure, for example, networks that combine several enterprise networks into a single network, or highly reliable networks in which there are redundant links between nodes.

Thus, within the network, data delivery is regulated by the link layer, but data delivery between networks is handled by the network layer. When organizing the delivery of packets at the network level, the concept of a network number is used. In this case, the recipient's address consists of the network number and the number of the computer on that network.

Networks are interconnected by special devices called routers. A router is a device that collects information about the topology of interconnections and, based on it, forwards network layer packets to the destination network. In order to transfer a message from a sender located in one network to a recipient located in another network, it is necessary to make a certain number of transit transfers (hops) between networks, each time choosing the appropriate route. Thus, a route is a sequence of routers that a packet traverses.

The network layer is responsible for dividing users into groups and routing packets based on the translation of MAC addresses into network addresses. The network layer also provides transparent transmission of packets to the transport layer.

The network layer performs the following functions:

1. Creation of network connections and identification of their ports.

2. Detection and correction of errors that occur during transmission through a communication network.

3. Packet flow control.

4. Organization (ordering) of sequences of packages.

5. Routing and switching.

6. Segmentation and consolidation of packages.

The network layer defines two kinds of protocols. The first type refers to the definition of rules for the transmission of packets with data of end nodes from a node to a router and between routers. It is these protocols that are usually referred to when talking about network layer protocols. However, another type of protocol, called routing information exchange protocols, is often referred to as the network layer. Routers use these protocols to collect information about the topology of interconnections.

Network layer protocols are implemented by software modules of the operating system, as well as software and hardware of routers.

The most commonly used protocols at the network layer are:

IP (Internet Protocol) Internet protocol, a network protocol of the TCP/IP stack that provides address and routing information;

IPX (Internetwork Packet Exchange) is an Internet packet exchange protocol designed for addressing and routing packets in Novell networks;

X.25 international standard for global packet-switched communications (this protocol is partially implemented at layer 2);

CLNP (Connection Less Network Protocol) is a network protocol without organizing connections.

Link layer (Data Link)

The information unit of the link layer are frames (frame). Frames are a logically organized structure into which data can be placed. The task of the link layer is to transfer frames from the network layer to the physical layer.

At the physical layer, bits are simply sent. This does not take into account that in some networks, in which communication lines are used alternately by several pairs of interacting computers, the physical transmission medium may be busy. Therefore, one of the tasks of the link layer is to check the availability of the transmission medium. Another task of the link layer is to implement error detection and correction mechanisms.

The link layer ensures that each frame is transmitted correctly by placing a special bit sequence at the beginning and end of each frame to mark it, and also calculates a checksum by summing all the bytes of the frame in a certain way and adding a checksum to the frame. When a frame arrives, the receiver again calculates the checksum of the received data and compares the result with the checksum from the frame. If they match, the frame is considered valid and accepted. If the checksums do not match, then an error is generated.

The task of the link layer is to take packets coming from the network layer and prepare them for transmission by fitting them into a frame of the appropriate size. This layer is required to determine where the block starts and ends, and to detect transmission errors.

At the same level, the rules for using the physical layer by network nodes are defined. The electrical representation of data in the LAN (data bits, data encoding methods, and markers) is recognized at this and only at this level. Here, errors are detected and corrected (by requesting data retransmission).

The link layer provides the creation, transmission and reception of data frames. This layer services network layer requests and uses the physical layer service to receive and transmit packets. The IEEE 802.X specifications divide the link layer into two sublayers:

LLC (Logical Link Control) logical link control provides logical link control. The LLC sublayer provides services to the network layer and is concerned with the transmission and reception of user messages.

MAC (Media Assess Control) media access control. The MAC sublayer regulates access to the shared physical medium (token passing or collision or collision detection) and controls access to the communication channel. The LLC sublayer is above the MAC sublayer.

The data link layer defines media access and transmission control through a data transfer procedure over a link.

With large sizes of transmitted data blocks, the link layer divides them into frames and transmits frames as sequences.

Upon receipt of frames, the layer forms transmitted data blocks from them. The size of a data block depends on the transmission method, the quality of the channel through which it is transmitted.

In LANs, link-layer protocols are used by computers, bridges, switches, and routers. In computers, the functions of the link layer are implemented by the joint efforts of network adapters and their drivers.

The link layer can perform the following types of functions:

1. Organization (establishment, management, termination) of channel connections and identification of their ports.

2. Organization and transfer of personnel.

3. Detection and correction of errors.

4. Data flow management.

5. Ensuring the transparency of logical channels (transfer of data encoded in any way over them).

The most commonly used protocols at the link layer include:

HDLC (High Level Data Link Control) high-level data link control protocol for serial connections;

IEEE 802.2 LLC (Type I and Type II) provide MAC for 802.x environments;

Ethernet network technology according to the IEEE 802.3 standard for networks using bus topology and multiple access with carrier listening and collision detection;

Token ring network technology according to the IEEE 802.5 standard, using a ring topology and a token passing ring access method;

FDDI (Fiber Distributed Date Interface Station) IEEE 802.6 network technology using fiber optic media;

X.25 is an international standard for global packet-switched communications;

Frame relay network organized from X25 and ISDN technologies.

Physical Layer

The physical layer is designed to interface with the physical means of connection. Physical connectivity is the combination of physical media, hardware and software that enables signaling between systems.

The physical medium is a material substance through which signals are transmitted. The physical medium is the foundation upon which the physical means of connection are built. Ether, metals, optical glass and quartz are widely used as physical media.

The Physical Layer consists of a Media Interface Sublayer and a Transmission Transformation Sublayer.

The first of them provides pairing of the data flow with the used physical communication channel. The second performs transformations related to the applied protocols. The physical layer provides the physical interface to the data channel and also describes the procedures for transmitting signals to and from the channel. At this level, the electrical, mechanical, functional and procedural parameters for physical connection in systems. The physical layer receives data packets from the overlying link layer and converts them into optical or electrical signals corresponding to 0 and 1 of the binary stream. These signals are sent through the transmission medium to the receiving node. The mechanical and electrical/optical properties of the transmission medium are defined at the physical layer and include:

Type of cables and connectors;

Pin assignment in connectors;

Signal coding scheme for values ​​0 and 1.

The physical layer performs the following functions:

1. Establishment and disconnection of physical connections.

2. Transmission of signals in serial code and reception.

3. Listening, if necessary, channels.

4. Identification of channels.

5. Notification of the occurrence of faults and failures.

Notification about the occurrence of malfunctions and failures is due to the fact that a certain class of events is detected at the physical layer that interferes with the normal operation of the network (collision of frames sent by several systems at once, channel break, power failure, loss of mechanical contact, etc.). The types of service provided to the data link layer are defined by the physical layer protocols. Listening to the channel is necessary in cases where a group of systems is connected to one channel, but only one of them is allowed to transmit signals at the same time. Therefore, listening to the channel allows you to determine whether it is free to transmit. In some cases, for a clearer definition of the structure, the physical layer is divided into several sublevels. For example, the physical layer of a wireless network is divided into three sublayers (Figure 1.14).

Rice. 1.14. Wireless LAN physical layer

Physical layer functions are implemented in all devices connected to the network. On the computer side, physical layer functions are performed network adapter. Repeaters are the only type of equipment that only works at the physical layer.

The physical layer can provide both asynchronous (serial) and synchronous (parallel) transmission, which is used for some mainframes and minicomputers. At the Physical layer, an encoding scheme must be defined to represent binary values ​​for transmission over a communication channel. Many local area networks use Manchester encoding.

An example of a physical layer protocol is the specification of 10Base-T Ethernet technology, which defines a category 3 unshielded twisted pair with a characteristic impedance of 100 ohms, an RJ-45 connector, a maximum length of a physical segment of 100 meters, a Manchester code for data representation, and other characteristics as the cable used. environment and electrical signals.

The most common physical layer specifications include:

EIA-RS-232-C, CCITT V.24/V.28 - Mechanical/Electrical Unbalanced Serial Interface;

EIA-RS-422/449, CCITT V.10 - mechanical, electrical and optical characteristics of a balanced serial interface;

Ethernet is an IEEE 802.3 network technology for networks using bus topology and multiple access with carrier sniffing and collision detection;

Token ring is an IEEE 802.5 network technology that uses a ring topology and a token passing ring access method.

A vulnerability (CVE-2019-18634) has been identified in the sudo utility used to organize the execution of commands on behalf of other users, which allows you to elevate your privileges in the system. Problem […]

The release of WordPress 5.3 improves and expands the block editor introduced in WordPress 5.0 with a new block, more intuitive interaction, and improved accessibility. New features in the editor […]

After nine months of development, the FFmpeg 4.2 multimedia package is available, which includes a set of applications and a collection of libraries for operations on various multimedia formats (recording, converting, and […]

  • New features in Linux Mint 19.2 Cinnamon

    Linux Mint 19.2 is a Long Term Support release that will be supported until 2023. It comes with updated software and contains improvements and many new […]

  • Linux Mint 19.2 distribution released

    The release of the Linux Mint 19.2 distribution kit, the second update of the Linux Mint 19.x branch, formed on the Ubuntu 18.04 LTS package base and supported until 2023, is presented. The distribution is fully compatible […]

  • New service releases of BIND are available that contain bug fixes and feature enhancements. New releases can be downloaded from the downloads page on the developer's website: […]

    Exim is a message transfer agent (MTA) developed at the University of Cambridge for use in Unix systems connected to the Internet. It is freely available in accordance with […]

    After almost two years of development, ZFS on Linux 0.8.0 is released, implementing file system ZFS packaged as a module for the Linux kernel. The module has been tested with Linux kernels from 2.6.32 to […]

    The IETF (Internet Engineering Task Force), which develops the protocols and architecture of the Internet, has completed the formation of the RFC for the ACME (Automatic Certificate Management Environment) […]

    Let’s Encrypt, a non-profit certification authority controlled by the community and providing certificates free of charge to everyone, summed up the past year and talked about plans for 2019. […]

    The modern IT world is a huge branching structure that is difficult to understand. To simplify understanding and improve debugging, a modular architecture was used at the design stage of protocols and systems. It is much easier for us to find out that the problem is in the video chip when the video card is a separate device from the rest of the equipment. Or to notice a problem in a separate section of the network than to shovel the entire network as a whole.

    A separate layer of IT - a network - is also built in a modular way. The network operation model is called network model the basic reference model for the interaction of open systems ISO/OSI. Briefly - OSI model.

    The OSI model consists of 7 layers. Each level is abstracted from the others and knows nothing of their existence. The OSI model can be compared to the structure of a car: the engine does its job, creating torque and giving it to the gearbox. The engine absolutely does not care what happens next with this torque. Will he turn the wheel, caterpillar or propeller. Just like a wheel, it doesn't matter where this torque comes from - from the engine or the crank that the mechanic turns.

    Here it is necessary to add the concept of payload. Each level carries a certain amount of information. Some of this information is serviceable for this level, for example, an address. The site's IP address does not provide us with any useful information. We only care about the cats that the site shows us. So this payload is carried in that part of the layer called the protocol data unit (PDU).

    Layers of the OSI Model

    Let's take a closer look at each layer of the OSI Model.

    1 level. Physical ( physical). Load unit ( PDU) here is a bit. In addition to ones and zeros, the physical level knows nothing. Wires, patch panels, network hubs (hubs that are now difficult to find in the networks we are used to), network adapters work at this level. It is the network adapters and nothing more from the computer. The network adapter itself receives a sequence of bits and passes it on.

    2nd level. Channel ( data link). PDU - frame ( frame). Addressing appears at this level. The address is the MAC address. The link layer is responsible for the delivery of frames to the destination and their integrity. In the networks we are used to, the ARP protocol works at the data link layer. Second-level addressing works only within one network segment and knows nothing about routing - this is handled by a higher level. Accordingly, devices operating on L2 are switches, bridges and a network adapter driver.

    3rd level. Network ( network). PDU package ( packet). The most common protocol (I won’t talk about the “most common” further - an article for beginners and they usually don’t encounter exotic) here is IP. Addressing occurs by IP addresses, which consist of 32 bits. The protocol is routable, that is, a packet is able to get to any part of the network through a certain number of routers. Routers work on L3.

    4th level. Transport ( transportation). PDU segment ( segment)/datagram ( datagram). At this level, the concepts of ports appear. TCP and UDP work here. Protocols of this layer are responsible for direct communication between applications and for the reliability of information delivery. For example, TCP is able to request a retransmission of data in case the data was received incorrectly or not all. TCP can also change the data transfer rate if the receiving side does not have time to accept everything (TCP Window Size).

    The following levels are only "correctly" implemented in the RFC. In practice, the protocols described at the following levels operate simultaneously at several levels of the OSI model, so there is no clear separation into session and presentation levels. In this regard, the main stack currently used is TCP / IP, which we will talk about below.

    Level 5 session ( session). data PDU ( data). Manages a communication session, information exchange, rights. Protocols - L2TP, PPTP.

    6th level. Executive ( presentation). data PDU ( data). Presentation and encryption of data. JPEG, ASCII, MPEG.

    7th level. Applied ( application). data PDU ( data). The most numerous and varied level. It runs all high-level protocols. Such as POP, SMTP, RDP, HTTP, etc. The protocols here do not have to think about routing or guaranteeing the delivery of information - these are handled by lower layers. At level 7, it is only necessary to implement specific actions, for example, receiving an html code or an email message to a specific recipient.

    Conclusion

    The modularity of the OSI model allows you to quickly find problem areas. After all, if there is no ping (3-4 levels) to the site, there is no point in digging into the overlying layers (TCP-HTTP) when the site is not displayed. Abstracting from other levels, it is easier to find an error in the problematic part. By analogy with a car - we do not check the candles when we pierced the wheel.

    The OSI model is a reference model - a kind of spherical horse in a vacuum. Its development took a very long time. In parallel with it, the TCP / IP protocol stack was developed, which is actively used in networks at the present time. Accordingly, an analogy can be drawn between TCP/IP and OSI.

    The OSI network model is a reference model for the interaction of open systems, in English it sounds like the Open Systems Interconnection Basic Reference Model. Its purpose in the generalized representation of funds networking.

    That is, the OSI model is generalized standards for software developers, thanks to which any computer can equally decrypt data transmitted from another computer. To make it clear, I will give a real-life example. It is known that bees see everything around them in ultraviolet light. That is, our eye and the bee perceive the same picture in completely different ways, and what insects see may be imperceptible to human vision.

    It's the same with computers - if one developer writes an application in some programming language that his own computer understands, but is not available to any other, then on any other device you will not be able to read the document created by this application. Therefore, we came up with the idea that when writing applications, follow a single set of rules that is understandable to everyone.

    OSI levels

    For clarity, the process of network operation is usually divided into 7 levels, each of which has its own group of protocols.

    A network protocol is the rules and technical procedures that allow computers on a network to connect and exchange data.
    A group of protocols united by a single end goal is called a protocol stack.

    To perform different tasks, there are several protocols that deal with system maintenance, such as the TCP/IP stack. Let's take a closer look here at how information from one computer is sent over a local network to another computer.

    SENDER computer tasks:

    • Get data from app
    • Break them into small packages if the volume is large
    • Prepare for transmission, that is, specify the route, encrypt and re-encode to a network format.

    Tasks of the RECIPIENT's computer:

    • Receive data packets
    • Remove service information from it
    • Copy data to clipboard
    • After complete reception of all packets, form the initial data block from them
    • Give it to the application

    In order to correctly perform all these operations, a single set of rules is needed, that is, the OSI reference model.

    Let's get back to the OSI layers. It is customary to count them in the reverse order and in the upper part of the table are network applications, and in the lower part is the physical transmission medium. As the data from the computer descends directly to the network cable, protocols operating at different levels gradually transform it, preparing it for physical transmission.

    Let's analyze them in more detail.

    7. Application layer (Application Layer)

    Its task is to take data from the network application and send it to the 6th level.

    6. Presentation Layer

    Translates this data into a single universal language. The fact is that each computer processor has its own data processing format, but they must get into the network in 1 universal format - this is exactly what the presentation layer does.

    5. Session Layer

    He has many tasks.

    1. Establish a session with the recipient. The software warns the receiving computer that data is about to be sent to it.
    2. This is where name recognition and protection comes in:
      • identification - name recognition
      • authentication - password verification
      • registration - assignment of authority
    3. Implementation of which party is transferring information and how long it will take.
    4. Arrangement of checkpoints in the general data stream so that in case of loss of some part it is easy to establish which part is lost and should be resent.
    5. Segmentation - breaking up a large block into small packages.

    4. Transport Layer

    Provides applications with the necessary degree of protection when delivering messages. There are two groups of protocols:

    • Protocols that are connection oriented - they monitor the delivery of data and optionally request a resend if it fails. This is TCP, the Transfer Control Protocol.
    • Connectionless (UDP) - they simply send blocks and do not further monitor their delivery.

    3. Network layer (Network Layer)

    Provides end-to-end transmission of a packet by calculating its route. At this level, in packets, to all previous information generated by other levels, IP addresses of the sender and recipient are added. It is from this moment that the data packet is called the PACKET itself, which has (IP protocol is an internetworking protocol).

    2. Data Link Layer

    Here the packet is transmitted within the same cable, that is, one local network. It only works up to the edge router of one LAN. The link layer adds its own header to the received packet - the MAC addresses of the sender and recipient, and in this form the data block is already called a FRAME.

    When transmitted outside one local network, the packet is assigned the MAC not of the host (computer), but of the router of another network. From here, the question of gray and white IPs appears, which were discussed in the article to which the link was given above. Gray is an address within one local network that is not used outside of it. White is a unique address in the entire global Internet.

    When a packet arrives at the border router, the IP of the packet is replaced with the IP of this router and the entire local network goes to the global, that is, the Internet, under one single IP address. If the address is white, then the part of the data with the IP address is not changed.

    1. Physical layer (Transport layer)

    Responsible for converting binary information into a physical signal that is sent to the physical data channel. If it is a cable, then the signal is electrical; if it is a fiber optic network, then it is an optical signal. This conversion is carried out using the network adapter.

    Protocol stacks

    TCP/IP is a protocol stack that governs the transmission of data both on a local area network and on the global Internet. This stack contains 4 levels, that is, according to the OSI reference model, each of them combines several levels.

    1. Applied (according to OSI - applied, presentation and session)
      The following protocols are responsible for this layer:
      • TELNET - remote communication session in the form command line
      • FTP - File Transfer Protocol
      • SMTP - Mail Transfer Protocol
      • POP3 and IMAP - receiving postal items
      • HTTP - working with hypertext documents
    2. Transport (the same for OSI) is the TCP and UDP already described above.
    3. Internetwork (over OSI - network) is an IP protocol
    4. The level of network interfaces (according to OSI - channel and physical) Network adapter drivers are responsible for the operation of this level.

    Terminology when designating a data block

    • A stream is the data that is operated on at the application level.
    • A datagram is a block of output data with UPD, that is, which has no guaranteed delivery.
    • Segment - a block guaranteed for delivery at the output from the TCP protocol
    • Packet - a block of data output from the IP protocol. since it is not yet guaranteed to be delivered at this level, it can also be called a datagram.
    • A frame is a block with assigned MAC addresses.

    Thanks! Did not help


    OSI network model(open systems interconnection basic reference model - the basic reference model for the interaction of open systems, abbr. EMWOS; 1978) - network model of the OSI / ISO network protocol stack (GOST R ISO / IEC 7498-1-99).

    General characteristics of the OSI model


    Due to the protracted development of the OSI protocols, the main protocol stack currently in use is TCP/IP, developed before the adoption of the OSI model and out of touch with it.

    By the end of the 70s, a large number of proprietary communication protocol stacks already existed in the world, among which, for example, such popular stacks as DECnet, TCP / IP and SNA can be mentioned. Such a variety of interworking tools brought to the fore the problem of incompatibility between devices using different protocols. One of the ways to solve this problem at that time was seen as a general transition to a single, common protocol stack for all systems, created taking into account the shortcomings of existing stacks. This academic approach to creating a new stack began with the development of the OSI model and took seven years (from 1977 to 1984). The purpose of the OSI model is to provide a generalized representation of the means of networking. It was developed as a kind of universal language for network specialists, which is why it is called the reference model. In the OSI model, the means of interaction are divided into seven layers: application, presentation, session, transport, network, data link and physical. Each layer deals with a very specific aspect of how network devices interact.

    Applications can implement their own interaction protocols using a multi-level set of system tools for these purposes. For this purpose, an application programming interface (Application Program Interface, API) is provided to programmers. In accordance with the ideal scheme of the OSI model, an application can only make requests to the highest layer - the application layer, however, in practice, many communication protocol stacks allow programmers to directly access services, or services located below the layers. For example, some DBMS have built-in tools remote access to files. In this case, the application, when accessing remote resources, does not use the system file service; it bypasses the upper layers of the OSI model and directly addresses the system tools responsible for transporting messages over the network, which are located at the lower layers of the OSI model. So, suppose the application of node A wants to interact with the application of node B. To do this, application A makes a request to the application layer, for example, to file service. Based on this request software application layer generates a standard format message. But in order to deliver this information to its destination, there are still many tasks to be solved, the responsibility for which lies with the lower levels. After the message has been generated, the application layer pushes it down the stack to the presentation layer. The presentation level protocol, based on the information received from the application level message header, performs the required actions and adds its own service information to the message - the presentation level header, which contains instructions for the presentation level protocol of the destination machine. The resulting message is passed down to the session layer, which, in turn, adds its header, etc. (Some protocol implementations place service information not only at the beginning of the message in the form of a header, but also at the end in the form of a so-called trailer.) Finally, the message reaches the lower, physical, level, which, in fact, transmits it through the communication lines to the destination machine. At this point, the message is “overgrown” with headings of all levels.

    The physical layer puts the message on the physical output interface of computer 1, and it begins its "journey" through the network (up to this point, the message was transferred from one layer to another within computer 1). When a message arrives on the network at the input interface of computer 2, it is received by its physical layer and sequentially moves up from layer to layer. Each layer parses and processes the header of its layer, performing the appropriate functions, and then removes this header and passes the message to the higher layer. As can be seen from the description, the protocol entities of the same level do not communicate directly with each other, intermediaries always participate in this communication - means of protocols of lower levels. And only the physical levels of the various nodes interact directly.

    Layers of the OSI model

    OSI Model
    Level ) Functions Examples
    Host
    layers
    7. Applied (application) Access to online services HTTP, FTP, SMTP
    6. Representative (presentations) (presentation) Representation and encryption of data ASCII, EBCDIC, JPEG
    5. Session (session) Session management RPC, PAP
    4. Transport (transport) Segments/
    Datagrams
    Direct communication between endpoints and reliability TCP, UDP, SCTP

    layers
    3. Network (network) Packages Route determination and logical addressing IPv4, IPv6, IPsec, AppleTalk
    2. Channel (data link) Bits/
    Frames (frame)
    Physical addressing PPP, IEEE 802.2, Ethernet, DSL, L2TP, ARP
    1. Physical (physical) bits Working with media, signals and binary data USB, twisted pair, coaxial cable, optical cable

    In the literature, it is most common to start describing the layers of the OSI model from the 7th layer, called the application layer, at which user applications access the network. The OSI model ends with the 1st layer - physical, which defines the standards required by independent manufacturers for data transmission media:

    • type of transmission medium (copper cable, optical fiber, radio, etc.),
    • signal modulation type,
    • signal levels of logical discrete states (zero and one).

    Any protocol of the OSI model must interact either with protocols of its layer, or with protocols one above and / or below its layer. Interactions with protocols at their level are called horizontal, and those with levels one higher or lower are called vertical. Any protocol of the OSI model can only perform the functions of its layer and cannot perform the functions of another layer, which is not performed in the protocols of alternative models.

    Each level, with a certain degree of conventionality, has its own operand - a logically indivisible data element that can be operated on a separate level within the framework of the model and the protocols used: at the physical level, the smallest unit is a bit, at the data link level information is combined into frames, at the network level - into packets ( datagrams), on the transport - into segments. Any piece of data logically combined for transmission - a frame, a packet, a datagram - is considered a message. It is the messages in general view are operands of the session, presentation, and application layers.

    to basic network technologies include the physical and data link layers.

    Application layer


    Application layer (application layer; application layer) - the top level of the model that ensures the interaction of user applications with the network:

    • allows applications to use network services:
      • remote access to files and databases,
      • email forwarding;
    • responsible for the transfer of service information;
    • provides applications with error information;
    • generates requests to the presentation layer.

    Application layer protocols: RDP, HTTP, SMTP, SNMP, POP3, FTP, XMPP, OSCAR, Modbus, SIP, TELNET and others.

    Presentation layer


    The presentation layer (presentation layer) provides protocol conversion and data encoding/decoding. Application requests received from the application layer are converted to a format for transmission over the network at the presentation layer, and data received from the network is converted to the application format. At this level, compression/decompression or encryption/decryption can be performed, as well as redirecting requests to another network resource if they cannot be processed locally.

    The presentation layer is usually an intermediate protocol for transforming information from neighboring layers. This allows the exchange between applications on dissimilar computer systems transparent to applications. The presentation layer provides formatting and transformation of the code. Code formatting is used to ensure that the application receives information for processing that makes sense to it. If necessary, this layer can translate from one data format to another.

    The presentation layer deals not only with the formats and presentation of data, it also deals with the data structures that are used by programs. Thus, layer 6 provides for the organization of data during its transfer.

    To understand how this works, imagine that there are two systems. One uses EBCDIC extended binary information interchange code, such as the IBM mainframe, to represent data, and the other uses the American standard ASCII information exchange code (used by most other computer manufacturers). If these two systems need to exchange information, then a presentation layer is needed to perform the transformation and translate between the two different formats.

    Another function performed at the presentation layer is data encryption, which is used in cases where it is necessary to protect transmitted information from access by unauthorized recipients. To accomplish this task, the processes and code at the view level must perform data transformations. At this level, there are other subroutines that compress texts and convert graphic images into bitstreams so that they can be transmitted over the network.

    Presentation level standards also define how to present graphic images. For these purposes, the PICT format, an image format used to transfer QuickDraw graphics between programs, can be used.

    Another view format is the tagged file format. TIFF images, which is commonly used for bitmaps with high resolution. The next presentation level standard that can be used for graphics is that developed by the Joint Photographic Expert Group; in everyday use, this standard is simply referred to as JPEG.

    There is another group of presentation level standards that define the presentation of sound and movies. This includes the electronic interface musical instruments(Musical Instrument Digital Interface, MIDI) for the digital representation of music, the Motion Picture Expert Group's MPEG standard used to compress and encode video on CD, digitize storage and transmission at speeds up to 1.5 Mbps, and QuickTime - A standard that describes audio and video elements for programs running on Macintosh and PowerPC computers.

    Presentation layer protocols: AFP - Apple Filing Protocol, ICA - Independent Computing Architecture, LPP - Lightweight Presentation Protocol, NCP - NetWare Core Protocol, NDR - Network Data Representation, XDR - eXternal Data Representation, X.25 PAD - Packet Assembler/Disassembler Protocol .

    session layer


    The session layer of the model maintains a communication session, allowing applications to interact with each other for a long time. The layer manages session creation/termination, information exchange, task synchronization, determination of the right to transfer data, and session maintenance during periods of application inactivity.

    Session protocols: ADSP (AppleTalk Data Stream Protocol), ASP (AppleTalk Session Protocol), H.245 (Call Control Protocol for Multimedia Communication), ISO-SP (OSI Session Layer Protocol (X.225, ISO 8327)), iSNS (Internet Storage Name Service), L2F (Layer 2 Forwarding Protocol), L2TP (Layer 2 Tunneling Protocol), NetBIOS (Network Basic Input Output System), PAP (Password Authentication Protocol), PPTP (Point-to-Point Tunneling Protocol), RPC (Remote Procedure Call Protocol), RTCP (Real-time Transport Control Protocol), SMPP (Short Message Peer-to-Peer), SCP (Session Control Protocol), ZIP (Zone Information Protocol), SDP (Sockets Direct Protocol]).

    transport layer


    The transport layer (transport layer) of the model is designed to ensure reliable data transfer from the sender to the recipient. At the same time, the level of reliability can vary over a wide range. There are many classes of transport layer protocols, ranging from protocols that provide only basic transport functions (for example, data transfer functions without acknowledgment), to protocols that ensure that multiple data packets are delivered to the destination in the correct sequence, multiplex multiple data streams, provide data flow control mechanism and guarantee the validity of the received data. For example, UDP is limited to data integrity control within a single datagram, and does not exclude the possibility of losing the entire packet, or duplicating packets, violating the order in which data packets were received; TCP provides reliable continuous data transmission, excluding data loss or violation of the order of their arrival or duplication, it can redistribute data by breaking large portions of data into fragments and vice versa gluing fragments into one packet.

    Transport layer protocols: ATP (AppleTalk Transaction Protocol), CUDP (Cyclic UDP), DCCP (Datagram Congestion Control Protocol), FCP (Fiber Channel|Fiber Channel Protocol), IL (IL Protocol), NBF (NetBIOS Frames protocol), NCP ( NetWare Core Protocol), SCTP (Stream Control Transmission Protocol), SPX (Sequenced Packet Exchange), SST (Structured Stream Transport), TCP (Transmission Control Protocol), UDP (User Datagram Protocol).

    network layer


    The network layer (lang-en|network layer) of the model is designed to determine the data transfer path. Responsible for translating logical addresses and names into physical ones, determining the shortest routes, switching and routing, tracking problems and "congestion" in the network.

    Network layer protocols route data from a source to a destination. Devices (routers) operating at this level are conditionally called devices of the third level (according to the level number in the OSI model).

    Network layer protocols: IP/IPv4/IPv6 (Internet Protocol), IPX (Internetwork Packet Exchange), X.25 (partially implemented in Layer 2), CLNP (Connectionless Network Protocol), IPsec (Internet protocol security). Routing protocols - RIP (Routing Information Protocol), OSPF (Open Shortest Path First).

    Link layer


    The link layer (data link layer) is designed to ensure the interaction of networks at the physical layer and control errors that may occur. It packs the data received from the physical layer, represented in bits, into frames, checks them for integrity and, if necessary, corrects errors (forms a repeated request for a damaged frame) and sends it to the network layer. The link layer can interact with one or more physical layers, controlling and managing this interaction.

    The IEEE 802 specification divides this level into two sublevels: MAC (Media Access Control) regulates access to a shared physical medium, LLC (logical link control) provides network level service.

    Switches, bridges and other devices work at this level. These devices are said to use Layer 2 addressing (by layer number in the OSI model).

    Link layer protocols: ARCnet, ATM (Asynchronous Transfer Mode), Controller Area Network (CAN), Econet, IEEE 802.3 (Ethernet), Ethernet Automatic Protection Switching (EAPS), Fiber Distributed Data Interface (FDDI), Frame Relay, High-Level Data Link Control (HDLC), IEEE 802.2 (provides LLC functions to IEEE 802 MAC layers), Link Access Procedures, D channel (LAPD), IEEE 802.11 wireless LAN, LocalTalk, Multiprotocol Label Switching (MPLS), Point-to-Point Protocol (PPP), Point-to-Point Protocol over Ethernet (PPPoE), StarLan, Token ring, Unidirectional Link Detection (UDLD), x.25]], ARP.

    In programming, this level represents the network card driver; in operating systems, there is a software interface for the interaction of the channel and network levels with each other. This is not a new level, but simply an implementation of the model for a specific OS. Examples of such interfaces: ODI, NDIS, UDI.

    Physical layer


    Physical layer (physical layer) - the lower level of the model, which defines the method of transferring data, represented in binary form, from one device (computer) to another. Various organizations are involved in compiling such methods, including: the Institute of Electrical and Electronics Engineers, the Electronics Industry Alliance, the European Telecommunications Standards Institute, and others. They transmit electrical or optical signals to a cable or radio air and, accordingly, receive them and convert them into data bits in accordance with the methods of encoding digital signals.

    Hubs]], signal repeaters and media converters also work at this level.

    Physical layer functions are implemented on all devices connected to the network. On the computer side, physical layer functions are performed by a network adapter or a serial port. The physical layer refers to the physical, electrical, and mechanical interfaces between two systems. The physical layer defines such types of data transmission media as fiber optic, twisted pair, coaxial cable, satellite data link, etc. The standard types of network interfaces related to the physical layer are:)