osi model description of the model levels. Data link layer of the OSI network model


In order to create new (and upgrade old) computer networks without encountering problems of compatibility and interaction of various network devices, special standards have been developed - network models. There are various network models, but the most common and generally accepted are: network model OSI and . These models are based on the principle of dividing the network into layers.

OSI reference model

Initial stage of development LAN networks, MAN and WAN was chaotic in many respects. In the early 1980s, the size of networks and their number increased sharply. As companies realized that they could save significant money and increase efficiency by using networking technologies, they created new networks and expanded existing ones as quickly as new networking technologies and new equipment appeared.

However, by the mid-1980s, these same companies began to experience difficulty expanding their existing networks. Networks using different specifications and implemented in different ways became increasingly difficult to communicate with each other. Companies that found themselves in this situation were the first to realize that it was necessary to move away from using proprietary network systems.

To solve the problem of incompatible networks and their inability to communicate with each other, the International Organization for Standardization (ISO) has developed various network schemes, such as DECnet, system network architecture(Systems Network Architecture - SNA) and TCP/IP protocol stack. The purpose of creating such schemes was to develop a common set of rules for the operation of networks for all users. As a result of this research, ISO developed a network model that could help equipment manufacturers create networks that were compatible with each other and interacted successfully. The process of breaking down a complex network communication problem into smaller tasks can be compared to the process of assembling a car.
The process of designing, manufacturing parts and assembling a car, when considered as a whole, is very complex. It is unlikely that there would be a specialist who could solve all the required tasks when assembling a car: assemble a car from randomly selected parts or, say,
in the manufacture of the final product directly from iron ore. For this reason, design engineers are involved in designing a car, foundry engineers design molds for casting parts, and assembly engineers and technicians are engaged in assembling components and a car from finished parts.

OSI reference model (OSI reference model), promulgated in 1984, was a descriptive scheme created by the ISO organization. This reference model provided equipment manufacturers with a set of standards that enabled greater interoperability and more efficient interoperability among the various networking technologies and equipment produced by numerous companies around the world.
The OSI reference model is the primary model used as
fundamentals for network communications.
Although other models exist, most hardware and software manufacturers rely on the OSI reference model, especially when they want to train users on their products. The OSI reference model is currently considered the best available tool for teaching users how networks work and the mechanisms for sending and receiving data over a network.

The OSI reference model defines the network functions performed by each of its layers. More importantly, it provides the basis for understanding how information flows across the network. In addition, the OSI model describes how information or data packets move from programs to applications (such as spreadsheets or word processors) over a network transmission medium (such as wires) to other programs"applications running on another computer on the network, even if the sender and recipient use different types of transmission media.

Layers of the OSI Network Model (also called the OSI Reference Model)

The OSI networking model contains seven numbered layers, each of which performs its own specific functions in the network.

  • Level 7- application level.
  • Level 6- level of data presentation.
  • Level 5 - session level.
  • Level 4- transport level.
  • Level 3- network level.
  • Level 2- channel level.
  • Level 1- physical level.

Layer diagram of the OSI network model

This division of functions performed by the network is called layering. Dividing the network into seven layers provides the following advantages:

  • the network communication process is divided into smaller and simpler stages;
  • network components are standardized, which allows the use and support of equipment from different manufacturers in the network;
  • dividing the data exchange process into layers allows communication between different types of hardware and software;
  • changes at one level do not affect the functioning of other levels, which allows you to quickly develop new software and hardware products;
  • Network communication is divided into smaller components, making them easier to study.

Layers of the OSI network model and their functions

To transmit data packets over a network from a sender to a recipient, each layer of the OSI model must perform its own set of functions. These functions are described below.

Layer 7: Application Layer

Application layer is closest to the user and provides services to his applications. It differs from other layers in that it does not provide services to other layers; instead, it provides services only to applications that are outside the OSI reference model. Examples of such applications include spreadsheets (e.g. Excel program) or word processors (for example, Word program). The application layer determines the availability of communication partners to each other, and also synchronizes communications and establishes agreement on data recovery procedures in the event of errors and data integrity procedures. Examples of layer seven applications include protocols Telnet And HTTP.

Layer 6: Data Presentation Layer

Task presentation layer is to ensure that application layer information sent by one system (the sender) can be read by the application layer of another system (the recipient). If necessary, the presentation layer converts the data into one of the many existing formats that are supported by both systems. Another important task of this layer is data encryption and decryption. Typical level six graphics standards are PICT, TIFF and JPEG. Examples of level six standards of the reference model that describe the format for presenting audio and video are the MIDI and MPEG standards.

Level 5: Session Level

As the name of this level itself shows, session layer establishes, manages, and terminates a communication session between two workstations. The session layer provides its services to the presentation layer. It also synchronizes the dialogue between the presentation layers of the two systems and manages data exchange. In addition to its primary ongoing function of management, the session layer provides efficient data transfer, the required class of service, and emergency alerts when there are problems at the session layer, presentation layer, or application layer. Examples of layer 5 protocols include network file system(Network File System- NFS), X-Window system and AppleTalk Session Protocol (ASP).

