Reference model osi physical and link layers. OSI Network Reference Model

Interaction model open systems OSI (English Open System Interconnection) is a set of standards for interaction network equipment between themselves. It is also called the protocol stack. Designed to allow various network objects, regardless of manufacturer and type (computer, server, switch, hub, and even a browser that displays html page) observed unified rules of work with data and could successfully carry out information exchange.

Network devices are different in function and "proximity" to the end user - a person or an application. Therefore, the OSI model describes 7 levels of interaction, each of which has its own protocols, indivisible portions of data, and devices. Let's analyze the principle of operation of the seven-layer OSI model with examples.

Network layers of the OSI model

Physical

Responsible for the physical transfer of data between devices over long and short distances. He describes types of signals and methods of their processing for different transmission media: wires (twisted pair and coaxial), optical fiber, radio link (wi-fi and bluetooth), infrared channel. The units of data at this level are bits converted into electrical impulses, light, radio waves, and so on. Also, the types of connectors, their pinout are fixed here.

Devices operating at the physical layer of the OSI Model (OSI Model): signal repeaters, concentrators (hubs). These are the least "intelligent" devices, the task of which is to amplify the signal or split it without any analysis and modification.

ducted

Being above the physical, it must “lower” correctly formatted data into transmission medium, having previously taken them from the top level. At the receiving end, the link-layer protocols "raise" information from physics, check the received for errors, and pass it up the protocol stack.

To implement the verification procedures, it is necessary, firstly, to segment the data for transmission into portions (frames), and secondly, to supplement them with service information (headers).

Also here for the first time the concept of an address pops up. Here - this is the MAC (Eng. Media Access Control) address - a six-byte identifier network device, required to indicate in frames as a recipient and sender when transmitting data within the same local segment.

Devices: network bridge (bridge), switch. Their primary difference from the "lower" devices is the maintenance of MAC address tables for their ports and the distribution / filtering of traffic only in the necessary directions.

network

Connects entire networks. decides global logistics challenges on data transfer between different segments of large networks: routing, filtering, optimization and quality control.

The unit of transmitted information is packets. Addressing nodes and networks is performed by assigning them 4-byte numbers - IP (English Internet Protocol) addresses, hierarchically organized, and allowing you to flexibly configure the mutual logical visibility of network segments.

There are also familiar symbolic node names, which are mapped to IP addresses by network layer protocols. Devices operating on this floor of the OSI model are routers (routers, gateways). Implementing all three first levels of the protocol stack, they unite different networks, redirect packets from one to another, choosing their route according to certain rules, maintain transmission statistics, and ensure security through filtering tables.

Transport

Transportation in this case is assumed to be logical (since 1 stage of the stack is responsible for the physical one): establishing a connection with the opposite node at the appropriate level, confirming the delivery of the received data, and controlling their quality. This is how the TCP (Transmission Control Protocol) protocol works. The transmitted portion of information is a block or segment.

To transfer streaming arrays (datagrams), the UDP (User Datagram Protocol) protocol is used.

Address - decimal number of the virtual software port of a particular workstation or server.

session

Manages the transfer process in terms of user access. Limits the connection (session) time of one node with another, controls access rights, synchronizes the beginning and end of the exchange.

Executive

The data received from below - from the session - must be correctly presented to the end user or application. Correct decoding, data decompression, if the browser saved your traffic - these operations are performed on the penultimate step.

Applied

Application or application layer. Surfing in the browser, receiving and sending mail, accessing other network nodes through remote access is the pinnacle of the OSI network model.

An example of how the network model works

Consider a living example of the principle of the protocol stack. Let the computer user send a photo to a friend with a signature in the messenger. Going down the levels of the model:

  • On the applied a message is formed: in addition to the photo and text, information about the address of the message server is added to the package (the symbolic name www.xxxxx.com will turn into a decimal IP address using a special protocol), the recipient's identifier on this server, and possibly some other service information.
  • On representative- a photo can be compressed if its size is large in terms of the messenger and its settings.
  • session track the user's logical connection to the server, his status. They will also control the data transfer process after it has begun, tracking the session.
  • On transport data is divided into blocks. Service fields of the transport layer are added with checksums, error control options, etc. One photo can turn into several blocks.
  • On network- blocks are wrapped with service information, which contains, among other things, the address of the sending host and the IP address of the message server. It is this information that will allow IP packets to reach the server, possibly across the whole world.
  • On canal, IP packet data is packed into frames with the addition of service fields, in particular MAC addresses. Own address network card will be placed in the sender field, and the MAC of the default gateway will be placed in the recipient field, again from its own network settings(it is unlikely that the computer is on the same network with the server, so its MAC is unknown, and the default gateway, for example, of a home router, is known).
  • On physical- bits from the frames will be translated into radio waves, and will reach the home router via the wi-fi protocol.
  • There, the information will rise along the protocol stack already up to the 3rd level of the router stack, then it will be packet forwarding to ISP routers. And so on, until on the messenger server, at the highest level, the message and the photo in their original forms get to the sender's personal disk space, then the recipient. And then a similar path of information will begin already to the addressee of the message, when he goes online and establishes a session with the server.

