OSI model physical link network transport layers. OSI reference model

Just because a protocol is an agreement adopted by two interacting entities, in this case two computers operating on a network, does not mean that it is necessarily standard. But in practice, when implementing networks, they usually use standard protocols. These can be branded, national or international standards.

In the early 80s, a number of international standardization organizations - ISO, ITU-T and some others - developed a model that played a significant role in the development of networks. This model is called the ISO/OSI model.

Open Systems Interoperability Model (Open System Interconnection, OSI) defines different levels of interaction between systems in packet switching networks, gives them standard names and specifies what functions each layer should perform.

The OSI model was developed based on extensive experience gained from creating computer networks, mainly global ones, in the 70s. A full description of this model takes up more than 1000 pages of text.

In the OSI model (Fig. 11.6), communication means are divided into seven levels: application, representative, session, transport, network, channel and physical. Each layer deals with a specific aspect of network device interaction.


Rice. 11.6.

The OSI model describes only the system communications implemented by the operating system, system utilities and hardware. The model does not include means for end-user application interaction. Applications implement their own communication protocols by accessing system tools. Therefore, it is necessary to distinguish between the level of interaction between applications and application layer.

It should also be kept in mind that the application can take over the functions of some of the upper layers of the OSI model. For example, some DBMSs have built-in tools remote access to files. In this case, the application does not use the system file service when accessing remote resources; it bypasses the upper layers of the OSI model and accesses directly the system facilities responsible for transportation messages over the network, which are located at the lower levels of the OSI model.

So, let's say an application makes a request to an application layer, such as a file service. Based on this request, the application level software generates a message in a standard format. A typical message consists of a header and a data field. The header contains service information that must be passed through the network to the application layer of the destination machine to tell it what work needs to be done. In our case, the header obviously must contain information about the location of the file and the type of operation that needs to be performed. The message data field can be empty or contain some data, such as data that needs to be written to a remote . But in order to deliver this information to its destination, there are still many tasks to be solved, the responsibility for which lies with lower levels.