Layer 4: Transport Layer

Transport layer segments the data from the transmitting station and reassembles it into one whole at the receiving end. The boundary between the transport layer and the session layer can be thought of as the boundary between application protocols and data protocols. While the application, presentation, and session layers deal with the communication aspects associated with running applications, the bottom four layers deal with the transport of data across the network. The transport layer attempts to provide the data transfer service in a way that hides the details of the data transfer process from upper layers. In particular, the task of the transport layer is to ensure reliable data transfer between two workstations.
When providing communication service, the transport layer establishes, maintains, and terminates virtual circuits as appropriate. To ensure the reliability of the transport service, transmission error detection and information flow management are used. Examples of Layer 4 protocols include Transmission Control Protocol (TCP), User Datagram Protocol (UDP), and serial exchange packages (Sequenced Packet Exchange - SPX).

Layer 3: Network Layer

Network layer is a complex level that provides route selection and interconnection of two workstations, which can be located in networks that are geographically distant from each other. In addition, the network layer resolves logical addressing issues. Examples of Layer 3 protocols include the Internet Protocol (IP), Internet Packet Exchange (IPX), and AppleTalk.

Layer 2: Link Layer

Data Link Layer(data link layer) provides reliable transmission data over a physical channel. At the same time, the data link layer solves the problems of physical (as opposed to logical) addressing, network topology analysis, network access, error notification, ordered delivery of frames, and flow control.

Layer 1: Physical Layer

Physical layer defines the electrical, procedural, and functional specifications for enabling, maintaining, and disabling physical links between end systems. Physical layer specifications define voltage levels, timing of voltage changes, physical data transfer rate, maximum transmission range, physical connections and other similar parameters.

P.S. It is not for nothing that the OSI network model is considered the reference model, because... allows you to standardize various network technologies, ensures the interaction of network devices and applications at different levels. A clear understanding of the division into levels gives a complete understanding of the organization of work computer networks. If something is not clear now, then you need to fill this gap now, because learning more complex things will be very difficult.
In practice, a simpler one is used, which has 4 levels.

OSI reference model

For clarity, the network process in the OSI reference model is divided into seven layers. This theoretical construct makes fairly complex concepts easier to learn and understand. At the top of the OSI model is the application that needs access to network resources, at the bottom is the network environment itself. As data moves from layer to layer down, the protocols operating at those layers gradually prepare it for transmission over the network. Once it reaches the target system, the data moves up through the layers, with the same protocols performing the same actions, only in reverse order. In 1983 International Organization for Standardization(International Organization for Standardization, ISO) and Standardization sectortelecommunications of the International Telecommunications Union(Telecommunication Standardization Sector of International Telecommunication Union, ITU-T) published the document “The Basic Reference Model for Open Systems Interconnection”, which described the distribution model network functions between 7 different levels (Fig. 1.7). This seven-layer structure was supposed to form the basis for a new protocol stack, but it was never implemented in commercial form. Instead, the OSI model is used with existing protocol stacks as a training and reference tool. Most of the protocols popular today predate the development of the OSI model, so they are not exactly consistent with its seven-layer structure. Often, one protocol combines the functions of two or even several levels of the model, and the boundaries of the protocols often do not correspond to the boundaries of the OSI layers. However, the OSI model remains an excellent visual aid for examining network processes, and professionals often associate functions and protocols with specific layers.

Data Encapsulation

Essentially, the interaction of protocols operating at different levels of the OSI model is manifested in the fact that each protocol adds title(header) or (in one case) trailer(footer) to the information it received from the level above. For example, an application generates a request to network resource. This request moves down the protocol stack. When it reaches the transport layer, protocols at that layer add their own header to the request, consisting of fields with information specific to the functions of that protocol. The original request itself becomes a data field (payload) for the transport layer protocol. After adding its header, the transport layer protocol passes the request to the network layer. Protocol network layer adds its own header to the transport layer protocol header. Thus, for a network layer protocol, the payload becomes the original request and the transport layer protocol header. This entire construct becomes the payload for the link layer protocol, which adds a header and trailer to it. The result of this activity is plastic bag(packet), ready for transmission over the network. When the packet reaches its destination, the process is repeated in reverse. The protocol of each subsequent layer of the stack (now from bottom to top) processes and removes the header of the equivalent protocol of the sending system. When the process is completed, the original request reaches the application it was intended for, in the same form in which it was generated. The process of adding headers to a request (Figure 1.8) generated by an application is called data encapsulation(data encapsulation). In essence, this procedure resembles the process of preparing a letter for sending by mail. The request is the letter itself, and adding headings is the same as putting the letter in an envelope, writing the address, stamping it, and actually sending it.

Physical layer

