• At what level of the osi model does it work? The OSI model is simple! Network-dependent and network-independent levels of the seven-level osi model

    In this article, we will understand what the OSI network model is, what layers it consists of, and what functions it performs. So, the subject of conversation is a certain model of interaction between standards that determine the sequence of data exchange and programs.

    The abbreviation OSI Open Systems Interconnection stands for the open systems interconnection model. To solve the problem of compatibility of various systems, the standardization organization released the OSI model standard in 1983. It describes the structure of open systems, their requirements, and their interactions.

    An open system is a system compiled according to open specifications that are accessible to everyone and also comply with certain standards. For example, Windows OS is considered an open system because it is created on the basis of open specifications that describe the Internet, but the initial codes of the system are closed.

    The advantage is that it is possible to build a network of devices from different manufacturers and, if necessary, replace its individual components. You can easily combine several networks into one whole.

    According to the model we are considering, it is necessary that computer networks consist of seven levels. Because the model does not describe protocols defined by individual standards, it is not a network architecture.

    Unfortunately, from a practical point of view, the open systems interaction model is not applied. Its peculiarity lies in mastering theoretical issues of network interaction. That is why this model is used as a simple language to describe the construction of different types of networks.

    Model levelsOSI

    The basic structure is a system consisting of 7 levels. The question arises: what are the seven stages responsible for and why does the model need so many levels? All of them are responsible for a certain stage of the process of sending a network message, and also contain a certain semantic load. The steps are performed separately from each other and do not require increased control on the part of the user. Isn't it convenient?

    The lower stages of the system, from the first to the third, manage the physical delivery of data over the network; they are called media layers.

    The remaining layers help ensure accurate delivery of data between computers on the network; they are called host machines.

    Application is the closest level to the user. Its difference from others is that it does not provide services to other levels. Provides services to application processes that lie outside the scope of the model, for example, database transfer, voice, and more.

    This stage is relatively simpler than others, because apart from ones and zeros there are no other measurement systems in it, this level does not analyze information and that is why it is the lowest of the levels. It mainly transmits information. The main load parameter is bit.

    The main purpose of the physical layer is to represent zero and one as signals transmitted over a data transmission medium.

    For example, there is a certain communication channel (CC), a message being sent, a sender and, accordingly, a recipient. The KS has its own characteristics:

    • Bandwidth, measured in bits/s, that is, how much data we can transmit per unit of time.
    • Latency is how long it takes for a message to travel from the sender to the recipient.
    • Number of errors, if errors occur frequently, then protocols must provide error correction. And if they are rare, then they can be corrected at higher levels, for example at transport.

    The information transmission channel is used:

    • Cables: telephone, coaxial, twisted pair, optical.
    • Wireless technologies such as radio waves, infrared radiation.
    • Satellite CS
    • Wireless optics or lasers are rarely used due to low speed and a lot of interference.

    It is very rare for errors to occur in optical cables, since it is difficult to influence the propagation of light. In copper cables, errors occur, but quite rarely, and in a wireless environment, errors occur very often.

    The next station the information will visit will resemble customs. Namely, the IP address will be compared for compatibility with the transmission medium. This is also where system shortcomings are identified and corrected. For the convenience of further operations, the bits are grouped into frames.

    The purpose of the link layer is the transmission of messages via CS - frames.

    Tasksdata link

    • Find where in a bit stream a message begins and ends
    • Detect and correct errors when sending information
    • Addressing, you need to know which computer to send information to, because basically several computers are connected to a shared medium
    • Provide consistent access to the shared environment so that one computer transmits information at the same time.

    At the link level, errors are identified and corrected. If one is detected, the correctness of data delivery is checked; if incorrect, the frame is discarded.

    Correcting errors requires the use of special codes that add redundant information to the transmitted data.

    Resending data is used in conjunction with the error detection method. If an error is detected in the frame, it is discarded and the sender resends the frame.

    Detect and correct errors

    Practice has shown the effectiveness of the following methods; if a reliable medium for data transmission (wired) is used and errors occur rarely, then it is better to correct them at the top level. If errors occur frequently in the CS, then the errors must be corrected immediately at the link level.

    The functions of this stage in the computer are performed by network adapters and drivers suitable for them. Through them, direct data exchange occurs.

    Some of the protocols used at the data link layer are HDLC using bus topology and others.

    (NETWORK)

    The stage resembles the process of information distribution. For example, all users are divided into groups, and data packets are distributed in accordance with IP addresses, consisting of 32 bits. It is thanks to the work of routers at this instance that all differences between networks are eliminated. This is a process called logical routing.

    The main task is to create composite networks built on the basis of network technologies of different channel levels: Ethernet, MPLS. The network layer is the “backbone” of the Internet.

    Purpose of the network layer

    We can transfer information from one computer to another via Ethernet and Wi-Fi, then why need another layer? Link layer (CL) technology has two problems, firstly, CL technologies differ from each other, and secondly, there is a scaling limitation.

    What differences might there be in link layer technologies?

    Different levels of service provided, some levels guarantee delivery and the required order of messages. Wi-Fi simply guarantees delivery of the message, but it doesn't.

    Different addressing, by size, hierarchy. Network technologies can support broadcasting, i.e. It is possible to send information to all computers on the network.

    The maximum frame size (MTU) may differ, for example, in Internet it is 1500, and in Wi-Fi it is 2300. How can such differences be reconciled at the network level?

    You can provide different types of services, for example, frames from Wi-Fi are received with confirmation sent, and frames are sent to Ethernet without confirmation.

    In order to reconcile the addressing difference, at the network level, global addresses are introduced that do not depend on the addresses of specific technologies (ARP for) the link layer.

    To transmit data across multiple networks that have different frame sizes, fragmentation is used. Let's consider an example: the first computer transmits data to the second through 4 intermediate networks connected by 3 routers. Each network has a different MTU.

    The computer generated the first frame and transmitted it to the router, the router analyzed the size of the frame and realized that it could not be transmitted completely through network 2, because its mtu2 was too small.

    The router splits the data into 3 parts and transmits them separately.

    The next router combines the data into one large packet, determines its size and compares it with the mtu of network 3. And it sees that one MTU3 packet cannot be transmitted entirely (MTU3 is larger than MTU2, but smaller than MTU1) and the router splits the packet into 2 parts and sends it to the next router.

    The last router combines the packet and sends it to the recipient in its entirety. Fragmentation deals with combining networks and this is hidden from the sender and recipient.

    How is the scalability problem solved at the network level?

    Work is carried out not with individual addresses, as at the link level, but with blocks of addresses. Packets for which the path is unknown are discarded rather than forwarded back to all ports. And a significant difference from the channel one is the possibility of several connections between network level devices and all these connections will be active.

    Network layer tasks:

    • Combine networks built by different technologies;
    • Provide quality service;
    • Routing, finding a path from the sender of information to the recipient, through intermediate network nodes.

    Routing

    Finding the path to send a packet between networks through transit nodes - routers. Let's look at an example of performing routing. The circuit consists of 5 routers and two computers. How can data be transferred from one computer to another?

    Next time the data may be sent in a different way.

    If one of the routers breaks down, nothing bad will happen; you can find a way around the broken router.

    Protocols used at this stage: Internet Protocol IP; IPX, necessary for routing packets in networks, etc.

    (TRANSPORT)

    There is the following task: a packet arrives at a computer that is connected to a composite network; there are many network applications running on the computer (web browser, Skype, mail), we need to understand which application needs to transfer this packet. The transport layer handles the interaction between network applications.

    Transport layer tasks

    Sending data between processes on different hosts. Ensuring addressing, you need to know for which process this or that packet is intended. Ensuring the reliability of information transfer.

    Interaction modelopen system

    Hosts are devices where useful user programs and network equipment, such as switches and routers, operate.

    A feature of the transport layer is the direct interaction of one computer with the transport layer on another computer; at other levels, interaction occurs along the links of the chain.

    This layer provides an end-to-end connection between two communicating hosts. This level is independent of the network; it allows you to hide the details of network interaction from application developers.

    For addressing at the transport level, ports are used, these are numbers from 1 to 65,535. Ports are written like this: 192.168.1.3:80 (IP address and port).

    Features of the transport layer

    Providing higher reliability, unlike the network that is used for data transmission. Reliable communication channels are used, errors in these networks rarely occur, therefore, it is possible to build a reliable network that will be cheap, and errors can be corrected programmatically on the hosts.

    The transport layer guarantees the delivery of data; it uses confirmation from the recipient; if confirmation does not arrive, the transport layer again sends confirmation of the data. Message follow-up guarantee.

    Session layer (SESSION)

    Session (session) is a set of network interactions aimed at solving a single task.

    Now network interaction has become more complex and does not consist of simple questions and answers, as it was before. For example, you load a web page to display in the browser, you first need to download the text of the web page (.html), a style file (.css) that describes the design elements of the web page, and loading images. Thus, in order to complete the task of loading a web page, it is necessary to implement several separate network operations.

    Session determines what kind of information transfer will take place between 2 application processes: half-duplex (sequential transmission and reception of data); or duplex (simultaneous transmission and reception of information).

    Data presentation layer(PRESENTATION)

    Functions – present data transferred between application processes in the required form.

    To describe this level, automatic online translation from various languages ​​is used. For example, you dial a phone number, speak Russian, the network automatically translates into French, transmits the information to Spain, where a person picks up the phone and hears your question in Spanish. This task has not yet been implemented.

    To protect data sent over the network, encryption is used: secure sockets layer, as well as transport layer security, these technologies allow you to encrypt data sent over the network.

    Application layer protocols use TSL/SSL and can be identified by the letter s at the end. For example, https, ftps and others. If you see in your browser that the https protocol and a lock are used, this means that data is being protected over the network using encryption.

    (APPLICATION)

    Necessary for network applications to interact with each other, such as web, e-mail, skype, etc.

    In essence, it is a set of specifications that allow the user to enter pages to find the information he needs. Simply put, application's job is to provide access to network services. The contents of this level are very varied.

    Functionsapplication:

    • Solving problems, sending files; job and system management;
    • Identification of users by their login, e-mail address, passwords, electronic signatures;
    • Requests for connection with other application processes;

    Video about all levels of the modelOSI

    Conclusion

    Analyzing problems using OSI network models can help you quickly find and fix problems. It is not for nothing that work on the project of a program that can identify shortcomings while having a complex step-by-step device has been going on for quite a long time. This model is truly a benchmark. After all, at the same time, work was underway to create other protocols. For example, . Today, they are used quite often.

    ), IPX, IGMP, ICMP, ARP.

    You need to understand why there was a need to build a network layer, why networks built using data link and physical layer tools could not meet user requirements.

    It is possible to create a complex, structured network with the integration of various basic network technologies using the link layer: for this, certain types of bridges and switches can be used. Naturally, in general, traffic in such a network develops randomly, but on the other hand, it is also characterized by certain patterns. Typically, in such a network, some users working on a common task (for example, employees of one department) most often make requests either to each other or to a common server, and only sometimes do they need access to the computer resources of another department. Therefore, depending on the network traffic, computers on the network are divided into groups called network segments. Computers are combined into a group if most of their messages are intended (addressed) to computers in the same group. The network can be divided into segments by bridges and switches. They screen local traffic within a segment, not transmitting any frames outside of it, except those addressed to computers located in other segments. Thus, one network is divided into separate subnets. From these subnetworks, composite networks of sufficiently large sizes can be built in the future.

    The idea of ​​subnetting is the basis for building composite networks.

    The network is called composite(internetwork or internet), if it can be represented as a collection of several networks. The networks that make up a composite network are called subnets, constituent networks, or simply networks, each of which can operate on its own link-layer technology (although this is not required).

    But, bringing this idea to life with the help of repeaters, bridges, and switches has very significant limitations and disadvantages.

      In a network topology built using repeaters, bridges or switches, there should be no loops. Indeed, a bridge or switch can solve the problem of delivering a packet to the recipient only when there is a single path between the sender and the recipient. Although at the same time, the presence of redundant connections, which form loops, is often necessary for better load balancing, as well as to increase network reliability through the formation of backup paths.

      Logical network segments located between bridges or switches are poorly isolated from each other. They are not immune to broadcast storms. If any station sends a broadcast message, then this message is transmitted to all stations on all logical segments of the network. The administrator must manually limit the number of broadcast packets that a given node is allowed to generate per unit of time. In principle, in some way it was possible to eliminate the problem of broadcast storms using the virtual network mechanism (Configuring VLAN Debian D-Link), implemented in many switches. But in this case, although it is possible to create groups of stations isolated by traffic quite flexibly, they are completely isolated, that is, nodes of one virtual network cannot interact with nodes of another virtual network.

      In networks built on bridges and switches, it is quite difficult to solve the problem of traffic control based on the value of the data contained in the packet. In such networks, this is only possible using custom filters, which require the administrator to deal with the binary representation of the packet contents.

      The implementation of the transport subsystem only by means of the physical and data link layers, which include bridges and switches, leads to an insufficiently flexible, single-level addressing system: the MAC address is used as the address of the recipient station - an address that is rigidly associated with the network adapter.

    All of the above disadvantages of bridges and switches are related only to the fact that they operate using link-level protocols. The thing is that these protocols do not explicitly define the concept of part of a network (or subnetwork, or segment), which could be used when structuring a large network. Therefore, network technology developers decided to entrust the task of building a composite network to a new level - the network level.

    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. Let's 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 :). A MAC address is also called a “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 it is clearly visible what I wrote about earlier - it is very difficult to separate where the representative 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.


    At the 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.


    At the link layer we have what is 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 At the 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 a packet.


    At the 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 upper-level protocols, 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:


    In practice, when implementing networks, they tend to use standard protocols, which can be proprietary, national or international standards.

    Between 1977 and 1984, professionals developed a network architecture model called the Reference Model of Open Systems Interconnection (OSI). The OSI model defines different layers of system interaction, 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.

    The term "recommended model for open systems interconnection" is often found in the literature under the name "ISO model". / OSI", noting ISO's contribution to its formation. For some professional network programmers, this model represents the ideal network architecture.

    The ISO/OSI model uses layering to organize an overall view of the network structure into clearly defined, interconnected modules. In a network divided into layers, each layer serves to perform a specific function or service of the network in relation to surrounding neighboring layers. Each level, as it were, protects the neighboring one from excess information that can leak from a lower level to the top. A well-designed level should hide all the features of its functioning from the one above it. Based on these provisions, it is possible to create a network consisting of functional modules with a clearly described interface.

    In the ISO/OSI model (Fig. 22), communication means are divided into seven layers: application, presentation (presentation layer), session, transport, network, link (connection layer) and physical. Each layer deals with one specific aspect of network device interaction. The model describes system interaction tools implemented by the operating system, system utilities, and system hardware. The model does not include specifications for end-user application interactions. Applications implement their own communication protocols by accessing system tools. Therefore, it is necessary to distinguish between the application interaction layer and the application layer.

    Figure 22 shows a simple network based on the ISO/OSI model. The network consists of two computers, which in turn are made up of layers. The arrows connecting the levels show the path of data in the network. For each layer there is a corresponding protocol (transport protocol, network protocol).


    Each level uses different units for measuring the amount of data. Application layers (application layer), presentation, session, transport - use the term « message » as a unit of measurement. The network layer treats data as « packages » , and the connection level is like « frame » . The physical layer deals with bits - a sequence of zeros and ones

    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. Title contains service information that must be transmitted through the network to the application layer of the destination machine in order 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 on it. Data field The message may be empty or contain some data, such as data that needs to be written to a remote file. 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 the message is generated, the application layer forwards it down the stack to the representative layer. The representative layer protocol, based on the information received from the application layer header, performs the required actions and adds service information to the received message - the representative layer header, which contains instructions for the representative layer protocol of the destination machine.



    The resulting message is passed down to the session layer, which in turn adds its header, etc. Figure 23 illustrates the nesting of messages at different levels.

    Some protocol implementations place service information not only at the beginning of the message, but also at the end, in the form of the so-called “ limit switch " Finally, the message reaches the lower, physical level, which actually transmits it over the networks to the recipient machine. At this point, the message is “overgrown” with headers of all levels (Fig. 22). When a message reaches the destination machine, it is received by its physical layer and passed up from layer to layer. Each level also analyzes the header of its level, performing functions corresponding to this level, and then removes this header and passes the message to the higher level.

    Along with the term message, there are other terms used by network specialists to designate units of data in exchange procedures. ISO standards use the common name Protocol Data Unit (PDU) to designate the units of data that protocols at different levels deal with. To designate blocks of data at certain levels, special names are often used: packet, datagram, segment.

    The OSI model distinguishes between two main types of protocols. In the minutes with connection establishment, Before exchanging data, the sender and receiver must first establish a connection and possibly select some protocol parameters that they will use when exchanging data. After completing the dialogue, they must terminate the connection. The telephone is an example of connection-based interaction.

    The second group of protocols is protocols without prior connection establishment. The sender simply transmits the message when it is ready. Dropping a letter into a mailbox is an example of communication without first establishing a connection. When computers interact, both types of protocols are used.

    Let's take a closer look at the functions of each level.

    Physical layer consists of physical elements (hardware) that directly serve to transmit information over network communication channels. Therefore, communication lines - cables connecting computers - belong to the physical layer. It also includes methods of electrical signal conversion. Various network technologies, such as Ethernet, ARCNET, or token ring, belong to the physical layer, as they define the parameters for converting signals for transmission over the network. The physical layer transmits data bit by bit.

    At the physical layer, the type of data transmission is determined: simplex, half-duplex or full-duplex.

    Data link layer or connection layer. The job of the connection layer is to transfer data from the physical layer to the network layer and vice versa. The data link layer converts the data from a sequence of bits into something more understandable to the network layer, often called a "data frame" (a data frame is usually the connection layer-formatted stream of bits coming from the physical layer).

    Instead, the data link layer receives frames from the network layer with the goal of converting them into a bit stream, following the correct format, for the physical layer. The main function of the connection layer is to ensure data integrity, so the frame format includes the information necessary for this.

    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 distinguish it, and also calculates a checksum by processing all bytes frame in a certain way and adding checksum to the frame. When frame arrives over the network, the recipient 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 can not only detect errors, but also correct them by retransmitting damaged frames. It should be noted that the error correction function is not mandatory for the data link layer, so some protocols at this level do not have it, for example, Ethernet and frame relay.

    The data frame also contains information necessary for its correct identification and routing.

    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. A network card in a computer is an example of a connection level implementation.

    In wide area networks, which rarely have a regular topology, the data link layer often provides messaging only between two neighboring computers connected by an individual link.

    Sometimes in global networks, it is difficult to isolate the link layer functions in their pure form, since they are combined with network layer functions in the same protocol. Examples of this approach include ATM and frame relay technology protocols.

    In general, the link layer is a very powerful and complete set of functions for sending messages between network nodes. In some cases, link layer protocols turn out to be self-sufficient transport vehicles and can allow application layer protocols or applications to work directly on top of them, without involving means of the network and transport layers.

    However, to ensure high-quality message transportation in networks of any topology and the technology of the link layer functions is not enough, therefore, in the OSI model, the solution to this problem is assigned to the following two levels - network And transport .

    Network layer this is an intranet primary delivery service and serves to form a unified transport system, connecting several networks , and these networks can use completely different principles for transmitting messages between end nodes and have an arbitrary connection structure. The functions of the network layer are quite diverse. Since the network layer manages network-wide routing information, it has the function counting the amount of data . He also monitors traffic , possible collisions and speeds transmissions via communication channels.

    On network level The term “network” itself is given a specific meaning. 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.

    Within the network, data delivery is ensured by the appropriate link layer, but data delivery between networks is handled by the network layer, which supports the ability to correctly select the message transmission route even when the structure of connections between the component networks has a character different from that adopted in link layer protocols.

    Networks are connected to each other by special devices called routers. Router - This is a device that collects information about the topology of internetwork connections and, based on it, forwards network layer packets to the destination network.

    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 between networks, each time choosing the appropriate route. Thus, a route is a sequence of routers through which a packet passes.

    In Fig. Figure 24 shows four networks connected by three routers. There are two routes between nodes A and B of this network: the first through routers 1 and 3, and the second through routers 1, 2 and 3.


    The problem of choosing the best path is called routing, and solving it is one of the main problems 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, such as transmission reliability.

    In general, the functions of the network layer are broader than the functions of passing messages over links with a non-standard structure. The network layer also addresses the challenges of harmonizing different technologies, simplifying addressing in large networks, and creating reliable and flexible barriers to unwanted traffic between networks.

    Network layer messages are usually called packets. When organizing packet delivery at the network level, the concept of “network number” is used. In this case, the recipient's address consists of a major part - the network number and a minor part - the node number in this network. All nodes on the same network must have the same high part of the address, so the term “network” at the network level can be given another, more formal definition: a network is a collection of nodes whose network address contains the same network number.

    At the network layer, two types of protocols are defined. The first type is network protocols. - implement the promotion of packets through the network. These are the protocols that are usually meant when people talk about network layer protocols. However, another type of protocol is often included in the network layer, called routing information exchange protocols or simply routing 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.

    Another type of protocol operates at the network layer, which is responsible for mapping the host address used at the network layer to the local network address. Such protocols are often called address resolution protocols. - Address Resolution Protocol, ARP.

    Transport layer just like the network layer delivers packets across the network. The transport layer delivers (transports) data between the computers themselves. As soon as the network layer delivers the data to the recipient computer, the transport protocol comes into operation, delivering the data to the application process.

    The transport layer provides applications or upper layers of the stack - application and session - with the transfer of 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 data transportation system is in network provided by the layers located below the transport - network, channel and physical. So, for example, if the quality of communication channels is very high and the likelihood of errors not detected by lower-level protocols is low, then it is reasonable to use one of the lightweight transport layer services that are not burdened with numerous techniques for increasing reliability. If the vehicles at the lower levels are initially very unreliable, then it is advisable to turn to the most developed transport layer service, which works using maximum means to detect and eliminate errors.

    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.

    In a packet switching network, the transport layer must fragment the data coming from the session layer into smaller packets in order to pass it on to the network layer. The receiving side, on the contrary, must collect data from smaller packets into larger ones in order to transmit it to a higher level.

    The transport layer determines the number of packets traveling through the network. In other words, the transport layer generates data packet traffic that must be managed by the network layer.

    The transport layer controls the network bandwidth. Bandwidth refers to the maximum amount of data passing in a given time interval over a communication channel. To increase throughput (and performance), the transport layer opens multiple network connections for the same transport connection. To do this, the transport layer needs to multiplex and demultiplex the transmitted data. The term "multiplexing" refers to the process of placing multiple data streams onto a single communication channel. The term "demultiplexing" means the reverse action. The transport layer of the sending computer multiplexes (combines) many messages into one transport connection. The receiving transport layer, on the other hand, demultiplexes one connection into many messages.

    The protocols of the lower four layers are generally called network transport or transport subsystem, since they completely solve the problem of transporting messages with a given level of quality in composite networks with arbitrary topologies and various technologies. The remaining three upper levels solve the problem of providing application services based on the existing transport subsystem.

    Session layer as a user network interface, it solves problems such as processing connections between processes and applications on different computers, such as processing names, passwords and access rights. The session layer converts the format of data prepared for transmission over the network into a format suitable for transmission to applications. In addition, it processes requests to change connection parameters such as transmission speed and error control. The session layer eliminates the possibility of an application losing data.

    From this moment on, the direct exchange of bytes takes on an internal meaning. Only this level allows you to perform functions such as accessing the server directory.

    The session layer also provides exchange control, recording which party is currently active, and provides synchronization tools. The latter allow you to insert checkpoints into long transfers, so that in case of 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 as separate protocols, although the functions of this layer are often combined with the functions of the application layer and implemented in a single protocol.

    Presentation layer combines some common functions that a network uses repeatedly across network connections. The presentation layer forms the network interface to computer devices such as printers, monitors, and file formats. The presentation layer defines how the network looks from the perspective of the software and hardware of the network computer. Messages coming from lower layers are prepared as necessary for the application.

    Due to the presentation layer, information transmitted by the application layer of one system is always understandable to the application layer of another system. With the help of this layer, application layer protocols can overcome syntactic differences in data representation or differences in character codes, such as ASCII and EBCDIC codes. At this level, for example, data conversion occurs if the receiving computer uses a different number format than the sending computer. 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.

    Application level. This layer concentrates functions related to network-wide applications and through which network users access shared resources, such as files, printers, or hypertext Web pages, and also organize their joint work, for example, using the e-mail protocol. Application programs such as email, a browser, or a distributed database are examples of the use of application-level functions.

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

    Network-dependent and network-independent levels. Functions at all levels of the ISO/OSI model can be classified into one of two groups. Either to functions that depend on the specific technical implementation of the network, or to functions focused on working with applications (Fig. 25).

    The three lower layers - physical, data link and network - are network-dependent, that is, the protocols of these levels are closely related to the technical implementation of the network and the communication equipment used. Switching to other equipment means a complete change in the physical and data link layer protocols in all network nodes.

    The three upper layers - application, representative and session - are application-oriented and have little dependence on the technical features of network construction. The protocols at these layers are not affected by changes in network topology, hardware changes, or migration to another network technology. Thus, the transition from Ethernet to high-speed AnyLAN technology will not require any changes in software that implements the functions of the application, representative and session levels.

    The transport layer is an intermediate layer, it hides all the details of the functioning of the lower layers from the upper ones. This allows you to develop applications that do not depend on technical means of directly transporting messages.

    Security questions:

    1. What is the ISO\OSI model?

    2. How many and what levels does the ISO\OSI model include?

    3. Describe the functions of each layer of the ISO\OSI model.

    4. What the messages at each level consist of.

    5. Explain the concept of “nesting of messages at different levels”

    Alexander Goryachev, Alexey Niskovsky

    In order for network servers and clients to communicate, they must work using the same information exchange protocol, that is, they must “speak” the same language. The protocol defines a set of rules for organizing the exchange of information at all levels of interaction of network objects.

    There is an Open System Interconnection Reference Model, often called the OSI model. This model was developed by the International Organization for Standardization (ISO). The OSI model describes the interaction scheme of network objects, defines a list of tasks and rules for data transfer. It includes seven levels: physical (Physical - 1), channel (Data-Link - 2), network (Network - 3), transport (Transport - 4), session (Session - 5), data presentation (Presentation - 6 ) and applied (Application - 7). Two computers are considered to be able to communicate with each other at a particular layer of the OSI model if their software that implements network functions at that layer interprets the same data in the same way. In this case, direct communication is established between two computers, called “point-to-point”.

    Implementations of the OSI model by protocols are called protocol stacks. It is impossible to implement all the functions of the OSI model within the framework of one specific protocol. Typically, tasks at a specific level are implemented by one or more protocols. One computer must run protocols from the same stack. In this case, the computer can simultaneously use several protocol stacks.

    Let's consider the tasks solved at each level of the OSI model.

    Physical layer

    At this level of the OSI model, the following characteristics of network components are defined: types of connections for data transmission media, physical network topologies, methods of data transmission (with digital or analog signal coding), types of synchronization of transmitted data, separation of communication channels using frequency and time multiplexing.

    Implementations of the OSI physical layer protocols coordinate the rules for transmitting bits.

    The physical layer does not include a description of the transmission medium. However, implementations of physical layer protocols are specific to a particular transmission medium. The physical layer is usually associated with the connection of the following network equipment:

    • concentrators, hubs and repeaters that regenerate electrical signals;
    • transmission media connectors providing a mechanical interface for connecting the device to the transmission media;
    • modems and various converting devices that perform digital and analog conversions.

    This layer of the model defines the physical topologies in the enterprise network, which are built using a core set of standard topologies.

    The first in the basic set is the bus topology. In this case, all network devices and computers are connected to a common data transmission bus, which is most often formed using a coaxial cable. The cable that forms the common bus is called the backbone. From each device connected to the bus, the signal is transmitted in both directions. To remove the signal from the cable, special interrupters (terminator) must be used at the ends of the bus. Mechanical damage to the highway affects the operation of all devices connected to it.

    Ring topology involves connecting all network devices and computers into a physical ring. In this topology, information is always transmitted along the ring in one direction - from station to station. Each network device must have an information receiver on the input cable and a transmitter on the output cable. Mechanical damage to the information transmission medium in a single ring will affect the operation of all devices, however, networks built using a double ring, as a rule, have a margin of fault tolerance and self-healing functions. In networks built on a double ring, the same information is transmitted along the ring in both directions. If the cable is damaged, the ring will continue to operate as a single ring at double length (self-healing functions are determined by the hardware used).

    The next topology is the star topology, or star. It provides for the presence of a central device to which other network devices and computers are connected via beams (separate cables). Networks built on a star topology have a single point of failure. This point is the central device. If the central device fails, all other network participants will not be able to exchange information with each other, since all exchange was carried out only through the central device. Depending on the type of central device, the signal received from one input can be transmitted (with or without amplification) to all outputs or to a specific output to which the information recipient device is connected.

    A fully connected (mesh) topology has high fault tolerance. When networks with a similar topology are built, each of the network devices or computers is connected to every other component of the network. This topology has redundancy, which makes it seem impractical. Indeed, in small networks this topology is rarely used, but in large enterprise networks a fully mesh topology can be used to connect the most important nodes.

    The considered topologies are most often built using cable connections.

    There is another topology that uses wireless connections - cellular. In it, network devices and computers are combined into zones - cells, interacting only with the cell's transceiver device. The transfer of information between cells is carried out by transceiver devices.

    Data Link Layer

    This level determines the logical topology of the network, the rules for gaining access to the data transmission medium, resolves issues related to addressing physical devices within the logical network and managing the transfer of information (transmission synchronization and connection service) between network devices.

    Link layer protocols are defined by:

    • rules for organizing physical layer bits (binary ones and zeros) into logical groups of information called frames. A frame is a link-layer data unit consisting of a contiguous sequence of grouped bits, having a header and a tail;
    • rules for detecting (and sometimes correcting) transmission errors;
    • flow control rules (for devices operating at this level of the OSI model, for example, bridges);
    • rules for identifying computers on a network by their physical addresses.

    Like most other layers, the data link layer adds its own control information to the beginning of the data packet. This information may include source address and destination address (physical or hardware), frame length information, and an indication of active upper-layer protocols.

    The following network connecting devices are typically associated with the data link layer:

    • bridges;
    • smart hubs;
    • switches;
    • network interface cards (network interface cards, adapters, etc.).

    The functions of the link layer are divided into two sublevels (Table 1):

    • media access control (MAC);
    • logical link control (Logical Link Control, LLC).

    The MAC sublayer defines such link layer elements as the logical network topology, the method of access to the information transmission medium, and the rules of physical addressing between network objects.

    The abbreviation MAC is also used in determining the physical address of a network device: the physical address of a device (which is determined within the network device or network card at the manufacturing stage) is often called the MAC address of that device. For a large number of network devices, especially network cards, it is possible to programmatically change the MAC address. It must be remembered that the data link layer of the OSI model imposes restrictions on the use of MAC addresses: in one physical network (a segment of a larger network) there cannot be two or more devices using the same MAC addresses. To determine the physical address of a network object, the concept of “node address” can be used. The host address most often coincides with the MAC address or is determined logically during software address reassignment.

    The LLC sublayer defines the rules for synchronizing transmission and service connections. This sublayer of the data link layer interacts closely with the network layer of the OSI model and is responsible for the reliability of physical (using MAC addresses) connections. The logical topology of a network determines the method and rules (sequence) of data transfer between computers on the network. Network objects transmit data depending on the logical topology of the network. The physical topology defines the physical path of the data; however, in some cases the physical topology does not reflect the way the network operates. The actual data path is determined by the logical topology. Network connection devices and media access schemes are used to transmit data along a logical path, which may differ from the path in the physical medium. A good example of the differences between physical and logical topologies is IBM's Token Ring network. Token Ring local networks often use copper cable, which is laid in a star-shaped circuit with a central splitter (hub). Unlike a normal star topology, the hub does not forward incoming signals to all other connected devices. The hub's internal circuitry sequentially sends each incoming signal to the next device in a predefined logical ring, i.e., in a circular fashion. The physical topology of this network is star, and the logical topology is ring.

    Another example of the differences between physical and logical topologies is the Ethernet network. The physical network can be built using copper cables and a central hub. A physical network is formed, made according to the star topology. However, Ethernet technology provides for the transfer of information from one computer to all others on the network. The hub must relay the signal received from one of its ports to all other ports. A logical network with a bus topology has been formed.

    To determine the logical topology of a network, you need to understand how signals are received in it:

    • in logical bus topologies, each signal is received by all devices;
    • In logical ring topologies, each device receives only those signals that were sent specifically to it.

    It is also important to know how network devices access the information transmission medium.

    Media Access

    Logical topologies use special rules that control permission to transmit information to other network objects. The control process controls access to the communication medium. Consider a network in which all devices are allowed to operate without any rules for gaining access to the transmission medium. All devices in such a network transmit information as soon as the data is ready; these transmissions may sometimes overlap in time. As a result of overlap, signals are distorted and transmitted data is lost. This situation is called a collision. Collisions do not allow organizing reliable and efficient transfer of information between network objects.

    Collisions in the network extend to the physical network segments to which network objects are connected. Such connections form a single collision space, in which the impact of collisions extends to everyone. To reduce the size of collision spaces by segmenting the physical network, you can use bridges and other network devices that have traffic filtering capabilities at the data link layer.

    A network cannot function properly until all network entities are able to monitor, manage, or mitigate collisions. In networks, some method is needed to reduce the number of collisions and interference (overlay) of simultaneous signals.

    There are standard media access methods that describe the rules by which permission to transmit information is controlled for network devices: contention, token passing, and polling.

    Before choosing a protocol that implements one of these media access methods, you should pay particular attention to the following factors:

    • nature of transmission - continuous or pulsed;
    • number of data transfers;
    • the need to transmit data at strictly defined time intervals;
    • number of active devices on the network.

    Each of these factors, combined with its advantages and disadvantages, will help determine which media access method is most appropriate.

    Competition. Contention-based systems assume that access to the transmission medium is implemented on a first-come, first-served basis. In other words, every network device competes for control of the transmission medium. Contention-based systems are designed so that all devices on the network can transmit data only as needed. This practice ultimately results in partial or complete data loss because collisions actually occur. As each new device is added to the network, the number of collisions can increase exponentially. An increase in the number of collisions reduces network performance, and in the case of complete saturation of the information transmission medium, it reduces the network performance to zero.

    To reduce the number of collisions, special protocols have been developed that implement the function of listening to the information transmission medium before the station starts transmitting data. If a listening station detects a signal being transmitted (from another station), it will refrain from transmitting the information and will try again later. These protocols are called Carrier Sense Multiple Access (CSMA) protocols. CSMA protocols significantly reduce the number of collisions, but do not eliminate them completely. Collisions do occur, however, when two stations poll the cable, find no signals, decide the medium is clear, and then simultaneously begin transmitting data.

    Examples of such adversarial protocols are:

    • Carrier Sense Multiple Access/Collision Detection (CSMA/CD);
    • Carrier Sense Multiple Access/Collision Avoidance (CSMA/CA).

    CSMA/CD protocols. CSMA/CD protocols not only listen to the cable before transmission, but also detect collisions and initiate retransmissions. When a collision is detected, the stations transmitting data initialize special internal timers with random values. The timers begin counting down, and when zero is reached, stations must attempt to retransmit data. Since the timers were initialized with random values, one of the stations will try to repeat the data transmission before the other. Accordingly, the second station will determine that the data transmission medium is already busy and will wait for it to become free.

    Examples of CSMA/CD protocols are Ethernet version 2 (Ethernet II, developed by DEC) and IEEE802.3.

    CSMA/CA protocols. CSMA/CA uses schemes such as time slicing access or sending a request to gain access to the medium. When using time slicing, each station can transmit information only at strictly defined times for this station. In this case, a mechanism for managing time slices must be implemented in the network. Each new station connected to the network notifies about its appearance, thereby initiating the process of redistributing time slices for information transmission. In the case of using centralized access control to the transmission medium, each station generates a special transmission request, which is addressed to the control station. The central station regulates access to the transmission medium for all network objects.

    An example of CSMA/CA is Apple Computer's LocalTalk protocol.

    Contention-based systems are most suitable for use with bursty traffic (large file transfers) in networks with a relatively small number of users.

    Systems with token transfer. In token passing systems, a small frame (token) is passed in a specific order from one device to another. A token is a special message that transfers temporary control of the transmission medium to the device holding the token. Passing the token distributes access control among devices on the network.

    Each device knows which device it receives the token from and which device it should pass it to. Typically, these devices are the closest neighbors of the token owner. Each device periodically gains control of the token, performs its actions (transmits information), and then passes the token on to the next device for use. The protocols limit the time each device can control the token.

    There are several token passing protocols. Two networking standards that use token passing are IEEE 802.4 Token Bus and IEEE 802.5 Token Ring. A Token Bus network uses token-passing access control and a physical or logical bus topology, while a Token Ring network uses token-passing access control and a physical or logical ring topology.

    Token passing networks should be used when there is time-sensitive priority traffic, such as digital audio or video data, or when there are very large numbers of users.

    Survey. Polling is an access method that allocates one device (called a controller, primary, or “master” device) to act as an arbiter of access to the medium. This device polls all other devices (secondary) in some predefined order to see if they have information to transmit. To receive data from a secondary device, the primary device sends a request to it, and then receives the data from the secondary device and forwards it to the receiving device. The primary device then polls another secondary device, receives data from it, and so on. The protocol limits the amount of data that each secondary device can transmit after polling. Polling systems are ideal for time-sensitive network devices, such as equipment automation.

    This layer also provides connection services. There are three types of connection service:

    • unacknowledged connectionless service - sends and receives frames without flow control and without error control or packet sequencing;
    • connection-oriented service - provides flow control, error control and packet sequencing by issuing receipts (confirmations);
    • acknowledgment connectionless service - uses receipts to control flow and control errors during transfers between two network nodes.

    The LLC sublayer of the data link layer provides the ability to simultaneously use several network protocols (from different protocol stacks) when operating through a single network interface. In other words, if only one network card is installed in the computer, but there is a need to work with various network services from different manufacturers, then the client network software at the LLC sublevel provides the possibility of such work.

    Network layer

    The network level determines the rules for data delivery between logical networks, the formation of logical addresses of network devices, the definition, selection and maintenance of routing information, and the operation of gateways.

    The main goal of the network layer is to solve the problem of moving (delivering) data to specified points in the network. Data delivery at the network layer is generally similar to data delivery at the data link layer of the OSI model, where physical device addressing is used to transfer data. However, addressing at the data link layer applies only to one logical network and is valid only within that network. The network layer describes the methods and means of transmitting information between many independent (and often heterogeneous) logical networks that, when connected together, form one large network. Such a network is called an internetwork, and the processes of information transfer between networks are called internetworking.

    Using physical addressing at the data link layer, data is delivered to all devices on the same logical network. Each network device, each computer determines the purpose of the received data. If the data is intended for the computer, then it processes it, but if not, it ignores it.

    Unlike the data link layer, the network layer can select a specific route in the internetwork and avoid sending data to logical networks to which the data is not addressed. The network layer does this through switching, network layer addressing, and routing algorithms. The network layer is also responsible for ensuring the correct routes for data through the internetwork consisting of heterogeneous networks.

    The network layer implementation elements and methods are defined as follows:

    • all logically separate networks must have unique network addresses;
    • switching defines how connections are made across the internetwork;
    • the ability to implement routing so that computers and routers determine the best path for data to pass through the internetwork;
    • the network will perform different levels of connection service depending on the number of errors expected within the interconnected network.

    Routers and some switches operate at this layer of the OSI model.

    The network layer determines the rules for the formation of logical network addresses of network objects. Within a large interconnected network, each network object must have a unique logical address. Two components are involved in the formation of a logical address: the logical network address, which is common to all network objects, and the logical address of the network object, which is unique to this object. When forming the logical address of a network object, either the physical address of the object can be used, or an arbitrary logical address can be determined. The use of logical addressing allows you to organize data transfer between different logical networks.

    Each network object, each computer can perform many network functions simultaneously, ensuring the operation of various services. To access services, a special service identifier is used, called a port or socket. When accessing a service, the service identifier follows immediately after the logical address of the computer that provides the service.

    Many networks reserve groups of logical addresses and service identifiers for the purpose of performing specific, predefined and well-known actions. For example, if it is necessary to send data to all network objects, the sending will be made to a special broadcast address.

    The network layer defines the rules for transferring data between two network objects. This transmission can be done using switching or routing.

    There are three methods of switching for data transmission: circuit switching, message switching and packet switching.

    When using circuit switching, a data transmission channel is established between the sender and the recipient. This channel will be active during the entire communication session. When using this method, long delays in channel allocation are possible due to the lack of sufficient bandwidth, load on the switching equipment, or busyness of the recipient.

    Message switching allows you to transmit a whole (not broken into parts) message using the “store-and-forward” principle. Each intermediate device receives a message, stores it locally, and when the communication channel through which the message should be sent is free, sends it. This method is well suited for transmitting email messages and organizing electronic document management.

    Packet switching combines the advantages of the previous two methods. Each large message is broken down into small packets, each of which is sent sequentially to the recipient. As each packet passes through the internetwork, the best path at that moment in time is determined. It turns out that parts of one message can arrive at the recipient at different times, and only after all the parts are collected together will the recipient be able to work with the received data.

    Every time you determine the next path for data, you must choose the best route. The task of determining the best path is called routing. This task is performed by routers. The task of routers is to determine possible data transmission paths, maintain routing information, and select the best routes. Routing can be done statically or dynamically. When specifying static routing, all relationships between logical networks must be specified and remain unchanged. Dynamic routing assumes that the router itself can determine new paths or modify information about old ones. Dynamic routing uses special routing algorithms, the most common of which are distance vector and link state. In the first case, the router uses second-hand information about the network structure from neighboring routers. In the second case, the router operates with information about its own communication channels and interacts with a special representative router to build a complete network map.

    The choice of the best route is most often influenced by factors such as the number of hops through routers (hop count) and the number of ticks (time units) required to reach the destination network (tick count).

    The network layer connection service works when the connection service of the LLC sublayer of the data link layer of the OSI model is not used.

    When building an interconnected network, you have to connect logical networks built using different technologies and providing a variety of services. In order for a network to operate, logical networks must be able to correctly interpret data and control information. This task is solved using a gateway, which is a device or application program that translates and interprets the rules of one logical network into the rules of another. In general, gateways can be implemented at any level of the OSI model, but most often they are implemented at the upper levels of the model.

    Transport layer

    The transport layer allows you to hide the physical and logical structure of the network from applications at the upper layers of the OSI model. Applications work only with service functions that are quite universal and do not depend on the physical and logical network topologies. Features of logical and physical networks are implemented at previous layers, where the transport layer transmits data.

    The transport layer often compensates for the lack of reliable or connection-oriented connection service in lower layers. The term “reliable” does not mean that all data will be delivered in all cases. However, reliable implementations of transport layer protocols can usually acknowledge or deny delivery of data. If the data is not delivered correctly to the receiving device, the transport layer may retransmit or inform upper layers that delivery was not possible. Upper levels can then take necessary corrective action or provide the user with choice.

    Many protocols in computer networks provide users with the ability to work with simple names in natural language instead of complex and difficult to remember alphanumeric addresses. Address/Name Resolution is a function of identifying or mapping names and alphanumeric addresses to each other. This function can be performed by every entity on the network or by special service providers called directory servers, name servers, etc. The following definitions classify address/name resolution methods:

    • consumer initiation of service;
    • initiated by the service provider.

    In the first case, a network user accesses a service by its logical name, without knowing the exact location of the service. The user does not know whether this service is currently available. When contacting, the logical name is matched to the physical name, and the user's workstation initiates a call directly to the service. In the second case, each service notifies all network clients about itself on a periodic basis. Each client knows at any time whether the service is available and can access the service directly.

    Addressing methods

    Service addresses identify specific software processes running on network devices. In addition to these addresses, service providers monitor various conversations they have with devices requesting services. Two different dialogue methods use the following addresses:

    • connection ID;
    • transaction ID.

    A connection identifier, also called a connection ID, port, or socket, identifies each conversation. Using a connection ID, a connection provider can communicate with more than one client. The service provider refers to each switching entity by its number and relies on the transport layer to coordinate other lower-layer addresses. The connection ID is associated with a specific conversation.

    Transaction IDs are similar to connection IDs, but operate in units smaller than a conversation. A transaction is made up of a request and a response. Service providers and consumers track the departure and arrival of each transaction, not the entire conversation.

    Session layer

    The session layer facilitates communication between devices requesting and delivering services. Communication sessions are controlled through mechanisms that establish, maintain, synchronize and manage dialogue between communicating entities. This layer also helps upper layers to identify and connect to available network services.

    The session layer uses logical address information supplied by lower layers to identify the names and addresses of servers needed by upper layers.

    The session layer also initiates conversations between service provider devices and consumer devices. In performing this function, the session layer often represents, or identifies, each object and coordinates access rights to it.

    The session layer implements dialogue management using one of three communication methods - simplex, half duplex and full duplex.

    Simplex communication involves only unidirectional transmission of information from the source to the receiver. This method of communication does not provide any feedback (from receiver to source). Half-duplex allows the use of one data transmission medium for bidirectional information transfers, however, information can only be transmitted in one direction at a time. Full duplex ensures simultaneous transmission of information in both directions over the data transmission medium.

    Administration of a communication session between two network objects, consisting of connection establishment, data transfer, connection termination, is also performed at this level of the OSI model. After a session is established, software that implements the functions of this layer can check the functionality (maintain) of the connection until it is terminated.

    Data presentation layer

    The main task of the data presentation layer is to transform data into mutually agreed upon formats (interchange syntax) that are understandable to all network applications and the computers on which the applications run. At this level, the tasks of data compression and decompression and their encryption are also solved.

    Conversion refers to changing the bit order of bytes, the byte order of words, character codes, and file name syntax.

    The need to change the order of bits and bytes is due to the presence of a large number of different processors, computers, complexes and systems. Processors from different manufacturers may interpret the zero and seventh bits in a byte differently (either the zero bit is the most significant one, or the seventh bit). Similarly, the bytes that make up large units of information - words - are interpreted differently.

    In order for users of different operating systems to receive information in the form of files with correct names and contents, this layer ensures correct conversion of file syntax. Different operating systems work differently with their file systems and implement different ways of forming file names. Information in files is also stored in a specific character encoding. When two network objects interact, it is important that each of them can interpret file information differently, but the meaning of the information should not change.

    The data presentation layer transforms data into a mutually consistent format (interchange syntax) that is understandable by all networked applications and the computers on which the applications run. It can also compress and expand, as well as encrypt and decrypt data.

    Computers use different rules for representing data using binary ones and zeros. Although all of these rules attempt to achieve the common goal of presenting human-readable data, computer manufacturers and standards organizations have created rules that contradict each other. When two computers using different sets of rules try to communicate with each other, they often need to perform some transformations.

    Local and network operating systems often encrypt data to protect it from unauthorized use. Encryption is a general term that describes several methods of protecting data. Protection is often performed using data scrambling, which uses one or more of three methods: permutation, substitution, or algebraic method.

    Each of these methods is simply a special way of protecting data in such a way that it can only be understood by someone who knows the encryption algorithm. Data encryption can be performed either in hardware or in software. However, end-to-end data encryption is typically done programmatically and is considered part of the presentation layer functionality. To notify objects about the encryption method used, 2 methods are usually used - secret keys and public keys.

    Secret key encryption methods use a single key. Network entities that own the key can encrypt and decrypt each message. Therefore, the key must be kept secret. The key can be built into the hardware chips or installed by the network administrator. Each time the key changes, all devices must be modified (it is advisable not to use the network to transmit the value of the new key).

    Network objects using public key encryption methods are provided with a secret key and some known value. An object creates a public key by manipulating a known value through a private key. The entity initiating the communication sends its public key to the receiver. The other entity then mathematically combines its own private key with the public key given to it to set a mutually acceptable encryption value.

    Owning only the public key is of little use to unauthorized users. The complexity of the resulting encryption key is high enough that it can be calculated in a reasonable amount of time. Even knowing your own private key and someone else's public key is not much help in determining the other secret key - due to the complexity of logarithmic calculations for large numbers.

    Application layer

    The application layer contains all the elements and functions specific to each type of network service. The lower six layers combine the tasks and technologies that provide general support for a network service, while the application layer provides the protocols needed to perform specific network service functions.

    Servers provide network clients with information about what types of services they provide. The main mechanisms for identifying the services offered are provided by such elements as service addresses. In addition, servers use methods of presenting their service such as active and passive service presentation.

    When performing an Active service advertisement, each server periodically sends messages (including service addresses) announcing its availability. Clients can also poll network devices for a specific type of service. Network clients collect representations made by servers and form tables of currently available services. Most networks that use the active representation method also define a specific validity period for service representations. For example, if a network protocol specifies that service representations must be sent every five minutes, then clients will time out those service representations that have not been presented within the last five minutes. When the timeout expires, the client removes the service from its tables.

    Servers carry out passive service advertisement by registering their service and address in the directory. When clients want to determine the types of services available, they simply query the directory for the location of the desired service and its address.

    Before a network service can be used, it must be made available to the computer's local operating system. There are several methods for accomplishing this task, but each such method can be determined by the position or level at which the local operating system recognizes the network operating system. The service provided can be divided into three categories:

    • intercepting operating system calls;
    • remote mode;
    • joint data processing.

    When using OC Call Interception, the local operating system is completely unaware of the existence of a network service. For example, when a DOS application tries to read a file from a network file server, it thinks that the file is on the local storage device. In effect, a special piece of software intercepts the request to read the file before it reaches the local operating system (DOS) and forwards the request to the network file service.

    At the other extreme, in Remote Operation mode, the local operating system is aware of the network and is responsible for passing requests to the network service. However, the server knows nothing about the client. To the server operating system, all requests to a service look the same, regardless of whether they are internal or transmitted over the network.

    Finally, there are operating systems that are aware of the existence of the network. Both the service consumer and the service provider recognize each other's existence and work together to coordinate the use of the service. This type of service use is typically required for peer-to-peer collaborative data processing. Collaborative data processing involves sharing data processing capabilities to perform a single task. This means that the operating system must be aware of the existence and capabilities of others and be able to cooperate with them to perform the desired task.

    ComputerPress 6"1999