After generating the message application layer sends it down the stack representative level. Protocol representative level based on information received from the application level header, performs the required actions and adds its own service information to the message - header representative level, which contains instructions for the protocol representative level destination machine. The resulting message is passed down session level, which in turn adds its header, etc. (Some protocols place service information not only at the beginning of the message in the form of a header, but also at the end, in the form of a so-called “trailer”.) Finally, the message reaches the bottom, physical level, which, in fact, transmits it via communication lines to the recipient machine. At this point, the message is “overgrown” with headers of all levels (

To provide a unified representation of data in networks with heterogeneous devices and software, the international organization for standards ISO (International Standardization Organization) has developed a basic model for open systems communication OSI (Open System Interconnection). This model describes the rules and procedures for transmitting data in various network environments when organizing a communication session. The main elements of the model are layers, application processes and physical connections. In Fig. Figure 1.10 shows the structure of the basic model.

Each layer of the OSI model performs a specific task during the transmission of data over the network. The basic model is the basis for the development of network protocols. OSI divides network communication functions into seven layers, each of which serves different parts of the open systems interconnection process.

The OSI model describes only system communications, not end-user applications. Applications implement their own communication protocols by accessing system facilities.

Rice. 1.10. OSI model

If an application can take on the functions of some of the upper layers of the OSI model, then to exchange data it accesses directly the system tools that perform the functions of the remaining lower layers of the OSI model.

Interaction of OSI Model Layers

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

A horizontal protocol-based model that provides a mechanism for interaction between programs and processes on different machines;

A vertical model based on services provided by adjacent 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 reality, interaction occurs between adjacent levels of one computer.

So, the information on the sending computer must pass through all levels. It is then transmitted through 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 to the sending computer.

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

Rice. 1.11. Diagram of computer interaction in the OSI Basic Reference Model

Before being sent to the network, the data is divided into packets. A packet is a unit of information transmitted between network stations.

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

At the receiving end, the packet passes through all layers in reverse order. At each layer, the protocol at that layer reads the packet information, then removes the information added to the packet at that layer by the sending party, 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 performs its own function. The higher the level, the more complex the problem 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 needed to perform this task.

Each layer provides a service to the layer above it, in turn requesting service from the layer below it. The upper layers request service in almost the same way: as a rule, this is a requirement to route some data from one network to another. The practical implementation of data addressing principles is assigned to the lower levels. In Fig. 1.13 provides a brief description of the functions of all levels.

Rice. 1.13. Functions of the OSI Model Layers

The model under consideration determines the interaction of open systems from different manufacturers in the same network. Therefore, she performs coordinating actions for them on:

Interaction of application processes;

Data presentation forms;

Uniform data storage;

Network resource management;

Data security and information protection;

Diagnostics of programs and hardware.

Application layer

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

In reality, the application layer is a set of various protocols through which network users access shared resources, such as files, printers, or hypertext Web pages, and also organize their collaboration, for example, using the electronic mail protocol. Special application service elements provide service for specific application programs, such as file transfer programs and terminal emulation programs. If, for example, a program needs to transfer files, then the FTAM (File Transfer, Access, and Management) file transfer, access and management protocol will be used. In the OSI model, an application program that needs to perform a specific task (for example, updating 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 the 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 of describing information;

7. Selection of procedures for the planned dialogue of processes;

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

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

10. Agreement to correct errors and determine the reliability of data;

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

These functions define the types of services that the application layer provides to application processes. In addition, the application layer transfers to application processes the services 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. System and user software can handle this.

The application layer is responsible for application access to the network. The tasks of this layer are transferring files, exchanging email messages and managing the network.

The most common protocols in the top three layers include:

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 transmission;

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

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

Presentation layer

The functions of this level are the presentation of data transferred between application processes in the required form.

This layer ensures that information conveyed by the application layer will be understood by the application layer in another system. If necessary, the presentation layer, at the time of information transmission, converts data formats into some common presentation format, and at the time of reception, accordingly, performs the reverse conversion. In this way, application layers can overcome, for example, syntactic differences in data representation. This situation can arise on a LAN with different types of computers (IBM PC and Macintosh) that need to exchange data. Thus, in database fields, information must be presented in the form of letters and numbers, and often in the form of a graphic image. This data needs to be processed, for example, as floating point numbers.

The basis for the general presentation of data is the ASN.1 system, uniform for all levels of the model. This system serves to describe the file structure and also solves the problem of data encryption. At this level, encryption and decryption of data can be performed, thanks to which the secrecy of data exchange is ensured for all application services at once. An example of such a protocol is the Secure Socket Layer (SSL) protocol, which provides secure messaging for application layer protocols in the TCP/IP stack. This level provides data conversion (encoding, compression, etc.) of the application layer into a stream of information for the transport layer.

The representative level performs the following main functions:

1. Generating 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, pictures, diagrams).

5. Classification of data.

6. Transmission of requests to terminate sessions.

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

Session layer

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

The session layer provides conversation management to record which party is currently active and also provides synchronization facilities. The latter allow checkpoints to be inserted into long transfers, so that in the event of a failure, you can go back to the last checkpoint, rather than 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 delivery of one communication session. In addition, the session layer additionally contains the functions of password management, dialogue management, synchronization, and cancellation of communication in a transmission session after a failure due to errors in lower layers. The functions of this level are to coordinate communication between two application programs running on different workstations. This occurs in the form of a well-structured dialogue. These functions include creating a session, managing the sending and receiving of message packets during a session, and terminating a session.

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

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

Duplex (processes will transmit data and receive it at the same time).

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

The session layer provides the following functions:

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

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

3. Management of interaction between application processes.

4. Synchronization of session connections.

5. Notification of application processes about exceptional situations.

6. Setting marks in the application process that allow, after a failure or error, to restore its execution from the nearest mark.

7. Interrupting the application process when necessary and resuming it correctly.

8. Terminate a session without losing data.

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 top three layers of the model.

Transport Layer

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

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

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

The functions of the transport layer include:

1. Controlling transmission over the network and ensuring the integrity of data blocks.

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

3. Restoring transmission after failures and malfunctions.

4. Enlargement or division of data blocks.

5. Providing priorities when transferring blocks (normal or urgent).

6. Confirmation of transfer.

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

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

The most common transport layer protocols include:

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

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

NCP (NetWare Core Protocol) the basic protocol of NetWare networks;

SPX (Sequenced Packet eXchange) orderly exchange of Novell stack packages;

TP4 (Transmission Protocol) – class 4 transmission protocol.

Network Layer

The network level ensures the laying of channels connecting subscriber and administrative systems through the communication network, selection of the fastest and most reliable route.

The network layer establishes communication in a computer network between two systems and ensures the laying of virtual channels between them. A virtual or logical channel is the functioning of network components that creates the illusion of the interacting components laying the desired path between them. In addition, the network layer reports errors to the transport layer. Network layer messages are usually called packets. They contain pieces of data. The network layer is responsible for their addressing and delivery.

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

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

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

Networks are connected to each other by special devices called routers. A router is a device that collects information about the topology of internetwork connections and, based on it, forwards network layer packets to the destination network. In order to transmit a message from a sender located on one network to a recipient located on another network, you need to make a number of transit transfers (hops) between networks, each time choosing the appropriate route. Thus, a route is a sequence of routers through which a packet passes.

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

The network layer performs the following functions:

1. Creating network connections and identifying their ports.

2. Detecting and correcting errors that occur during transmission through a communication network.

3. Packet flow control.

4. Organization (ordering) of sequences of packets.

5. Routing and switching.

6. Segmentation and merging of packages.

At the network level, two types of protocols are defined. The first type refers to the definition of rules for transmitting end node data packets from the node to the router and between routers. These are the protocols that are usually meant when people talk about network layer protocols. However, another type of protocol, called routing information exchange protocols, is often included in the network layer. Using these protocols, routers collect information about the topology of internetwork connections.

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

The most commonly used protocols at the network level are:

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

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

X.25 is an international standard for global packet-switched communications (partially implemented at Layer 2);

CLNP (Connection Less Network Protocol) is a connectionless network protocol.

Data Link Layer

The unit of information at the link layer is the frame. Frames are a logically organized structure into which data can be placed. The job of the link layer is to transmit frames from the network layer to the physical layer.

The physical layer simply transfers bits. 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 occupied. 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 the checksum to the frame. When the 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 correct and accepted. If the checksums do not match, an error is recorded.

The task of the link layer is to take packets coming from the network layer and prepare them for transmission, placing them in a frame of the appropriate size. This layer is responsible for determining where a block begins and ends, as well as detecting transmission errors.

At the same level, the rules for using the physical layer by network nodes are determined. The electrical representation of data on the LAN (data bits, data encoding methods, and tokens) are recognized at this level and only at this level. This is where errors are detected and corrected (by requiring data to be retransmitted).

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

LLC (Logical Link Control) logical link control provides logical control of communication. The LLC sublayer provides network layer services and is associated 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 located above the MAC sublayer.

The data link layer defines media access and transmission control through a procedure for transmitting data over the channel.

When the transmitted data blocks are large, the link layer divides them into frames and transmits the frames in the form of sequences.

When receiving frames, the layer forms transmitted data blocks from them. The size of a data block depends on the transmission method and the quality of the channel over which it is transmitted.

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

The data 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 transparency of logical channels (transmission of data encoded in any way through them).

The most commonly used protocols at the data 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 frequency listening and conflict detection;

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

FDDI (Fiber Distributed Date Interface Station) is a network technology according to the IEEE 802.6 standard using fiber optic media;

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

Frame relay network organized using X25 and ISDN technologies.

Physical Layer

The physical layer is designed to interface with physical means of communication. Physical connectivity is a set of physical media, hardware and software that enables the transmission of signals between systems.

The physical medium is the material substance through which signals are transmitted. The physical environment is the foundation on which physical connectivity is 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 Conversion Sublayer.

The first of them ensures the pairing of the data stream with the physical communication channel used. The second one carries out transformations related to the protocols used. The physical layer provides the physical interface to the data channel and also describes the procedures for transmitting signals to and receiving signals from the channel. This level defines the electrical, mechanical, functional and procedural parameters for physical communication in systems. The physical layer receives data packets from the upper 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. Mechanical and electrical/optical properties of the transmission medium are determined at the physical level and include:

Type of cables and connectors;

Layout of contacts in connectors;

Signal coding scheme for values ​​0 and 1.

The physical layer performs the following functions:

1. Establishing and disconnecting physical connections.

2. Serial code transmission and reception.

3. Listening, if necessary, to channels.

4. Channel identification.

5. Notification of malfunctions and failures.

Notification of faults and failures is due to the fact that at the physical level a certain class of events is detected that interfere with the normal operation of the network (collision of frames sent by several systems at once, channel break, power outage, loss of mechanical contact, etc.). The types of services provided to the data link layer are determined by the physical layer protocols. Listening to a channel is necessary in cases where a group of systems are connected to one channel, but only one of them is allowed to transmit signals at the same time. Therefore, listening to a channel allows you to determine whether it is free for transmission. In some cases, to more clearly define the structure, the physical layer is divided into several sublevels. For example, the physical layer of a wireless network is divided into three sublayers (Fig. 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 operates only on 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 the purpose of transmitting them over a communication channel. Many local networks use Manchester encoding.

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

Some of the most common physical layer specifications include:

EIA-RS-232-C, CCITT V.24/V.28 – mechanical/electrical characteristics of an unbalanced serial interface;

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

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

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

In network science, as in any other field of knowledge, there are two fundamental approaches to learning: movement from the general to the specific and vice versa. Well, it’s not that in life people use these approaches in their pure form, but still, at the initial stages, each student chooses for himself one of the above-mentioned directions. For higher education (at least the (post)Soviet model) the first method is more typical, for self-education most often the second: a person was working on the network, solving small single-user administrative tasks from time to time, and suddenly he wanted to figure out how, Actually, how does all this crap work?

But the purpose of this article is not philosophical discussions about teaching methodology. I would like to introduce to the attention of novice networkers that general and most importantly, from which, like from a stove, you can dance to the most sophisticated private shops. By understanding the seven-layer OSI model and learning to “recognize” its layers in the technologies you already know, you can easily move forward in any direction of the networking industry you choose. The OSI model is the framework on which any new knowledge about networks will be hung.

This model is mentioned in one way or another in almost any modern literature on networks, as well as in many specifications of specific protocols and technologies. Without feeling the need to reinvent the wheel, I decided to publish excerpts from the work of N. Olifer, V. Olifer (Information Technology Center) entitled “The role of communication protocols and the functional purpose of the main types of equipment in corporate networks,” which I consider the best and most comprehensive publication on this topic .

chief editor

model

Just because a protocol is an agreement between two interacting entities, in this case two computers working on a network, does not mean that it is necessarily a standard. But in practice, when implementing networks, they tend to use standard protocols. These may be proprietary, national or international standards.

The International Standards Organization (ISO) has developed a model that clearly defines the different levels of interaction between systems, gives them standard names, and specifies what work each level should do. This model is called the Open System Interconnection (OSI) model or ISO/OSI model.

In the OSI model, communication is divided into seven layers or layers (Figure 1.1). Each level deals with one specific aspect of interaction. Thus, the interaction problem is decomposed into 7 particular problems, each of which can be solved independently of the others. Each layer maintains interfaces with the layers above and below.

Rice. 1.1. ISO/OSI Open Systems Interconnection Model

The OSI model describes only system communications, not end-user applications. Applications implement their own communication protocols by accessing system facilities. It should be borne in mind that the application can take over the functions of some of the upper layers of the OSI model, in which case, if necessary, internetworking it accesses directly the system tools that perform the functions of the remaining lower layers of the OSI model.

An end-user application can use system interaction tools not only to organize a dialogue with another application running on another machine, but also simply to receive the services of a particular network service, for example, accessing remote files, receiving mail, or printing on a shared printer.

So, let's say an application makes a request to an application layer, such as a file service. Based on this request, the application level software generates a standard format message, which contains service information (header) and, possibly, transmitted data. This message is then forwarded to the representative level. The presentation layer adds its header to the message and passes the result down to the session layer, which in turn adds its header, and so on. Some protocol implementations provide that the message contains not only a header, but also a trailer. Finally, the message reaches the lowest, physical layer, which actually transmits it along the communication lines.

When a message arrives on another machine over the network, it moves up sequentially from level to level. Each level analyzes, processes and deletes the header of its level, performs functions corresponding to this level and passes the message to the higher level.

In addition to the term message, there are other names used by network specialists to designate a unit of data exchange. ISO standards for protocols of any level use the term “protocol data unit” - Protocol Data Unit (PDU). In addition, the names frame, packet, and datagram are often used.

ISO/OSI Model Layer Functions

Physical Layer: This layer deals with the transmission of bits over physical channels such as coaxial cable, twisted pair cable, or fiber optic cable. This level is related to the characteristics of physical data transmission media, such as bandwidth, noise immunity, characteristic impedance and others. At the same level, the characteristics of electrical signals are determined, such as requirements for pulse edges, voltage or current levels of the transmitted signal, type of coding, signal transmission speed. In addition, the types of connectors and the purpose of each contact are standardized here.

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 or serial port.

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

Data Link Layer: The physical layer simply transfers bits. This does not take into account that in some networks in which communication lines are used (shared) alternately by several pairs of interacting computers, the physical transmission medium may be occupied. 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. To do this, at the data link layer, bits are grouped into sets called frames. 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 the checksum to the frame. When the 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 correct and accepted. If the checksums do not match, an error is recorded.

The link layer protocols used in local networks contain a certain structure of connections between computers and methods for addressing them. Although the data link layer provides frame delivery between any two nodes on a local network, it does this only in a network with a very specific connection topology, precisely the topology for which it was designed. Typical topologies supported by LAN link layer protocols include shared bus, ring, and star. Examples of link layer protocols are Ethernet, Token Ring, FDDI, 100VG-AnyLAN.

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

In global networks, which rarely have a regular topology, the data link layer ensures the exchange of messages between two neighboring computers connected by an individual communication line. Examples of point-to-point protocols (as such protocols are often called) are the widely used PPP and LAP-B protocols.

Network level. This level serves to form a unified transport system that unites several networks with different principles for transmitting information between end nodes. Let's look at the functions of the network layer using local networks as an example. The local network link layer protocol ensures the delivery of data between any nodes only in a network with the appropriate typical topology. This is a very strict limitation that does not allow building networks with a developed structure, for example, networks that combine several enterprise networks into a single network, or highly reliable networks in which there are redundant connections between nodes. In order, on the one hand, to maintain the simplicity of data transfer procedures for standard topologies, and on the other hand, to allow the use of arbitrary topologies, an additional network layer is used. At this level the concept of "network" is introduced. In this case, a network is understood as a collection of computers connected to each other in accordance with one of the standard typical topologies and using one of the link layer protocols defined for this topology to transmit data.

Thus, within the network, data delivery is regulated by the data link layer, but data delivery between networks is handled by the network layer.

Network layer messages are usually called packages. When organizing packet delivery at the network level, the concept is used "network number". In this case, the recipient's address consists of the network number and the computer number on this network.

Networks are connected to each other by special devices called routers. Router is a device that collects information about the topology of internetwork connections and, based on it, forwards network layer packets to the destination network. In order to transmit a message from a sender located on one network to a recipient located on another network, you need to make a number of transit transfers (hops) between networks, each time choosing the appropriate route. Thus, a route is a sequence of routers through which a packet passes.

The problem of choosing the best path is called routing and its solution is the main task of the network level. This problem is complicated by the fact that the shortest path is not always the best. Often the criterion for choosing a route is the time of data transmission along this route; it depends on the capacity of communication channels and traffic intensity, which can change over time. Some routing algorithms try to adapt to changes in load, while others make decisions based on long-term averages. The route can be selected based on other criteria, for example, transmission reliability.

At the network level, two types of protocols are defined. The first type refers to the definition of rules for transmitting end node data packets from the node to the router and between routers. These are the protocols that are usually meant when people talk about network layer protocols. The network layer also includes another type of protocol called routing information exchange protocols. Using these protocols, routers collect information about the topology of internetwork connections. Network layer protocols are implemented by operating system software modules, as well as router software and hardware.

Examples of network layer protocols are the TCP/IP stack IP Internetwork Protocol and the Novell IPX stack Internetwork Protocol.

Transport Layer: On the way from the sender to the recipient, packets may be corrupted or lost. While some applications have their own error handling, there are others that prefer to deal with a reliable connection right away. The job of the transport layer is to ensure that applications or the upper layers of the stack - 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 interrupted communications, the availability of means for multiplexing 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 choice of transport layer service class is determined, on the one hand, by the extent to which the problem of ensuring reliability is solved by the applications and protocols of higher levels than the transport one, and on the other hand, this choice depends on how reliable the entire data transportation system is online. So, for example, if the quality of communication channels is very high, and the likelihood of errors not detected by lower-level protocols is small, then it is reasonable to use one of the lightweight transport layer services that are not burdened with numerous checks, handshaking, and other techniques for increasing reliability. If the vehicles are initially very unreliable, then it is advisable to turn to the most developed transport level service, which works using maximum means for detecting and eliminating errors - using the preliminary establishment of a logical connection, monitoring the delivery of messages using checksums and cyclic numbering of packets, establishing delivery timeouts, etc.

As a rule, all protocols, starting from the transport layer and above, are implemented by software of the end nodes of the network - components of their network operating systems. Examples of transport protocols include the TCP and UDP protocols of the TCP/IP stack and the SPX protocol of the Novell stack.

Session Layer: The session layer provides conversation management to record which party is currently active and also provides synchronization facilities. 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.

Presentation Layer: This layer provides assurance that information conveyed by the application layer will be understood by the application layer in another system. If necessary, the presentation layer converts data formats into some common presentation format, and at the reception, accordingly, performs the reverse conversion. In this way, application layers can overcome, for example, syntactic differences in data representation. At this level, data encryption and decryption can be performed, thanks to which the secrecy of data exchange is ensured for all application services at once. An example of a protocol that operates at the presentation layer is the Secure Socket Layer (SSL) protocol, which provides secure messaging for the application layer protocols of the TCP/IP stack.

Application Layer The application layer is really just a set of various protocols through which network users access shared resources such as files, printers, or hypertext Web pages, and also organize their collaboration, for example, using the electronic mail protocol. . The unit of data that the application layer operates on is usually called message .

There is a very wide variety of application layer protocols. Let us give as examples at least a few of the most common implementations of file services: NCP in the Novell NetWare operating system, SMB in Microsoft Windows NT, NFS, FTP and TFTP, which are part of the TCP/IP stack.

The OSI model, although very important, is only one of many communication models. These models and their associated protocol stacks may differ in the number of layers, their functions, message formats, services provided at the upper layers, and other parameters.

Characteristics of popular communication protocol stacks

So, the interaction of computers in networks occurs in accordance with certain rules for exchanging messages and their formats, that is, in accordance with certain protocols. A hierarchically organized set of protocols that solve the problem of interaction between network nodes is called a communication protocol stack.

There are many protocol stacks that are widely used in networks. These are stacks that are international and national standards, and proprietary stacks that have become widespread due to the prevalence of equipment from a particular company. Examples of popular protocol stacks include Novell's IPX/SPX stack, the TCP/IP stack used on the Internet and many networks based on the UNIX operating system, the OSI stack of the International Standards Organization, the DECnet stack of Digital Equipment Corporation, and several others.

The use of a particular communication protocol stack in a network largely determines the face of the network and its characteristics. Smaller networks may use only one stack. In large corporate networks that connect various networks, several stacks are usually used in parallel.

Communication equipment implements lower-layer protocols that are more standardized than higher-layer protocols, and this is a prerequisite for successful collaboration between equipment from different manufacturers. The list of protocols supported by a particular communication device is one of the most important characteristics of this device.

Computers implement communication protocols in the form of corresponding software elements of a network operating system, for example, link-level protocols are usually implemented in the form of network adapter drivers, and upper-level protocols are implemented in the form of server and client components of network services.

The ability to work well in a particular operating system environment is an important characteristic of communications equipment. You can often read in advertisements for a network adapter or hub that it was designed specifically to work on a NetWare or UNIX network. This means that the hardware developers have optimized its characteristics for the protocols used in that network operating system, or for a given version of their implementation if these protocols are used in different operating systems. Due to the peculiarities of the implementation of protocols in various operating systems, one of the characteristics of communication equipment is its certification for the ability to work in the environment of a given operating system.

At the lower levels - physical and data link - almost all stacks use the same protocols. These are well-standardized protocols: Ethernet, Token Ring, FDDI and some others, which allow the same equipment to be used in all networks.

The network and higher layer protocols of existing standard stacks are highly variable and generally do not conform to the layering recommended by the ISO model. In particular, in these stacks, session and presentation layer functions are most often combined with the application layer. This discrepancy is due to the fact that the ISO model appeared as a result of a generalization of already existing and actually used stacks, and not vice versa.

OSI stack

A distinction must be made between the OSI protocol stack and the OSI model. While the OSI model conceptually defines the procedure for interaction of open systems, decomposing the task into 7 layers, standardizes the purpose of each layer and introduces standard names for the layers, the OSI stack is a set of very specific protocol specifications that form a consistent protocol stack. This protocol stack is supported by the US government in its GOSIP program. All government computer networks installed after 1990 must either directly support the OSI stack or provide a means to migrate to the stack in the future. However, the OSI stack is more popular in Europe than in the US, as Europe has fewer legacy networks installed that use their own protocols. There is also a big need for a common stack in Europe, as there are so many different countries.

This is an international, manufacturer-independent standard. It can enable collaboration between corporations, partners and suppliers. This interaction is complicated by addressing, naming, and data security issues. All these problems are partially solved in the OSI stack. OSI protocols require a lot of CPU processing power, making them more suitable for powerful machines rather than networks of personal computers. Most organizations are just planning the transition to the OSI stack. Among those working in this direction are the US Navy Department and the NFSNET network. One of the largest manufacturers supporting OSI is AT&T. Its Stargroup network is entirely based on the OSI stack.

For obvious reasons, the OSI stack, unlike other standard stacks, fully complies with the OSI interconnection model; it includes specifications for all seven layers of the open systems interconnection model (Figure 1.3).


Rice. 1.3. OSI stack

On The OSI stack supports Ethernet, Token Ring, FDDI protocols, as well as LLC, X.25 and ISDN protocols. These protocols will be discussed in detail in other sections of the manual.

Services network, transport and session levels are also available in the OSI stack, but they are not very common. The network layer implements both connectionless and connection-based protocols. The OSI stack transport protocol, consistent with the functions defined for it in the OSI model, hides the differences between connection-oriented and connectionless network services so that users receive the desired quality of service regardless of the underlying network layer. To provide this, the transport layer requires the user to specify the desired quality of service. 5 classes of transport service have been defined, from the lowest class 0 to the highest class 4, which differ in the degree of error tolerance and requirements for data recovery after errors.

Services application level include file transfer, terminal emulation, directory services, and mail. Of these, the most promising are directory service (X.500 standard), electronic mail (X.400), virtual terminal protocol (VT), file transfer, access and management (FTAM) protocol, forwarding and job management protocol (JTM). Recently, ISO has concentrated its efforts on top-level services.

X.400

are a family of recommendations from the International Consultative Committee on Telegraphy and Telephony (CCITT) that describe electronic message forwarding systems. Today, the X.400 recommendations are the most popular messaging protocol. The X.400 recommendations describe the model of a messaging system, the protocols for interaction between all components of this system, as well as the many types of messages and the capabilities that the sender has for each type of message sent.

The X.400 Recommendations define the following minimum required set of services to be provided to users: access control, maintenance of unique system message identifiers, message delivery or non-delivery notification with reason, message content type indication, message content conversion indication, transmission and delivery timestamps, selecting a delivery category (urgent, non-urgent, normal), multicast delivery, delayed delivery (up to a specific point in time), transforming content to interface with incompatible mail systems such as telex and fax services, querying whether a specific message was delivered, mailing lists, which may have a nested structure, means of protecting messages from unauthorized access, based on an asymmetric public key cryptosystem.

The purpose of the recommendations X.500 is to develop global help desk standards. The process of delivering a message requires knowledge of the recipient's address, which is a problem in large networks, so it is necessary to have a help desk that helps obtain the addresses of senders and recipients. In general, an X.500 service is a distributed database of names and addresses. All users are potentially allowed to log into this database using a specific set of attributes.

The following operations are defined on the names and addresses database:

  • reading - getting an address by a known name,
  • request - obtaining a name based on known address attributes,
  • modification involving deleting and adding records in a database.

The main challenges to implementing the X.500 recommendations stem from the scale of this project, which purports to be a worldwide reference service. Therefore, software implementing X.500 recommendations is very cumbersome and places high demands on hardware performance.

Protocol VT solves the problem of incompatibility between different terminal emulation protocols. Currently, a user of a personal computer compatible with an IBM PC, in order to simultaneously work with VAX, IBM 3090 and HP9000 computers, needs to purchase three different programs to emulate terminals of different types and using different protocols. If every host computer had ISO terminal emulation protocol software, then the user would only need one program that supported the VT protocol. In its standard, ISO has accumulated widely used terminal emulation functions.

File transfer is the most common computer service. Access to files, both local and remote, is needed by all applications - text editors, email, databases or remote launch programs. ISO provides such a service in the protocol FTAM. Along with the X.400 standard, it is the most popular OSI stack standard. FTAM provides facilities for localizing and accessing file content and includes a set of directives for inserting, replacing, extending, and clearing file content. FTAM also provides facilities for manipulating the file as a whole, including creating, deleting, reading, opening, closing the file, and selecting its attributes.

Forwarding and Work Control Protocol JTM Allows users to forward work that needs to be completed on the host computer. The job control language that enables job submission tells the host computer what actions should be performed on what programs and files. The JTM protocol supports traditional batch processing, transaction processing, remote job entry, and distributed database access.

TCP/IP stack

The TCP/IP stack, also called the DoD stack and the Internet stack, is one of the most popular and promising communication protocol stacks. If at present it is distributed mainly in networks with UNIX OS, then its implementation in the latest versions of network operating systems for personal computers (Windows NT, NetWare) is a good prerequisite for the rapid growth in the number of installations of the TCP/IP stack.

The stack was developed at the initiative of the US Department of Defense (DoD) more than 20 years ago to connect the experimental ARPAnet network with other satellite networks as a set of common protocols for heterogeneous computing environments. The ARPA network supported developers and researchers in military fields. In the ARPA network, communication between two computers was carried out using the Internet Protocol (IP), which to this day is one of the main ones in the TCP / IP stack and appears in the name of the stack.

Berkeley University made a major contribution to the development of the TCP/IP stack by implementing stack protocols in its version of the UNIX OS. The widespread adoption of the UNIX operating system also led to the widespread adoption of IP and other stack protocols. This stack also powers the Internet, whose Internet Engineering Task Force (IETF) is a major contributor to the development of stack standards published in the form of RFC specifications.

Since the TCP/IP stack was developed before the advent of the ISO/OSI open systems interconnection model, although it also has a multi-level structure, the correspondence of the TCP/IP stack levels to the levels of the OSI model is rather conditional.

The structure of the TCP/IP protocols is shown in Figure 1.4. TCP/IP protocols are divided into 4 levels.

Rice. 1.4. TCP/IP stack

The lowest one ( level IV ) - level of network interfaces - corresponds to the physical and data link levels of the OSI model. This level in the TCP/IP protocols is not regulated, but supports all popular standards of the physical and data link layer: for local channels these are Ethernet, Token Ring, FDDI, for global channels - their own protocols for operating on analog dial-up and leased lines SLIP/PPP, which establish point-to-point connections via WAN serial links, and WAN protocols X.25 and ISDN. A special specification has also been developed that defines the use of ATM technology as a data link layer transport.

Next level ( level III ) is the internetworking layer that deals with the transmission of datagrams using various local networks, X.25 area networks, ad hoc lines, etc. The stack uses the protocol IP, which was originally designed as a protocol for transmitting packets in composite networks consisting of a large number of local networks connected by both local and global connections. Therefore, the IP protocol works well in networks with complex topologies, rationally using the presence of subsystems in them and economically using the bandwidth of low-speed communication lines. The IP protocol is a datagram protocol.

The level of internetworking also includes all protocols related to the compilation and modification of routing tables, such as protocols for collecting routing information R.I.P.(Routing Internet Protocol) and OSPF(Open Shortest Path First), as well as the Internet Control Message Protocol ICMP(Internet Control Message Protocol). The latter protocol is designed to exchange information about errors between the router and the gateway, the source system and the destination system, that is, to organize feedback. Using special ICMP packets, it is reported that it is impossible to deliver a packet, that the lifetime or duration of assembling a packet from fragments has been exceeded, anomalous parameter values, a change in the forwarding route and type of service, the state of the system, etc.

Next level ( level II) is called basic. The transmission control protocol operates at this level TCP(Transmission Control Protocol) and User Datagram Protocol UDP(User Datagram Protocol). The TCP protocol provides a stable virtual connection between remote application processes. The UDP protocol ensures the transmission of application packets using the datagram method, that is, without establishing a virtual connection, and therefore requires less overhead than TCP.

Top level ( level I) is called applied. Over many years of use in the networks of various countries and organizations, the TCP/IP stack has accumulated a large number of protocols and application level services. These include such widely used protocols as the FTP file copy protocol, the telnet terminal emulation protocol, the SMTP mail protocol used in Internet e-mail and its Russian branch RELCOM, hypertext services for accessing remote information, such as WWW and many others. Let's take a closer look at some of them that are most closely related to the topics of this course.

Protocol SNMP(Simple Network Management Protocol) is used to organize network management. The management problem is divided here into two problems. The first task is related to the transfer of information. Control information transfer protocols determine the procedure for interaction between the server and the client program running on the administrator’s host. They define the message formats that are exchanged between clients and servers, as well as the formats for names and addresses. The second challenge is related to controlled data. The standards regulate what data should be stored and accumulated in gateways, the names of this data, and the syntax of these names. The SNMP standard defines a specification for a network management information database. This specification, known as the Management Information Base (MIB), defines the data elements that a host or gateway must store and the permissible operations on them.

File Transfer Protocol FTP(File Transfer Protocol) implements remote file access. In order to ensure reliable transfer, FTP uses the connection-oriented protocol - TCP - as its transport. In addition to file transfer protocol, FTP offers other services. This gives the user the opportunity to interact interactively with a remote machine, for example, he can print the contents of its directories; FTP allows the user to specify the type and format of the data to be stored. Finally, FTP authenticates users. Before accessing the file, protocol requires users to provide their username and password.

In the TCP/IP stack, FTP offers the most comprehensive set of file services, but is also the most complex to program. Applications that do not require all the capabilities of FTP can use another, more cost-effective protocol - the Simple File Transfer Protocol TFTP(Trivial File Transfer Protocol). This protocol only implements file transfer, and the transport used is a simpler than TCP, connectionless protocol - UDP.

Protocol telnet provides the transfer of a stream of bytes between processes, as well as between a process and a terminal. Most often, this protocol is used to emulate a remote computer terminal.

IPX/SPX stack

This stack is the original Novell protocol stack, which it developed for its NetWare network operating system back in the early 80s. The Internetwork Packet Exchange (IPX) and Sequenced Packet Exchange (SPX) protocols, which give the stack its name, are direct adaptations of Xerox's XNS protocols, which are much less common than IPX/SPX. In terms of installations, IPX/SPX protocols are the leaders, and this is due to the fact that the NetWare OS itself occupies a leading position with a share of installations worldwide of approximately 65%.

The Novell protocol family and their correspondence to the ISO/OSI model are presented in Figure 1.5.

Rice. 1.5. IPX/SPX stack

On physical and data link levels Novell networks use all popular protocols of these levels (Ethernet, Token Ring, FDDI and others).

On network level the protocol works in the Novell stack IPX, as well as routing information exchange protocols R.I.P. And NLSP(analogous to the OSPF protocol of the TCP/IP stack). IPX is a protocol that deals with addressing and routing packets on Novell networks. IPX routing decisions are based on the address fields in its packet header as well as information from routing information exchange protocols. For example, IPX uses information provided by either RIP or NLSP (NetWare Link State Protocol) to forward packets to the destination computer or the next router. The IPX protocol supports only the datagram method of message exchange, due to which it economically consumes computing resources. So, the IPX protocol provides three functions: setting an address, establishing a route, and sending datagrams.

The transport layer of the OSI model in the Novell stack corresponds to the SPX protocol, which carries out connection-oriented message transfer.

On the top application, presentation and session levels NCP and SAP protocols work. Protocol NCP(NetWare Core Protocol) is a protocol for interaction between the NetWare server and the workstation shell. This application layer protocol implements the client-server architecture at the upper layers of the OSI model. Using the functions of this protocol, the workstation connects to the server, maps the server directories to local drive letters, scans the server file system, copies remote files, changes their attributes, etc., and also shares a network printer between workstations.

(Service Advertising Protocol) - the service advertisement protocol is conceptually similar to the RIP protocol. Just as RIP allows routers to exchange routing information, SAP allows network devices to exchange information about available network services.

Servers and routers use SAP to advertise their services and network addresses. The SAP protocol allows network devices to constantly update information about what services are currently available on the network. At startup, servers use SAP to notify the rest of the network about their services. When a server shuts down, it uses SAP to notify the network that its services have ceased.

On Novell networks, NetWare 3.x servers send out SAP broadcast packets every minute. SAP packets significantly clog the network, so one of the main tasks of routers that access global communications is to filter traffic from SAP packets and RIP packets.

The features of the IPX/SPX stack are due to the features of the NetWare OS, namely the orientation of its early versions (up to 4.0) for working in small local networks consisting of personal computers with modest resources. Therefore, Novell needed protocols that required a minimum amount of RAM (limited in IBM-compatible computers running MS-DOS to 640 KB) and that would run quickly on low-power processors. As a result, the IPX/SPX stack protocols until recently worked well in local networks and not so well in large corporate networks, since they overloaded slow global links with broadcast packets that are intensively used by several protocols in this stack (for example, to establish communications between clients and servers).

This circumstance, as well as the fact that the IPX/SPX stack is the property of Novell and requires a license to implement it, has for a long time limited its distribution only to NetWare networks. However, by the time NetWare 4.0 was released, Novell had made and continues to make major changes to its protocols aimed at adapting them to work in corporate networks. Now the IPX/SPX stack is implemented not only in NetWare, but also in several other popular network operating systems - SCO UNIX, Sun Solaris, Microsoft Windows NT.

NetBIOS/SMB stack

Microsoft and IBM worked together on networking tools for personal computers, so the NetBIOS/SMB protocol stack is their joint brainchild. NetBIOS tools appeared in 1984 as a network extension of the standard functions of the basic input/output system (BIOS) of the IBM PC for the PC Network network program from IBM, which at the application level (Fig. 1.6) used the SMB (Server Message Block) protocol to implement network services. .

Rice. 1.6. NetBIOS/SMB stack

Protocol NetBIOS works at three levels of the open systems interaction model: network, transport and session. NetBIOS can provide a higher level of service than the IPX and SPX protocols, but does not have routing capabilities. Thus, NetBIOS is not a network protocol in the strict sense of the word. NetBIOS contains many useful networking functions that can be attributed to the network, transport and session layers, but it cannot be used to route packets, since the NetBIOS frame exchange protocol does not introduce such a concept as a network. This limits the use of the NetBIOS protocol to local networks that are not subnetted. NetBIOS supports both datagram and connection-based communications.

Protocol SMB, corresponding to the application and representative levels of the OSI model, regulates the interaction of the workstation with the server. SMB functions include the following operations:

  • Session management. Creation and breaking of a logical channel between the workstation and the network resources of the file server.
  • File access. A workstation can contact the file server with requests to create and delete directories, create, open and close files, read and write to files, rename and delete files, search for files, get and set file attributes, and lock records.
  • Printing service. The workstation can queue files for printing on the server and obtain information about the print queue.
  • Messaging service. SMB supports simple messaging with the following functions: send a simple message; send a broadcast message; send start of message block; send message block text; send end of message block; forward username; cancel the shipment; get the machine name.

Because of the large number of applications that use the API functions provided by NetBIOS, many network operating systems implement these functions as an interface to their transport protocols. NetWare has a program that emulates NetBIOS functions based on the IPX protocol, and there are software emulators for NetBIOS for Windows NT and the TCP/IP stack.

Why do we need this valuable knowledge? (editorial)

A colleague once asked me a tricky question. Well, he says, you know what the OSI model is... And why do you need it, what is the practical benefit of this knowledge: unless you show off in front of dummies? It’s not true, the benefits of this knowledge are a systematic approach to solving many practical problems. For example:

  • troubleshooting (
troubleshooting)

A user (just a friend) comes to you as an admin (an experienced networker) and says - it “doesn’t connect” to me here. There is no network, he says, and that’s it. You start to figure it out. So, based on my experience of observing my neighbors, I noticed that the actions of a person “not aware of the OSI model in his heart” are characterized by characteristic chaotic behavior: either he tugs at a wire, or suddenly he tinkers with something in the browser. And this often leads to the fact that, moving without direction, such a “specialist” will tug on anything and anywhere except in the area of ​​the problem, wasting a lot of his own and other people’s time. When realizing the existence of levels of interaction, the movement will be more consistent. And although the starting point may be different (in each book I came across, the recommendations were slightly different), the general logical premise of troubleshooting is this - if at level X the interaction is carried out correctly, then at level X-1 most likely everything is in order too. At least for each specific moment time. When troubleshooting in IP networks, I personally start “digging” from the second level of the DOD stack, aka the third OSI layer, aka Internet Protocol. Firstly, because it is easiest to carry out a “superficial examination of the patient” (the patient is more likely to ping than not), and secondly, if, thank God, it pings, you can skip the unpleasant manipulations of testing cables, network cards and disassemblies, etc. pleasant things;) Although in especially difficult cases you will have to start from level one, and in the most serious way.

  • mutual understanding with colleagues

To illustrate this point, I will give you an example from life. One day, my friends from a small company invited me to visit me to help figure out why the network was not working well, and to give some recommendations on this matter. I come to the office. And it turns out that they even have an administrator there, called according to the good old tradition “programmer” (and in fact, he mainly deals with FoxPro;) - an old pre-perestroika IT specialist. Well, I ask him, what kind of network do you have? He: “What do you mean? Well, just a network.” The network, in general, is like a network. Well, I have some guiding questions: what protocol is used at the network level? He: “WHERE is this?” I clarify: “Well, IP or IPX or whatever you have...” “Oh,” he says, “it seems yes: IPX/something else!” By the way, “there-is-something else,” as you may have noticed, is located a little higher from the network level, but that’s not the point... What’s typical is that he built this network and even poorly maintained it. It’s not surprising that it withered away... ;) If I had known about OSI, I would have scribbled out a diagram in 5 minutes - from 10Base-2 to application programs. And you wouldn’t have to crawl under the table to inspect the coaxial wires.

  • learning new technologies