At the lowest level of the OSI model - physical(physical) - the characteristics of network equipment elements are determined - the network environment, installation method, type of signals used to transmit binary data over the network. In addition, the physical layer determines what type of network adapter needs to be installed on each computer and what kind of hub to use (if necessary). At the physical level we are dealing with copper or fiber optic cable or any wireless connection. In a LAN, the physical layer specifications are directly related to the data link protocol used on the network. Once you select a link layer protocol, you must use one of the physical layer specifications supported by that protocol. For example, the Ethernet link layer protocol supports several various options physical layer - one of two types coaxial cable, any cable type " twisted pair", fiber optic cable. The parameters of each of these options are formed from numerous information about the requirements of the physical layer, for example, the type of cable and connectors, the permissible length of cables, the number of hubs, etc. Compliance with these requirements is necessary for the normal operation of the protocols. For example, in a cable that is too long, the Ethernet system may not notice packet collisions, and if the system is unable to detect errors, it cannot correct them, resulting in data loss. Not all aspects of the physical layer are defined by the link layer protocol standard. Some of them are defined separately. One of the most commonly used physical layer specifications is described in the Commercial Building Telecommunications Cabling Standard, known as EIA/TIA 568A. It is jointly published American National Institute of Standarts(American National Standards Institute, ANSI), Associations fromelectronics industries(Electronics Industry Association, EIA) and Communications Industry Association(Telecommunications Industry Association, TIA). This document includes a detailed description of cables for data networks in industrial environments, including minimum distances from sources of electromagnetic interference and other cabling guidelines. Today, cable laying in large networks is most often entrusted to specialized companies. The contractor hired should be thoroughly familiar with EIA/TIA 568A and other similar documents, as well as city building codes. Another communication element defined at the physical layer is the type of signal for transmitting data over the network medium. For cables with a copper base, this signal is an electric charge; for a fiber-optic cable, it is a light pulse. Other types of network environments may use radio waves, infrared pulses, and other signals. In addition to the nature of the signals, the physical layer establishes their transmission pattern, that is, the combination of electrical charges or light pulses used to encode the binary information that is generated by higher layers. Ethernet systems use a signaling scheme known as Manchester encoding(Manchester encoding), and in systems Token Ring used differentialManchester(Differential Manchester) scheme.

Data Link Layer

Protocol channel(data-link) level ensures the exchange of information between the hardware of a computer connected to the network and network software. It prepares data sent to it by the network layer protocol for sending to the network, and transmits data received by the system from the network to the network layer. When designing and creating a LAN The link layer protocol used is the most important factor to select equipment and how to install it. To implement the link layer protocol, the following hardware and software are required: network interface adapters (if the adapter is a separate device connected to the bus, it is called a network interface card or simply network card); network adapter drivers; network cables(or other network environment) and auxiliary connecting equipment; network hubs (in some cases). Both network adapters and hubs are designed for specific link-layer protocols. Some network cables are also tailored for specific protocols, but there are also cables that are suitable for different protocols. Of course, today (as always) the most popular link layer protocol is Ethernet. Token Ring is far behind, followed by other protocols such as FDDI (Fiber Distributed Data Interface). There are typically three main elements included in a link layer protocol specification: the frame format (i.e., the header and trailer added to the network layer data before transmission to the network); mechanism for controlling access to the network environment; one or more physical layer specifications used with a given protocol.

Frame format

The link layer protocol adds a header and trailer to the data received from the network layer protocol, turning it into frame(frame) (Fig. 1.9). Using the mail analogy again, the header and trailer are the envelope for sending the letter. They contain the addresses of the sending and receiving systems of the packet. For LAN protocols like Ethernet and Token Ring, these addresses are 6-byte hexadecimal strings assigned to network adapters at the factory. They, in contrast to the addresses used at other levels of the OSI model, are called appa military addresses(hardware address) or MAC addresses (see below).

Note Protocols at different layers of the OSI model have different names for the structures they create by adding a header to data coming from a higher protocol. For example, what a link layer protocol calls a frame would be a datagram to the network layer. A more general name for a structural unit of data at any level is plastic bag.

It is important to understand that link layer protocols provide communication only between computers on the same LAN. The hardware address in the header always belongs to a computer on the same LAN, even if the target system is on a different network. Other important functions of the link layer frame are identification of the network layer protocol that generated the data in the packet and information for error detection. The network layer can use different protocols, so the link layer protocol frame usually includes code that can be used to identify which network layer protocol generated the data in that packet. Guided by this code, the link layer protocol of the receiving computer forwards the data to the corresponding protocol of its network layer. To detect errors, the transmitting system calculates cyclical cue redundant code(cyclical redundancy check, CRC) of the payload and writes it to the frame trailer. After receiving the packet, the target computer performs the same calculations and compares the result with the contents of the trailer. If the results match, the information was transmitted without errors. Otherwise, the recipient assumes that the package is damaged and does not accept it.

Media access control

Computers on a LAN typically share a half-duplex network medium. In this case, it is quite possible that two computers will start transmitting data simultaneously. In such cases, a kind of packet collision occurs, collision(collision), in which data in both packets is lost. One of the main functions of the data link layer protocol is media access control (MAC), i.e., controlling the transmission of data by each computer and minimizing packet collisions. The media access control mechanism is one of the most important characteristics of a link layer protocol. Ethernet uses a mechanism with carrier sense and collision detection (Carrier Sense Multiple Access with Collision Detection, CSMA/CD) to control access to the medium. Some other protocols, such as Token Ring, use token passing.