For a unified view of data in networks with heterogeneous devices and software International Standards Organization ISO (International Standardization Organization) has developed a basic model for communication of 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 communication functions in a 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, control information is added to the packet. given level(header), which is necessary for successful transmission of data 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 data conversion from ASCII to EBCDIC and contains the programs necessary to perform 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;

Program diagnostics and technical means.

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 reality, 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 organize their collaboration, for example, using the email protocol. 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, 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, exchange postal messages 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 (coding, 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 integral part 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 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. Although some applications have own funds error handling, there are those who 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 are distinguished by the quality of the services provided: urgency, the ability to restore an interrupted connection, 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 physical devices(systems, their parts) in the network. This layer guarantees the delivery of blocks of information to recipients and manages this delivery. His 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 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 in 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 transmissions (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, network protocol the TCP/IP stack, which 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 sequence of bits 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 sniffing 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. The physical means of connection is the combination of the physical environment, hardware and software tools, which provides signal transmission 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 communication in systems are defined. 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 appearance of malfunctions and failures is due to the fact that at the physical level a certain class of events is detected that interferes with the normal operation of the network (collision of frames sent by several systems at once, channel break, power off, 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, in order to more clearly define the structure 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, the physical layer functions are performed by the 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 cable 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 a cable. 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.

OSI includes seven layers. On fig. 1.5 shows the interaction model of two devices: source node(source) and destination node( destination ). The set of rules by which data is exchanged between software and hardware located at the same level is called protocol. A set of protocols is called a protocol stack and is defined by a specific standard. Interaction between levels is defined by standard interfaces.


Rice. 1.5.

The interaction of the corresponding levels is virtual, with the exception of the physical layer, where data is exchanged over cables connecting computers. On fig. 1.5 also shows examples of protocols that control the interaction of nodes at various levels of the OSI model. The interaction of levels with each other inside the node occurs through the interlevel interface, and each lower layer provides services to the higher layer.

Virtual exchange between the corresponding levels of nodes A and B (Fig. 1.6) occurs with certain units of information. Three upper levels- This messages or data, at the transport layer segments, at the network level packages (Packet), at the channel level - frames (Frame) and on the physical - a sequence of bits.

For each network technology there are their own protocols and their own technical means, some of which have the symbols shown in Fig. 1.5. These designations were introduced by Cisco and have become generally accepted. Physical layer hardware includes cables, connectors, signal repeaters (repeater), multiport repeaters, or concentrators (hub), media converters (transceiver), for example, converters of electrical signals to optical and vice versa. At the link level, this is bridges (bridge), switches (switch). At the network level routers. Network cards or adapters ( Network Interface Card - NIC ) operate both at the channel and at the physical level, which is due to network technology And data transmission medium.


Rice. 1.6.

When transmitting data from the source to the destination node, the transmitted data prepared at the application layer sequentially passes from the uppermost, Application layer 7 node of the information source to the lowest - Physical layer 1, then is transmitted over the physical medium to the destination node, where it sequentially passes from the lower layer 1 to level 7.

topmost, Application Layer 7 operates with the most common unit of data, the message. This layer manages network sharing, data flow, network services such as FTP, TFTP, HTTP, SMTP, SNMP and etc.

Presentation Layer 6 changes the form of data representation. For example, data transmitted from layer 7 is converted to the commonly used ASCII format. When data is received, the process is reversed. Layer 6 also encrypts and compresses the data.

Session Layer 5 establishes a communication session between two end nodes (computers), determines which computer is the transmitter and which receiver, sets the transmission time for the transmitting side.

Transport Layer 4 divides a large message of the information source node into parts, while adding a header and forming segments a certain volume, and short messages can be combined into one segment. The process is reversed at the destination node. The segment header contains port numbers source and destination, which address the upper application layer services for processing this segment. Besides, transport layer ensures reliable packet delivery. If losses and errors are detected at this level, a retransmission request is generated, using the protocol TCP. When there is no need to validate a delivered message, the simpler and faster User Datagram Protocol is used. UDP).

Network Layer 3 addresses a message by setting the unit of data to be transmitted (packet) logical network addresses destination node and source node ( IP addresses), defines route, which will be sent data package, translates logical network addresses into physical ones, and on the receiving side - physical addresses into logical ones. Network logical addresses belong to users.

Link layer (Data Link) 2 forms from packages frames data (frames). At this level, set physical addresses sending device and receiving device. For example, physical adress devices can be registered in the ROM of the network card of the computer. At the same level, the transmitted data is added check sum, determined using the algorithm cyclic code . On the receiving side checksum identify and, if possible, correct errors.

Physical layer (Physical) 1 transmits a stream of bits over the appropriate physical medium (electrical or optical cable, radio channel) through the appropriate interface. At this level, data is encoded, the transmitted information bits are synchronized.

The protocols of the top three layers are network independent, the bottom three layers are network dependent. Communication between the three upper and three lower layers occurs at the transport layer.

An important process in data transfer is encapsulation( encapsulation ) data. The transmitted message, formed by the application, passes through the three upper network-independent layers and arrives at transport layer, where it is divided into parts and each part is encapsulated (placed) in a data segment (Fig. 1.7). The segment header contains the number of the application layer protocol with which the message was prepared, and the number of the protocol that will process this segment.


Rice. 1.7.

At the network layer, a segment is encapsulated in plastic bag data, header ( header) which contains, among other things, the network (logical) addresses of the sender of information (source) – Source Address ( SA) and recipient (destination) – Destination Address ( DA). In this course, these are IP addresses.

At the link layer, the packet is encapsulated in frame or frame data whose header contains physical addresses node of the transmitter and receiver, as well as other information. In addition, this level adds trailer(trailer) frame containing the information necessary to verify the correctness of the received information. Thus, the data is framed with headers with service information, i.e. encapsulation data.

The name of the information units at each level, their size and other encapsulation parameters are set according to the protocol of data units ( Protocol Data Unit - PDU). So, at the top three levels, these are message (Data), at Transport layer 4 – segment, at Network layer 3 – package, at Link layer 2 – frame, at the Physical Layer 1 – bit sequence.

In addition to the seven-layer OSI model, a four-layer TCP / IP model is used in practice (Fig. 1.8).


Rice. 1.8.

Application layer The TCP / IP model is identical in name to the OSI model, but is much broader in function, since it covers the top three network-independent layers (application, presentation, and session). transport layer Both models are identical in name and function. The network layer of the OSI model corresponds to the internetwork layer ( Internet) layer of the TCP / IP model, and the two lower layers (link and physical) are represented by the combined network access layer ( Network Access).


Rice. 1.9.

Thus, transport layer, which ensures the reliability of data transmission, functions only at the end nodes, which reduces the delay message transmission throughout the network from one end node to another. In the example shown (Fig. 1.9), the IP protocol operates on all network nodes, and the TCP / IP protocol stack only on end nodes.

Brief summary

  1. A telecommunications network is formed by a set of subscribers and communication nodes connected by communication lines (channels).
  2. Distinguish networks: circuit-switched, when telecommunications nodes act as switches, and with packet (message) switching, when telecommunications nodes act as routers.
  3. To create a route in an extensive network, you must specify the source addresses and message recipient. Distinguish between physical and logical addresses.
  4. Data networks With packet switching divided into local and global.
  5. IP networks are datagram networks when there is no pre-connection of end nodes and no message acknowledgment.
  6. Provides high reliability

The OSI model is a conceptual model created by the International Standards Organization that allows various communication systems to communicate using standard protocols. in plain language, OSI provides a standard for different computer systems to be able to communicate with each other.

OSI models can be seen as a universal language for computer networks. It is based on the concept of dividing a communication system into seven abstract layers, each stacked on top of the last.
Each layer of the OSI model performs specific work and interacts with layers above and below itself. targeted at specific levels network connection. The application layer attacks target layer 7 and the protocol layer attacks target layers 3 and 4.

Why the OSI Model Matters

Although the modern Internet does not strictly follow the OSI model (it more closely follows the simpler set of Internet protocols), the OSI model is still very useful for network troubleshooting. Whether it's one person who can't get their port on the internet or a website is down for thousands of users, the OSI model can fix the problem and isolate the source. If the problem can be narrowed down to one particular layer of the model, then a large number unnecessary work.

The seven levels of abstraction of the OSI model can be defined as follows, from top to bottom:

7. Application layer

This is the only layer that directly interacts with user data. Software applications such as web browsers and mail clients, use the application layer to initiate communications. However, it should be made clear that client software applications are not part of the application layer. Rather, the application layer is responsible for the protocols and data processing that the software relies on to present meaningful data to the user. The application layer protocols include HTTP as well as SMTP which is one of the protocols that enables email communication.

6. Presentation Layer

This layer is primarily responsible for preparing the data so that it can be used by the application layer. In other words, layer 6 makes the data presentable to applications. The presentation layer is responsible for translating, encrypting and compressing data.

Two communicating devices may use different encoding methods, so layer 6 is responsible for converting the incoming data into a syntax that is understood by the application layer of the receiving device.
If devices communicate over an encrypted connection, layer 6 is responsible for adding the encryption on the sender's side, as well as decoding the encryption on the receiver's side so that it can present the application layer with unencrypted, readable data.

Finally, the presentation layer is also responsible for compressing the data received from the application layer before delivering it to the layer. This helps to improve the speed and efficiency of communication by minimizing the amount of data transferred.

5. Session layer

This layer is responsible for opening and closing the connection between two devices. The time between opening and closing a connection is called a session. The session layer ensures that the session remains open long enough to transfer all exchanged data, and then quickly closes the session to avoid wasting resources.
The session layer also synchronizes data transfer with checkpoints. For example, when transferring a 100 megabyte file, the session layer might set a checkpoint every 5 megabytes. In the event of a disconnect or failure after a 52 MB transfer, the session can be resumed from the last checkpoint, which means that another 50 megabytes of data needs to be transferred. Without checkpoints, the entire transmission would have to start from scratch.

4. Transport layer

Layer 4 is responsible for end-to-end communication between these two devices. This includes taking the data from the session layer and breaking it up into chunks called segments before sending it to layer 3. The transport layer on the receiving device is responsible for reassembling the segments into data that the session layer can use.
The transport layer is responsible for flow control and error control. Flow control determines the optimal bit rate to ensure that a sender on a fast connection does not overwhelm a receiver on a slow connection. The transport layer performs error checking on the receiving side, ensuring that the received data is complete and requesting a retransmission if it is not.

3. Network layer

The network layer is responsible for facilitating the transfer of data between two different networks. If two interacting devices are on the same network, then the network layer is not needed. The network layer breaks the transport layer segments into smaller units called packets on the sender device and reassembles these packets on the receiving device. The network layer also finds the best physical path for data to reach its destination. This is called routing.

2. Data link layer

Very similar to the network layer, except that layer 2 facilitates the transfer of data between two devices on the same network. This link layer receives packets from the network layer and divides them into smaller pieces called frames. Like the network layer, the data link layer is also responsible for flow control and error management for intranet communication (the transport layer only performs flow control and error management for internetwork communication).

1. Physical layer

This layer includes the physical equipment involved in data transmission, such as cables and switches. It is also the layer where the data is converted into a bitstream, which is a string of 1s and 0s. The physical layer of both devices must also agree on a signaling convention so that 1s can be distinguished from 0s on both devices.

Data flows through the OSI model

In order for human-readable information to travel across a network from one device to another, data must travel down the seven layers of the OSI model on the transmitting device and then up through the seven layers on the receiving end.
For example, someone wants to send a letter to a friend. The sender composes his message in the email application on his laptop and then clicks send. His mail application will pass the email message to the application layer, which will choose the protocol (SMTP) and pass the data to the presentation layer. The data is then compressed and passed to the session layer, which initiates the session.

The data will then get to the sender's transport layer where it will be segmented, those segments will then be broken up into packets at the network layer, which will be broken even further into frames at the data link layer. This layer will take them to the physical layer, which will convert the data into a bitstream of 1s and 0s and send it through a physical medium such as a cable.
Once the recipient's computer receives the bitstream via a physical medium (like wifi), the data will go through the same series of layers on their device, but in reverse order. First, the physical layer converts the bit stream from 1s and 0s into frames, which are passed to the data link layer. The data link layer will then package the frames for the network layer. The network layer will then make segments out of the packets for the transport layer, which will assemble the segments into one piece of data.

The data then goes to the session layer of the receiver, which passes the data to the presentation layer and then ends the session. The presentation layer then removes the compression and passes the raw data to the application layer. The application layer will then pass the human-readable data along with the recipient's mail software, allowing it to be read email sender on laptop screen.

On the video: OSI model and TCP IP protocol stack. Ethernet Basics.

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 the basic network model. reference model Interoperability of open systems ISO/OSI. Briefly - the 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 IP address of the site does not carry any information for us. 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.

Internet