I have already dwelled on this important aspect in the preface and I will repeat it again: when studying a new protocol, you should first of all understand a) in which protocol stack(s) it belongs and b) in which part of the stack and with whom it interacts from below and who with him on top... :) And this will give you complete clarity in your head. And there are different message formats and APIs - well, that’s a matter of technology :)

I'll start by defining how it is accepted. The OSI model is a theoretical ideal model for transmitting data over a network. This means that in practice you will never find an exact match to this model; it is a standard that network software developers and network equipment manufacturers adhere to in order to maintain compatibility between their products. You can compare this with people’s ideas about an ideal person - you won’t find it anywhere, but everyone knows what to strive for.


I would like to immediately point out one nuance - I will call what is transmitted over the network within the OSI model data, which is not entirely correct, but in order not to confuse the novice reader with the terms, I made a compromise with my conscience.


Below is the best known and most understood diagram of the OSI model. There will be more pictures in the article, but I propose to consider the first one as the main one:



The table consists of two columns, at the initial stage we are only interested in the right one. We will read the table from bottom to top (how else :)). In fact, this is not my whim, but I do it for the convenience of assimilation of information - from simple to complex. Go!


The right side of the above table shows, from bottom to top, the path of data transmitted over the network (for example, from your home router to your computer). Clarification - OSI levels from bottom to top, then this will be the data path on the receiving side, if from top to bottom, then vice versa - on the sending side. I hope it's clear for now. To completely dispel doubts, here is another diagram for clarity:



To trace the path of data and the changes that occur with it across levels, it is enough to imagine how it moves along the blue line in the diagram, first moving from top to bottom through the OSI levels from the first computer, then from bottom to top to the second. Now let's look at each of the levels in more detail.


1) Physical(physical) - this includes the so-called “data transmission medium”, i.e. wires, optical cable, radio wave (in case of wireless connections) and the like. For example, if your computer is connected to the Internet via cable, then the quality of data transmission at the first, physical level is determined by the wires, contacts at the end of the wire, contacts of the network card connector of your computer, as well as internal electrical circuits on the computer boards. Network engineers have the concept of a “physics problem” - this means that the specialist has identified a physical layer device as the culprit for the “non-transmission” of data, for example, a network cable is broken somewhere, or a low signal level.


2) Channel(datalink) - this is much more interesting. To understand the link layer, we will first have to understand the concept of the MAC address, since it will be the main character in this chapter :). The MAC address is also called the “physical address” or “hardware address”. It is a set of 12 characters in hexadecimal number system divided by 6 octets dash or colon, for example 08:00:27:b4:88:c1. It is needed to uniquely identify a network device on the network. In theory, a MAC address is globally unique, i.e. Such an address cannot exist anywhere in the world and it is “sewn into” the network device at the production stage. However, there are simple ways to change it to an arbitrary one, and besides, some unscrupulous and little-known manufacturers do not hesitate to rivet, for example, a batch of 5000 network cards with exactly the same MAC. Accordingly, if at least two such “acrobat brothers” appear on the same local network, conflicts and problems will begin.