Physical Layer Specifications

Link layer protocols used in LANs often support more than one network medium, and one or more physical layer specifications are included in the protocol standard. The data link and physical layers are closely related because the properties of the network medium significantly influence how the protocol controls access to the medium. Therefore, we can say that in local networks, link layer protocols also perform the functions of the physical layer. WANs use link layer protocols that do not include physical layer information, for example, SLIP (Serial Line Internet Protocol) and PPP (Point-to-Point Protocol).

Network layer

At first glance it may seem that network(network) layer duplicates some functions of the data link layer. But this is not true: network layer protocols are “responsible” for end-to-end(end-to-end) communications, while link layer protocols operate only within a LAN. In other words, network layer protocols completely ensure the transmission of a packet from the source to the target system. Depending on the type of network, the sender and recipient may be on the same LAN, on different LANs within the same building, or on LANs separated by thousands of kilometers. For example, when you communicate with a server on the Internet, packets generated by your computer pass through dozens of networks on their way to it. The link layer protocol will change several times to accommodate these networks, but the network layer protocol will remain the same all the way. The cornerstone of the TCP/IP (Transmission Control Protocol/Internet Protocol) protocol suite and the most commonly used network layer protocol is the Internet Protocol (IP). Novell NetWare has its own IPX (Internetwork Packet Exchange) network protocol, and on small networks Microsoft Windows Typically the NetBEUI (NetBIOS Enhanced User Interface) protocol is used. Most of the functions assigned to the network layer are determined by the capabilities of the IP protocol. Like a link layer protocol, a network layer protocol adds a header to the data it receives from a higher layer (Figure 1.10). A data element created by a network layer protocol consists of transport layer data and a network layer header and is called datagram(datagram).


Addressing

The network layer protocol header, like the link layer protocol header, contains fields with the addresses of the source and target systems. However, in in this case the destination system address belongs to the packet's final destination and may be different from the destination address in the link-layer protocol header. For example, when you enter address bar browser address of the Web site, in the packet generated by your computer, the address of the Web server is indicated as the address of the target system at the network level, while at the link level the address of the router on your LAN that provides access to the Internet points to the target system. IP uses its own addressing system, which is completely independent of link-layer addresses. Each computer on an IP network is manually or automatically assigned a 32-bit IP address that identifies both the computer itself and the network on which it is located. In IPX, a hardware address is used to identify the computer itself, in addition, a special address is used to identify the network on which the computer is located. NetBEUI differentiates computers by the NetBIOS names assigned to each system during installation.

Fragmentation

Network layer datagrams must traverse multiple networks on their way to their destination, encountering the specific properties and limitations of various link layer protocols. One such limitation is the maximum packet size allowed by the protocol. For example, a Token Ring frame can be up to 4500 bytes in size, while Ethernet frames can be up to 1500 bytes in size. When a large datagram generated in a Token Ring network is transmitted to an Ethernet network, the network layer protocol must break it into several fragments of no more than 1500 bytes in size. This process is called fragmentation(fragmentation). During the fragmentation process, the network layer protocol breaks the datagram into fragments, the size of which corresponds to the capabilities of the data link layer protocol being used. Each fragment becomes an independent packet and continues its path to the target network layer system. The source datagram is formed only after all fragments have reached the destination. Sometimes, on the way to the target system, the fragments into which the datagram is broken must be re-fragmented.

Routing

Routing(routing) is the process of selecting the most efficient route on the Internet for transmitting datagrams from the sending system to the receiving system. In complex internetworks, such as the Internet or large corporate networks, there are often multiple paths to get from one computer to another. Network designers deliberately create redundant links so that traffic can find its way to its destination even if one of the routers fails. Routers are used to connect individual LANs that are part of the Internet. The purpose of a router is to accept incoming traffic from one network and forward it to a specific system on another. There are two types of systems on internet networks: terminal(end systems) and intermediate(intermediate systems). End systems are senders and receivers of packets. A router is an intermediate system. End systems use all seven layers of the OSI model, while packets arriving at intermediate systems do not rise above the network layer. There, the router processes the packet and sends it down the stack for transmission to the next target system (Figure 1.11).


To correctly route the packet to the target, routers store tables with network information in memory. This information can be entered manually by the administrator or collected automatically from other routers using specialized protocols. A typical routing table entry includes the address of another network and the address of the router through which packets must travel to that network. In addition, the routing table element contains route metric - conditional assessment of its effectiveness. If there are multiple routes to a system, the router selects the most efficient one and sends the datagram to the data link layer for transmission to the router specified in the table entry with the best metric. In large networks, routing can be an unusually complex process, but most often it is done automatically and unnoticed by the user.

Transport Layer Protocol Identification

Just as the link layer header specifies the network layer protocol that generated and transmitted the data, the network layer header contains information about the transport layer protocol from which the data was received. Based on this information, the receiving system forwards incoming datagrams to the appropriate transport layer protocol.

Transport layer

Functions performed by protocols transport(transport) layer, complement the functions of network layer protocols. Often the protocols of these levels used for data transmission form an interconnected pair, as can be seen in the example of TCP/IP: the TCP protocol operates at the transport layer, IP at the network layer. Most protocol suites have two or more transport layer protocols that perform different functions. An alternative to TCP is UDP (User Datagram Protocol). The IPX protocol suite also includes several transport layer protocols, including NCP (NetWare Core Protocol) and SPX (Sequenced Packet Exchange). The difference between transport layer protocols from a particular set is that some are connection oriented and others are not. Systems using the protocol connection-oriented(connection-oriented), before transmitting data, they exchange messages to establish communication with each other. This ensures that systems are turned on and ready to go. The TCP protocol, for example, is connection-oriented. When you connect to an Internet server using a browser, the browser and the server first perform a so-called three-step handshake(three-way handshake). Only after this the browser transmits the address of the desired Web page to the server. When the data transfer is complete, the systems perform the same handshake to terminate the connection. In addition, connection-oriented protocols perform additional actions, for example, send a packet acknowledgment signal, segment data, control flow, and detect and correct errors. Typically, protocols of this type are used to transfer large amounts of information that must not contain a single bit of error, such as data files or programs. Additional features of connection-oriented protocols ensure correct data transfer. This is why these protocols are often called reliable(reliable). Reliability in this case is a technical term and means that every packet transmitted is checked for errors, and the sending system is notified of the delivery of each packet. The disadvantage of this type of protocol is the significant amount of control data exchanged between the two systems. First, additional messages are sent when communication is established and terminated. Second, the header added to the packet by a connection-oriented protocol is substantially larger than the header of a connection-less protocol. For example, title TCP protocol/IP takes 20 bytes and the UDP header takes 8 bytes. Protocol, not connection oriented(connectionless), does not establish a connection between two systems before data is transferred. The sender simply transmits information to the target system without worrying about whether it is ready to accept the data or whether the system even exists. Typically, systems resort to connectionless protocols such as UDP for short transactions consisting of only requests and response signals. The response signal from the receiver implicitly functions as a transmission acknowledgment signal.

Note Connection-oriented and connectionless protocols are not limited to the transport layer. For example, network layer protocols are usually not connection-oriented, since they rely on the transport layer to ensure communication reliability.

Transport layer protocols (as well as network and data link layers) usually contain information from higher layers. For example, the TCP and UDP headers include port numbers that identify the application that originated the packet and the application to which it is destined. On session(session) level, a significant discrepancy begins between the actually used protocols and the OSI model. Unlike lower layers, there are no dedicated session layer protocols. The functions of this layer are integrated into protocols that also perform the functions of the representative and application layers. The transport, network, data link and physical layers are responsible for the actual transmission of data over the network. Protocols of the session and higher levels have nothing to do with the communication process. The session layer includes 22 services, many of which define how information is exchanged between systems on the network. The most important services are dialogue management and dialogue separation. The exchange of information between two systems on a network is called dialogue(dialogue). Dialogue management(dialog control) consists of choosing the mode in which the systems will exchange messages. There are two such modes: half duplex(two-way alternate, TWA) and duplex(two-way simultaneous, TWS). In half-duplex mode, the two systems also transmit tokens along with the data. Information can only be transferred to the computer that currently has the token. This avoids message collisions along the way. The duplex model is more complicated. There are no markers in it; both systems can transmit data at any time, even simultaneously. Dividing dialogue(dialog separation) consists of inclusion in the data stream control points (checkpoints) that allow synchronizing the operation of two systems. The degree of difficulty of dividing the dialogue depends on the mode in which it is carried out. In half-duplex mode, systems perform minor synchronization by exchanging checkpoint messages. In full duplex mode, systems perform full synchronization using the master/active token.

Executive level

On representative(presentation) level performs a single function: syntax translation between various systems. Sometimes computers on a network use different syntaxes. The representative layer allows them to "agree" on a common syntax for exchanging data. When establishing a connection at the presentation layer, systems exchange messages about what syntaxes they have and select the one they will use during the session. Both systems involved in the connection have abstractsyntax(abstract syntax) is their “native” form of communication. Abstract syntaxes of various computer platforms may vary. During the system coordination process, a common transfer syntaxdata(transfer syntax). The transmitting system converts its abstract syntax into data transfer syntax, and the receiving system, upon completion of the transfer, does the opposite. If necessary, the system can select a data transfer syntax with additional functions, such as data compression or encryption.

Application layer

The application layer is the entry point through which programs access the OSI model and network resources. Most pro protocols application level provides network access services. For example, using the SMTP (Simple Mail Transfer Protocol) protocol, most programs Email used to send messages. Other application layer protocols, such as FTP ( File Transfer Protocol) are themselves programs. Application layer protocols often include session and presentation layer functions. As a result, a typical protocol stack contains four separate protocols that operate at the application, transport, network, and data link layers.

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

A separate layer of IT - the network - is also built modularly. The network operating model is called the ISO/OSI Open Systems Interconnection Basic Reference Model network model. Briefly - the OSI model.

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