So, at the data link level, the data is processed by a network device, which is interested in only one thing - our notorious MAC address, i.e. he is interested in the delivery addressee. Link-level devices include, for example, switches (also known as switches) - they store in their memory the MAC addresses of network devices with which they have a direct, direct connection and, when receiving data on their receiving port, check the MAC addresses in the data with the MAC -addresses available in memory. If there are matches, then the data is transmitted to the recipient, the rest are simply ignored.


3) Network(network) is a “sacred” level, understanding the operating principle of which for the most part makes a network engineer such. Here the “IP address” already rules with an iron hand, here it is the basis of the foundations. Thanks to the presence of an IP address, it becomes possible to transfer data between computers that are not part of the same local network. The transfer of data between different local networks is called routing, and devices that allow this to be done are called routers (they are also routers, although in recent years the concept of a router has been greatly distorted).


So, an IP address - without going into details, it is a certain set of 12 digits in the decimal ("regular") number system, divided into 4 octets, separated by a dot, which is assigned to a network device when connecting to the network. Here we need to go a little deeper: for example, many people know the address from the series 192.168.1.23. It is quite obvious that there are no 12 digits here. However, if you write the address in full format, everything falls into place - 192.168.001.023. We won’t dig even deeper at this stage, since IP addressing is a separate topic for telling and showing.


4) Transport layer(transport) - as the name suggests, it is needed specifically for delivering and sending data to the recipient. Drawing an analogy with our long-suffering mail, the IP address is the actual delivery or receipt address, and the transport protocol is the postman who can read and knows how to deliver the letter. Protocols are different, for different purposes, but they have the same meaning - delivery.


The transport layer is the last one, which by and large interests network engineers and system administrators. If all 4 lower levels worked as they should, but the data did not reach its destination, then the problem must be looked for in the software of a particular computer. The protocols of the so-called upper levels are of great concern to programmers and sometimes to system administrators (if he is involved in maintaining servers, for example). Therefore, further I will briefly describe the purpose of these levels. In addition, if you look at the situation objectively, most often in practice the functions of several upper layers of the OSI model are taken over by one application or service, and it is impossible to say unambiguously where it should be assigned.


5) Session(session) - controls the opening and closing of a data transfer session, checks access rights, controls the synchronization of the beginning and end of the transfer. For example, if you download a file from the Internet, then your browser (or whatever you are downloading through) sends a request to the server on which the file is located. At this point, session protocols are turned on, which ensure successful downloading of the file, after which, in theory, they are automatically turned off, although there are options.


6) Executive(presentation) - prepares data for processing by the final application. For example, if this is a text file, then you need to check the encoding (so that it doesn’t turn out to be “kryakozyabr”), perhaps unpack it from the archive.... but here what I wrote about earlier is clearly visible - it’s very difficult to separate where the representative ends level, and where the next one begins:


7) Applied(Application) - as the name implies, the level of applications that use the received data and we see the result of the work of all levels of the OSI model. For example, you are reading this text because you opened it in the correct encoding, in the right font, etc. your browser.


And now that we have at least a general understanding of the technology of the process, I consider it necessary to talk about bits, frames, packets, blocks and data. If you remember, at the beginning of the article I asked you not to pay attention to the left column in the main table. So, her time has come! Now we will go through all the layers of the OSI model again and see how simple bits (zeros and ones) turn into data. We will also go from bottom to top, so as not to disrupt the sequence of assimilation of the material.


On physical level we have a signal. It can be electrical, optical, radio wave, etc. So far these are not even bits, but the network device analyzes the received signal and converts it into zeros. This process is called "hardware conversion". Further, already inside the network device, the bits are combined into (eight bits in one byte), processed and transmitted to the data link layer.


On duct level we have the so-called frame. Roughly speaking, this is a pack of bytes, from 64 to 1518 in one pack, from which the switch reads a header that contains the recipient and sender MAC addresses, as well as technical information. Seeing the MAC address match in the header and in your switching table(memory), the switch transmits frames with such matches to the destination device


On network level, to all this goodness, the IP addresses of the recipient and the sender are also added, which are extracted from the same header and this is called plastic bag.