Here we need to add the concept of payload. Each level carries a certain amount of information. Some of this information is proprietary to this level, for example, the 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 look at each level of the OSI Model in more detail.

Level 1. Physical ( physical). Load unit ( PDU) here is the bit. The physical layer knows nothing except ones and zeros. At this level, wires, patch panels, network hubs (hubs that are now difficult to find in our usual networks), and network adapters work. It is network adapters and nothing else from the computer. The network adapter itself receives the bit sequence and transmits it further.

Level 2. Duct ( data link). PDU - frame ( frame). Addressing appears at this level. The address is MAC address. The link layer is responsible for the delivery of frames to the recipient and their integrity. In the networks we are familiar with, it works at the link level ARP protocol. Second-level addressing only works within one network segment and does not know anything about routing - this is handled by a higher level. Accordingly, devices operating on L2 are switches, bridges and a network adapter driver.

Level 3. Network ( network). PDU packet ( packet). The most common protocol (I won’t talk further about “the most common” - this article is for beginners and, as a rule, they don’t encounter anything exotic) here is IP. Addressing occurs using IP addresses, which consist of 32 bits. The protocol is routed, that is, a packet can reach any part of the network through a certain number of routers. Routers operate on L3.

Level 4. Transport ( transport). PDU segment ( segment)/datagram ( datagram). At this level, the concepts of ports appear. TCP and UDP work here. Protocols at this level are responsible for direct communication between applications and for the reliability of information delivery. For example, TCP can request a retransmission of data if 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 receive everything (TCP Window Size).

The following levels are “correctly” implemented only 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 division into session and presentation layers. In this regard, currently the main stack used is TCP/IP, which we will talk about below.

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

Level 6. Executive ( presentation). PDU data ( data). Data presentation and encryption. JPEG, ASCII, MPEG.

Level 7. Applied ( application). PDU data ( data). The most numerous and varied level. It runs all high-level protocols. Such as POP, SMTP, RDP, HTTP, etc. Protocols here do not have to think about routing or guaranteeing the delivery of information - this is done 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 for quick identification of problem areas. After all, if there is no ping (3-4 levels) to the site, there is no point in delving into the overlying layers (TCP-HTTP) when the site is not displayed. By abstracting from other levels, it is easier to find an error in the problematic part. By analogy with a car - we don’t check the spark plugs when we puncture 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 present. Accordingly, an analogy can be drawn between TCP/IP and OSI.

The development of which was not related to the OSI model.

OSI Model Layers

The model consists of 7 levels located one above the other. The layers interact with each other (vertically) through interfaces, and can interact with a parallel layer of another system (horizontally) using protocols. Each level can only interact with its neighbors and perform the functions assigned only to it. More details can be seen in the figure.

OSI model
Data type Level Functions
Data 7. Application layer Access to network services
6. Presentation layer Data representation and coding
5. Session layer Session management
Segments 4. Transport Direct communication between endpoints and reliability
Packages 3. Network Route determination and logical addressing
Personnel 2. Channel Physical addressing
Bits 1. Physical layer Working with transmission media, signals and binary data

Application (Application) level Application layer)

The top level of the model ensures the interaction of user applications with the network. This layer allows applications to use network services, such as remote access to files and databases, and email forwarding. It is also responsible for transmitting service information, providing applications with information about errors and generating requests to presentation level. Example: HTTP, POP3, SMTP, FTP, XMPP, OSCAR, BitTorrent, MODBUS, SIP

Executive (Presentation Level) Presentation layer)

This layer is responsible for protocol conversion and data encoding/decoding. It converts application requests received from the application layer into a format for transmission over the network, and converts data received from the network into a format understandable to applications. This layer can perform compression/decompression or encoding/decoding of data, as well as redirecting requests to another network resource if they cannot be processed locally.

Layer 6 (presentations) of the OSI reference model is typically an intermediate protocol for converting information from neighboring layers. This allows communication between applications on disparate computer systems in a manner transparent to the applications. The presentation layer provides code formatting and transformation. Code formatting is used to ensure that the application receives information to process that makes sense to it. If necessary, this layer can perform translation from one data format to another. The presentation layer not only deals with the formats and presentation of data, it also deals with the data structures that are used by programs. Thus, layer 6 provides organization of data as it is sent.

To understand how this works, let's imagine that there are two systems. One uses the extended binary information exchange code EBCDIC to represent data, for example, it could be an IBM mainframe, and the other is American standard code ASCII information exchange (most other computer manufacturers use it). If these two systems need to exchange information, then a presentation layer is needed that will perform the conversion 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 reception by unauthorized recipients. To accomplish this task, processes and code in the presentation layer must perform data transformation. There are other routines at this level that compress texts and convert graphics into bitstreams so they can be transmitted over a network.

Presentation layer standards also define how graphical images are represented. For these purposes, the PICT format can be used, an image format used to transfer QuickDraw graphics between Macintosh and PowerPC programs. Another representation format is the tagged TIFF image file format, which is commonly used for raster images with high resolution. The next presentation layer standard that can be used for graphic images is that developed by the Joint Photographic Expert Group; in everyday use this standard is simply called JPEG.

There is another group of presentation level standards that define the presentation of audio and film fragments. This includes the MIDI (Musical Instrument Digital Interface) interface for the digital representation of music, developed by the Motion Picture Experts Group MPEG standard, used for compressing and encoding video clips on CDs, storing them in digitized form and transmitting at speeds up to 1.5 Mbits /s, and QuickTime is a standard that describes audio and video elements for programs that run on Macintosh and PowerPC computers.

Session level Session layer)

Layer 5 of the model is responsible for maintaining the communication session, allowing applications to interact with each other long time. The layer manages session creation/termination, information exchange, task synchronization, data transfer eligibility determination, and session maintenance during periods of application inactivity. Transmission synchronization is ensured by placing checkpoints in the data stream, from which the process is resumed if interaction is disrupted.

Transport layer Transport layer)

The 4th level of the model is designed to deliver data without errors, losses and duplication in the sequence in which they were transmitted. It does not matter what data is transmitted, from where and where, that is, it provides the transmission mechanism itself. It divides data blocks into fragments, the size of which depends on the protocol, combines short ones into one, and splits long ones. Example: TCP, UDP.

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 proper sequence, multiplex multiple data streams, provide data flow control mechanism and guarantee the reliability of the received data.

Some network layer protocols, called connectionless protocols, do not guarantee that data is delivered to its destination in the order in which it was sent by the source device. Some transport layers cope with this by collecting data in the correct sequence before passing it on to the session layer. Data multiplexing means that the transport layer is capable of simultaneously processing multiple data streams (the streams may come from different applications) between two systems. A flow control mechanism is a mechanism that allows you to regulate the amount of data transferred from one system to another. Transport layer protocols often have a data delivery control function, forcing the receiving system to send acknowledgments to the sending side that the data has been received.

The operation of protocols with connection establishment can be described using the example of the operation of a regular telephone. Protocols of this class begin data transmission by calling or establishing a route for packets to follow from source to destination. After that, serial data transfer begins and then the connection is terminated upon completion of the transfer.

Connectionless protocols, which send data containing complete address information in each packet, operate similarly to the mail system. Each letter or package contains the address of the sender and recipient. Next, each intermediate post office or network device reads the address information and makes a decision on data routing. A letter or data packet is transmitted from one intermediate device to another until it is delivered to the recipient. Connectionless protocols do not guarantee that information will reach the recipient in the order in which it was sent. For setting the data in the appropriate order when using network protocols transport protocols respond without establishing a connection.

Network layer Network layer)

Layer 3 of the OSI network model is designed to define the path for data transmission. Responsible for translating logical addresses and names into physical ones, determining the shortest routes, switching and routing, monitoring problems and congestion in the network. A network device such as a router operates at this level.

Network layer protocols route data from source to destination.

Data link layer Data Link layer)

This 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 into frames, checks it for integrity, corrects errors if necessary (sends a repeated request for a damaged frame) and sends it to the network layer. The data link layer can communicate with one or more physical layers, monitoring and managing this interaction. The IEEE 802 specification divides this layer into 2 sublayers - MAC (Media Access Control) regulates access to the shared physical medium, LLC (Logical Link Control) provides network layer service.

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 layers with each other; this is not new level, but simply an implementation of the model for a specific OS. Examples of such interfaces: ODI, NDIS

Physical level Physical layer)

The lowest level of the model is intended to directly transmit the data stream. Transmits electrical or optical signals into a cable or radio broadcast and, accordingly, receives them and converts them into data bits in accordance with digital signal coding methods. In other words, it provides an interface between the network media and the network device.