On transport level, the packet is addressed to the corresponding protocol, the code of which is indicated in the header service information, and is given for servicing to protocols of the upper levels, for which this is already full-fledged data, i.e. information in a form that is digestible and usable by applications.


This will be seen more clearly in the diagram below:


This material is dedicated to the reference seven-layer OSI network model. Here you will find the answer to the question why system administrators need to understand this network model, all 7 levels of the model will be considered, and you will also learn the basics of the TCP/IP model, which was built on the basis of the OSI reference model.

When I began to get involved in various IT technologies and began to work in this field, I, of course, did not know about any model, I didn’t even think about it, but a more experienced specialist advised me to study, or rather, simply understand this model, adding that “ if you understand all the principles of interaction, it will be much easier to manage, configure the network and solve all sorts of network and other problems" I, of course, listened to him and began to dig through books, the Internet and other sources of information, while at the same time checking on the existing network whether this was all true in reality.

In the modern world, the development of network infrastructure has reached such a high level that without building even a small network, an enterprise ( incl. and small) will not be able to simply exist normally, so system administrators are becoming increasingly in demand. And for high-quality construction and configuration of any network, the system administrator must understand the principles of the OSI reference model, just so that you learn to understand the interaction of network applications, and indeed the principles of network data transmission, I will try to present this material in an accessible way even for novice administrators.

OSI network model (open systems interconnection basic reference model) is an abstract model of how computers, applications, and other devices interact on a network. In short, the essence of this model is that the ISO organization ( International Organization for Standardization) developed a standard for network operation so that everyone could rely on it, and there was compatibility of all networks and interaction between them. One of the most popular network communication protocols, which is used all over the world, is TCP/IP, which is built on the basis of a reference model.

Well, let's move directly to the levels of this model themselves, and first, get acquainted with the general picture of this model in the context of its levels.

Now let's talk in more detail about each level, it is customary to describe the levels of the reference model from top to bottom, it is along this path that interaction occurs, on one computer from top to bottom, and on the computer where data is received from bottom to top, i.e. the data passes through each level sequentially.

Description of the levels of the network model

Application layer (7) (application layer) is the starting and at the same time ending point of the data that you want to transmit over the network. This layer is responsible for the interaction of applications over the network, i.e. Applications communicate at this layer. This is the highest level and you need to remember this when solving problems that arise.

HTTP, POP3, SMTP, FTP, TELNET and others. In other words, application 1 sends a request to application 2 using these protocols, and in order to find out that application 1 sent the request to application 2, there must be a connection between them, and it is the protocol that is responsible for this connection.

Presentation layer (6)– this layer is responsible for encoding the data so that it can later be transmitted over the network and accordingly converts it back so that the application understands this data. After this level, the data for other levels becomes the same, i.e. it doesn't matter what kind of data it is, whether it's a word document or an email message.

The following protocols operate at this level: RDP, LPP, NDR and others.

Session level (5)– is responsible for maintaining the session between data transfers, i.e. The duration of the session differs depending on the data being transferred, so it must be maintained or terminated.

The following protocols operate at this level: ASP, L2TP, PPTP and others.

Transport layer (4)– is responsible for the reliability of data transmission. It also breaks the data into segments and puts them back together as the data comes in different sizes. There are two well-known protocols at this level: TCP and UDP. The TCP protocol guarantees that the data will be delivered in full, but the UDP protocol does not guarantee this, which is why they are used for different purposes.

Network layer (3)– it is designed to determine the path that data should take. Routers operate at this level. He is also responsible for: translating logical addresses and names into physical ones, determining a short route, switching and routing, monitoring network problems. It is at this level that it works IP protocol and routing protocols, e.g. RIP, OSPF.

Link layer (2)– it provides interaction at the physical level; at this level, MAC addresses network devices, errors are also monitored and corrected here, i.e. sends a re-request for the damaged frame.

Physical layer (1)– this is the direct conversion of all frames into electrical impulses and vice versa. In other words, physical data transfer. They work at this level hubs.

This is what the entire data transfer process looks like from the point of view of this model. It is a reference and standardized and therefore other network technologies and models, in particular the TCP/IP model, are based on it.

TCP IP model

TCP/IP model is slightly different from the OSI model; to be more specific, this model combines some levels of the OSI model and there are only 4 of them:

  • Applied;
  • Transport;
  • Network;
  • Duct.

The picture shows the difference between the two models, and also once again shows at what levels the well-known protocols operate.

We can talk about the OSI network model and specifically about the interaction of computers on a network for a long time and it will not fit in one article, and it will be a little unclear, so here I tried to present the basis of this model and a description of all levels. The main thing is to understand that all this is really true and the file that you sent over the network passes simply “ huge“path before reaching the end user, but this happens so quickly that you don’t notice it, largely thanks to developed network technologies.

I hope all this will help you understand the interaction of networks.