Protocols: IRDA, USB, EIA RS-232, EIA-422, EIA-423, RS-449, RS-485, Ethernet (including 10BASE-T, 10BASE2,

The main flaw of OSI is the ill-conceived transport layer. On it, OSI allows data exchange between applications (introducing the concept port- application identifier), however, the ability to exchange simple datagrams (UDP type) is not provided in OSI - the transport layer must form connections, ensure delivery, control the flow, etc. (TCP type). Real protocols implement this possibility.

TCP/IP family

The TCP/IP family has three transport protocols: TCP, which is fully compliant with OSI, providing verification of the receipt of data, UDP, which corresponds to the transport layer only by the presence of a port, allowing the exchange of datagrams between applications, but does not guarantee the receipt of data, and SCTP, designed to overcome some of the shortcomings of TCP and in which added some innovations. (There are about two hundred other protocols in the TCP/IP family, the most famous of which is the ICMP service protocol, used for internal operational needs; the rest are also not transport protocols.)

IPX/SPX Family

In the IPX/SPX family, ports (called "sockets" or "sockets") appear in the IPX network layer protocol, allowing datagrams to be exchanged between applications (the operating system reserves some of the sockets for itself). The SPX protocol, in turn, complements IPX with all other transport layer capabilities in full compliance with OSI.

As a host address, IPX uses an identifier formed from a four-byte network number (assigned by routers) and the MAC address of the network adapter.

DOD model

A TCP/IP protocol stack using a simplified four-layer OSI model.

Addressing in IPv6

Destination and source addresses in IPv6 are 128 bits or 16 bytes long. Version 6 generalizes the special address types of version 4 into the following address types:

  • Unicast – individual address. Defines a single node - a computer or router port. The packet must be delivered to the node along the shortest route.
  • Cluster – cluster address. Refers to a group of nodes that share a common address prefix (for example, attached to the same physical network). The packet must be routed to a group of nodes along the shortest path, and then delivered only to one of the group members (for example, the closest node).
  • Multicast – the address of a set of nodes, possibly in different physical networks. Copies of the packet must be delivered to each dial node using hardware multicast or broadcast delivery capabilities, if possible.

Like IPv4, IPv6 addresses are divided into classes based on the value of the most significant bits of the address.

Most of the classes are reserved for future use. Most interesting for practical use is a class intended for Internet service providers called Provider-Assigned Unicast.

The address of this class has the following structure:

Each Internet service provider is assigned a unique identifier that identifies all the networks it supports. Next, the provider assigns unique identifiers to its subscribers, and uses both identifiers when assigning a block of subscriber addresses. The subscriber himself assigns unique identifiers to his subnets and nodes of these networks.

The subscriber can use the IPv4 subnetting technique to further divide the subnet ID field into smaller fields.

The described scheme brings the IPv6 addressing scheme closer to the schemes used in territorial networks, such as telephone networks or X.25 networks. The hierarchy of address fields will allow backbone routers to work only with the higher parts of the address, leaving the processing of less significant fields to subscriber routers.

At least 6 bytes must be allocated for the host identifier field in order to use MAC addresses in IP addresses local networks directly.

To ensure compatibility with the IPv4 addressing scheme, IPv6 has a class of addresses that have 0000 0000 in the most significant bits of the address. The lower 4 bytes of the address of this class must contain the IPv4 address. Routers that support both versions of addresses must provide translation when passing a packet from a network supporting IPv4 addressing to a network supporting IPv6 addressing, and vice versa.

Criticism

The seven-layer OSI model has been criticized by some experts. In particular, in the classic book “UNIX. Management system administrator» Evi Nemeth and others write:

… While the ISO committees were arguing about their standards, behind their backs the whole concept of networking was changing and the TCP/IP protocol was being implemented around the world. ...

And so, when the ISO protocols were finally implemented, a number of problems emerged:
These protocols were based on concepts that make no sense in modern networks.
Their specifications were in some cases incomplete.
In terms of functionality, they were inferior to other protocols.
The presence of multiple layers made these protocols slow and difficult to implement.

... Now even the most ardent supporters of these protocols admit that OSI is gradually moving towards becoming a footnote in the pages of computer history.

To make it easier to understand the operation of all network devices listed in the article Network Devices regarding the layers of the OSI Network Reference Model, I have made schematic drawings with small comments.

First, let's remember the layers of the OSI reference network model and data encapsulation.

See how data is transferred between two connected computers. At the same time, I will highlight the work of the network card on computers, because It is precisely this that is a network device, but a computer is not. (All pictures are clickable - to enlarge the picture, click on it.)


An application on PC1 sends data to another application on PC2. Starting from the top layer (application layer), data is sent to the network card to the data link layer. On him LAN card converts frames into bits and sends them to a physical medium (such as a cable twisted pair). A signal arrives on the other side of the cable, and the PC2 computer's network card receives these signals, recognizing them into bits and forming frames from them. The data (contained in the frames) is decapsulated to the top layer, and when it reaches the application layer, the corresponding program on PC2 receives it.

Repeater. Hub.

A repeater and a hub operate at the same level, so they are depicted the same in terms of the OSI network model. For the convenience of representing network devices, we will display them between our computers.


Repeater and concentrator of the first (physical) level device. They receive the signal, recognize it, and forward the signal to all active ports.

Network bridge. Switch.

The network bridge and the switch also operate at the same level (channel) and are depicted in the same way.


Both devices are already at the second level, so in addition to recognizing the signal (like hubs at the first level), they decapsulate it (the signal) into frames. At the second level it is compared check sum trailer (trailer) frame. Then the recipient's MAC address is learned from the frame header and its presence in the switched table is checked. If the address is present, then the frame is encapsulated back into bits and sent (as a signal) to the corresponding port. If the address is not found, the process of searching for this address in connected networks occurs.

Router.


As you can see, a router (or router) is a third-level device. Here's roughly how a router functions: A signal arrives at the port, and the router recognizes it. The recognized signal (bits) form frames (frames). The checksum in the trailer and the recipient's MAC address are checked. If all checks are successful, the frames form a packet. At the third level, the router examines the packet header. It contains the IP address of the destination (recipient). Based on the IP address and its own routing table, the router selects the best way following the packages to the recipient. Having selected a path, the router encapsulates the packet into frames and then into bits and sends them as signals to the appropriate port (selected in the routing table).

Conclusion

In conclusion, I combined all the devices in one picture.


Now you have enough knowledge to determine which devices work and how they work. If you still have questions, ask them to me and in the near future either I or other users will certainly help you.







2024 gtavrl.ru.