OSI network model. Data presentation layer

OSI network model. Data presentation layer

04.02.2023

The OSI reference model is a 7-level network hierarchy created by the International Standards Organization (ISO). The presented model in Fig. 1 has 2 different models:

  • a horizontal protocol-based model that implements the interaction of processes and software on different machines
  • vertical model based on services provided by adjacent layers to each other on the same machine

In a vertical layer, adjacent levels exchange information using API interfaces. The horizontal model requires a common protocol for exchanging information at one level.

Picture 1

The OSI model describes only system interaction methods implemented by the OS, software, etc. The model does not include end-user interaction methods. Ideally, applications should access the upper layer of the OSI model, but in practice many protocols and programs have methods for accessing lower layers.

Physical layer

At the physical layer, data is represented in the form of electrical or optical signals corresponding to the 1s and 0s of the binary stream. Transmission medium parameters are determined at the physical level:

  • type of connectors and cables
  • pin assignment in connectors
  • coding scheme for signals 0 and 1

The most common types of specifications at this level are:

  • — unbalanced serial interface parameters
  • — balanced serial interface parameters
  • IEEE 802.3 -
  • IEEE 802.5 -

At the physical level, it is impossible to understand the meaning of the data, since it is presented in the form of bits.

Data Link Layer

This channel implements the transportation and reception of data frames. The layer implements network layer requests and uses the physical layer for reception and transmission. The IEEE 802.x specifications divide this layer into two sublayers: logical link control (LLC) and media access control (MAC). The most common protocols at this level are:

  • IEEE 802.2 LLC and MAC
  • Ethernet
  • Token Ring

Also at this level, error detection and correction during transmission is implemented. At the data link layer, the packet is placed in the data field of the frame - encapsulation. Error detection is possible using different methods. For example, the implementation of fixed frame boundaries, or a checksum.

Network layer

At this level, network users are divided into groups. This implements packet routing based on MAC addresses. The network layer implements transparent transmission of packets to the transport layer. At this level, the boundaries of networks of different technologies are erased. work at this level. An example of the operation of the network layer is shown in Fig. 2. The most common protocols:

Figure - 2

Transport layer

At this level, information flows are divided into packets for transmission at the network layer. The most common protocols at this level are:

  • TCP - Transmission Control Protocol

Session layer

At this level, information exchange sessions between end machines are organized. At this level, the active party is determined and session synchronization is implemented. In practice, many other layer protocols include a session layer function.

Presentation layer

At this level, data exchange occurs between software on different operating systems. At this level, information transformation (compression, etc.) is implemented to transfer the information flow to the transport layer. The layer protocols used are those that use the higher layers of the OSI model.

Application layer

The application layer provides application access to the network. The layer manages file transfer and network management. Protocols used:

  • FTP/TFTP - file transfer protocol
  • X 400 - email
  • Telnet
  • CMIP - Information Management
  • SNMP - network management
  • NFS - Network File System
  • FTAM - access method for transferring files

The concept of “open system” and problems of standardization

The universal thesis about the benefits of standardization, valid for all industries, acquires special significance in computer networks. The essence of the network is the connection of different equipment, which means that the problem of compatibility is one of the most acute. Without the adoption by all manufacturers of generally accepted rules for constructing equipment, progress in the matter of “building” networks would be impossible. Therefore, the entire development of the computer industry is ultimately reflected in standards - any new technology only acquires “legal” status when its content is enshrined in the appropriate standard.

In computer networks, the ideological basis of standardization is a multi-level approach to the development of network interaction tools. It was on the basis of this approach that a standard seven-level model of interaction of open systems was developed, which became a kind of universal language of network specialists.

Multi-level approach. Protocol. Interface. Protocol stack

Organizing interactions between devices on a network is a complex task. As you know, to solve complex problems, a universal technique is used - decomposition, that is, breaking one complex problem into several simpler task modules (Fig. 1.20). The decomposition procedure includes a clear definition of the functions of each module that solves a separate problem, and the interfaces between them. As a result, a logical simplification of the problem is achieved, and in addition, it becomes possible to modify individual modules without changing the rest of the system.

Decomposition often uses a multi-level approach. It is as follows. All the many modules are divided into levels. The levels form a hierarchy, that is, there are overlying and underlying levels (Fig. 1.21). The set of modules that make up each level is formed in such a way that, to perform their tasks, they make requests only to the modules of the immediately adjacent underlying level. On the other hand, the results of the work of all modules belonging to a certain level can only be transferred to modules of the adjacent higher level. This hierarchical decomposition of the problem requires a clear definition of the function of each level and the interfaces between the levels. An interface defines a set of functions that the underlying layer provides to the higher layer. As a result of hierarchical decomposition, relative independence of levels is achieved, and therefore the possibility of their easy replacement.

In this case, lower-level modules can, for example, solve all issues related to the reliable transmission of electrical signals between two neighboring nodes. Modules more high level organize the transportation of messages within the entire network, using the means of the mentioned lower level. And at the top level there are modules that provide users with access to various services - file, print, etc. Of course, this is only one of many possible options for dividing the general task of organizing network interaction into private subtasks.

A multi-level approach to the description and implementation of system functions is applied not only to network tools. This operating model is used, for example, in local file systems, when an incoming request to access a file is sequentially processed by several program levels (Fig. 1.22). The request is first analyzed by the upper level, which sequentially parses the compound symbolic file name and determines the unique file identifier. The next level finds by a unique name all the main characteristics of the file: address, access attributes, etc. Then, at a lower level, access rights to this file are checked, and then, after calculating the coordinates of the file area containing the required data, physical exchange is performed with external device using the disk driver.

The multi-level representation of network interaction means has its own specifics due to the fact that the message exchange process involves two machines, that is, in this case it is necessary to organize the coordinated work of two “hierarchies”. When transmitting messages, both participants in a network exchange must accept many agreements. For example, they must agree on the levels and shape of electrical signals, how to determine the length of messages, agree on methods of checking reliability, etc. In other words, agreements must be made for all levels, starting from the lowest - the bit transfer level - to the highest, implementing a service for network users.

In Fig. Figure 1.23 shows a model of interaction between two nodes. On each side, the means of interaction are represented by four levels. The interaction procedure between these two nodes can be described as a set of rules for the interaction of each pair of corresponding levels of both parties involved.

Formalized rules that determine the sequence and format of messages exchanged between network components located at the same level, but in different nodes, are called protocol.

Modules that implement protocols of neighboring layers and are located in the same node also interact with each other in accordance with clearly defined rules and using standardized message formats. These rules are usually called interface. An interface defines a set of services that a given layer provides to its neighboring layer.

In essence, a protocol and an interface express the same concept, but traditionally in networks they have been assigned different scopes of action: protocols define the rules for the interaction of modules of the same level in different nodes, and interfaces define the rules for the interaction of modules of neighboring levels in the same node.

The tools of each level must work, firstly, their own protocol, and secondly, interfaces with neighboring levels.

A hierarchically organized set of protocols sufficient to organize the interaction of nodes in a network is called stack of communication protocols.

Communication protocols can be implemented in both software and hardware. Lower-level protocols are often implemented using a combination of software and hardware, while higher-level protocols are typically implemented purely in software.

A software module that implements a certain protocol is often also called a “protocol” for brevity. Moreover, the relationship between a protocol - a formally defined procedure and a protocol - a software module that implements this procedure, is similar to the relationship between an algorithm for solving a certain problem and a program that solves this problem.

It is clear that the same algorithm can be programmed with different degrees of efficiency. In the same way, a protocol can have several software implementations. That is why, when comparing protocols, one should take into account not only the logic of their operation, but also the quality of software solutions. Moreover, the efficiency of interaction between devices on a network is influenced by the quality of the entire set of protocols that make up the stack, in particular, how rationally functions are distributed between protocols of different levels and how well the interfaces between them are defined.

OSI model

Just because a protocol is an agreement adopted by two interacting entities, in this case two computers working on a network, does not mean that it is necessarily standard. But in practice, when implementing networks, they tend to use standard protocols. These may be proprietary, 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 model of open systems interaction (Open System Interconnection, OSI) or OSI model. 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.

In the OSI model (Fig. 1.25), communication means are divided into seven levels:

    Applied

    Representative

    Session

    Transport

    Network

    Duct

    Physical.

Each layer deals with one specific aspect of network device interaction.

The OSI model describes only system communications implemented by the operating system, system utilities, and system 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 application interaction layer and the application layer.

You should also keep 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 for remote file access. 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 tools responsible for transporting messages over the network, which are located at the lower layers 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 on it. The message data field can 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 its own service information to the 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. (Some protocol implementations place service information not only at the beginning of the message in the form of a header, but also at the end, in the form of a so-called “trailer” -.) Finally, the message reaches the lower, physical layer, which actually transmits it along communication lines to the recipient machine. At this point, the message is “overgrown” with headers of all levels (Fig. 1.26).

When a message arrives over the network at the destination machine, it is received by its physical layer and sequentially moves up from layer to layer. Each level analyzes and processes 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 (message) There are other terms used by network specialists to designate units of data in exchange procedures. ISO standards use a common name to designate the units of data that protocols at different levels deal with: protocol block data ( Protocol Data Unit , PDU ). To designate data blocks of certain levels - Special names are often used: frame, packet, datagram, segment.

The OSI model distinguishes between two main types of protocols. The protocols with connection establishment (connection- oriented) 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 conversation, they must terminate this connection . The telephone is an example of interaction , connection-based .

The second group of protocols is protocols without first establishing a connection (connectionless). Such protocols are also called datagram protocols. The sender simply transmits the message when it is ready. Dropping a letter into Mailbox is an example of communication without first establishing a connection. When computers interact, both types of protocols are used.

OSI Model Layers

Physical layer

The Physical layer deals with the transmission of bits over physical communication channels, such as coaxial cable, twisted pair cable, fiber optic cable or digital territorial circuit. 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 transmitting discrete information are determined, for example, the steepness of pulse edges, voltage or current levels of the transmitted signal, type of encoding, and signal transmission speed. In addition, the types of connectors and the purpose of each contact are standardized here.

Functions physical level 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 1OBase specification - Ethernet technology, 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 in the cable, as well as some 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 Data 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, the link layer groups bits into sets called frames (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 distinguish it, and also calculates checksum, processing all the bytes of the frame in a certain way and adding a checksum to the frame. When a frame arrives over the network, 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 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 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 bus, ring, and star, as well as structures derived from them using bridges and switches. Examples of link layer protocols are Ethernet, Token Ring, FDDI, lOOVG-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 often provides the exchange of messages only 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. In such cases, network layer facilities are used to deliver messages between end nodes across the entire network. This is how X.25 networks are organized. 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. For example, there is an implementation of the SNMP network management protocol directly over Ethernet, although by default this protocol runs on top of the IP network protocol and the UDP transport protocol. Naturally, the use of such an implementation will be limited - it is not suitable for composite networks of different technologies, for example, Ethernet and X.25, and even for a network in which Ethernet is used in all segments, but there are loop-shaped connections between the segments. But in a two-segment Ethernet network connected by a bridge, the implementation of SNMP over the data link layer will be quite workable.

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

Network layer

The Network layer serves to form a unified transport system , uniting 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. Let's start considering them using the example of combining local networks.

Local network link layer protocols ensure data delivery between any nodes only in a network with the appropriate standard topology, for example, a hierarchical star 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. It would be possible to make link layer protocols more complex to support looping redundant connections, but the principle of separation of responsibilities between layers leads to a different solution. 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 introduced.

At the network level the term itself net endowed with 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 data link layer, but data delivery between networks is handled by the network layer, which supports the ability the right choice message transmission route even in the case 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 certain number of transit transmissions between networks, or hops (from hop - jump), each time choosing the appropriate route. Thus, a route is a sequence of routers through which a packet passes.

In Fig. Figure 1.27 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 its solution is one of the main tasks 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 transmission time of data along this route; it depends on the capacity of the communication channels and the intensity of the schedule, 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 message transmission over connections with a non-standard structure, which we have now examined using the example of combining several local networks. The network layer also solves the problems 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 packages (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 leading 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. First type - network protocols (routedprotocols) - 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 (routing protocols). Using these protocols, routers collect information about the topology of internetwork connections. Network layer protocols are implemented by software modules of the operating system, as well as software and hardware of routers.

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. Sometimes they are classified not as a network layer, but as a channel layer, although the subtleties of the classification do not change their essence.

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 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 presence 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 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 of 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 - using preliminary establishment of a logical connection, control of message delivery by checksums and cyclic numbering packages, setting 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.

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

The Session layer provides dialogue control: it records 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.

Representative level

The Presentation layer deals with the form of presentation of information transmitted over the network, without changing its content. 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, 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 such a protocol is the Secure Socket Layer (SSL) protocol, which provides secure messaging for application layer protocols in 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 protocol. mail. The unit of data that the application layer operates on is usually called message (message).

There is a very wide variety of application layer services. Let us take as an example 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.

Network-dependent and network-independent levels

Functions at all layers of the OSI model can be classified into one of two groups:

either to functions that depend on a specific technical implementation of the network, or to functions that are oriented to work with applications.

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. For example, the transition to FDDI equipment means a complete change in the protocols of the physical and data link layers 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 any changes in the network topology, replacement of equipment, or transition to another network technology. Thus, the transition from Ethernet to high-speed lOOVG-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.

In Fig. 1.28 shows the levels of the OSI model , on which various network elements operate. A computer with a network OS installed on it interacts with another computer using protocols of all seven levels. Computers carry out this interaction indirectly through various communication devices: hubs, modems, bridges, switches, routers, multiplexers. Depending on the type, a communication device can operate either only at the physical layer (repeater), or at physical and link (bridge), or at physical, link and network, sometimes also capturing the transport layer (router).

In Fig. Figure 1.29 shows the correspondence of the functions of various communication devices to the levels of the OSI model .

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 supported at the upper layers, and other parameters.

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, this is the standard that network software developers and manufacturers adhere to network equipment in order to maintain the compatibility of 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 connector of your computer’s network card, as well as internal electrical circuits on computer boards. Network engineers have the concept of a “physics problem” - this means that the specialist considered a physical layer device to be the culprit for the “non-transmission” of data, for example, it was broken somewhere network cable, or 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 for unambiguous identification network device online. 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 are not above riveting, 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 (aka 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. Transferring 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 that network engineers are mostly interested in, system administrators. If all 4 lower levels worked as they should, but the data did not reach its destination, then the problem needs to be looked for already in software specific 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 text file, then you need to check the encoding (so that you don’t get any “kryakozyabrs”), perhaps unpack it from the archive.... but here what I wrote about earlier is clearly visible - it’s very difficult to separate where the executive level ends 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 the header, which contains the MAC addresses of the recipient and sender, 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 protocols of 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:


Network model OSI(basic reference model of interaction of open systems, English Open Systems Interconnection Basic Reference Model) - abstract network model for communications and network protocol development.

The model consists of 7 levels located one above the other. The layers interact with each other (vertically) through interfaces, and can interact with a parallel layer of another system (horizontally) using protocols. Each level can only interact with its neighbors and perform the functions assigned only to it. Although other models exist, most network manufacturers today design their products based on this structure.

OSI levels

Each layer of the OSI model is responsible for part of the processing process to prepare data for transmission over the network.

According to the OSI model, during the transmission process, data literally passes from top to bottom through the levels of the OSI model of the sending computer and up through the levels of the OSI model of the receiving computer. The reverse process of encapsulation occurs on the receiving computer. The bits arrive at the physical layer of the OSI model of the receiving computer. As the data moves up through the OSI layers of the receiving computer, it will reach the application layer.

LevelNameDescription 1Description 2
7. AppliedThis is the level at which end product users operate. They don't care how the data is transmitted, why and through what place... They said "I WANT!" - and we, programmers, must provide this to them. As an example, we can take any online game: for the player it works at this level.When the user wants to send data, e.g. email, the encapsulation process begins at the application layer. The application layer is responsible for providing network access to applications. Information passes through the top three layers and, when it reaches the transport layer, it is considered data.
6. Representative (Introduction to XML, SMB)Here the programmer deals with data received from lower levels. Basically, this is converting and presenting data in a user-friendly form.
5. Session (TLS, SSL certificates for website, mail, NetBios)This layer allows users to conduct "communication sessions". That is, it is at this level that the transmission of packets becomes transparent to the programmer, and he can, without thinking about the implementation, directly transmit data as a solid stream. This is where the protocols HTTP, FTP, Telnet, SMTP, etc. come into play.
4. Transport (TCP, UDP ports)Controls the transfer of data ( network packets). That is, it checks their integrity during transmission, distributes the load, etc. This layer implements protocols such as TCP, UDP, etc. Of greatest interest to us.At the transport layer, data is broken down into more easily managed segments, or transport layer PDUs, for orderly transport across the network. A PDU describes data as it moves from one layer of the OSI model to another. In addition, the transport layer PDU contains information such as port numbers, sequence numbers, and handshake numbers, which are used to transport data reliably.
3. Network (IP, ICMP network congestion diagnostic protocol)Logically controls network addressing, routing, etc. Should be of interest to developers of new protocols and standards. The IP, IPX, IGMP, ICMP, and ARP protocols are implemented at this level. Mainly controlled by drivers and operating systems. Of course, it’s worth getting involved, but only when you know what you’re doing and are completely confident in yourself.At the network layer, each segment coming from the transport layer becomes a packet. The packet contains logical addressing and other Layer 3 control data.
2. Channel (WI-FI, What is Ethernet)This level controls the perception of electronic signals by the logic (radio-electronic elements) of hardware devices. That is, by interacting at this level, the hardware turns the stream of bits into electrical signals and vice versa. We are not interested in it because we do not develop hardware, chips, etc. The level concerns network cards, bridges, switches, routers, etc.At the data link layer, each packet coming from the network layer becomes a frame. The frame contains the physical address and error correction data.
1. Hardware (Physical) (laser, electricity, radio)Controls transmissions physical signals between hardware devices included in the network. That is, it controls the transfer of electrons through wires. We are not interested in it, because everything that is at this level is controlled by hardware (the implementation of this level is the task of manufacturers of hubs, multiplexers, repeaters and other equipment). We are not amateur radio physicists, but game developers.At the physical layer, the frame becomes bits. Over a network environment, bits are transmitted one at a time.

We see that the higher the level, the higher the degree of abstraction from data transfer to working with the data itself. This is the whole point of the OSI model: as we climb higher and higher on the ladder, we become less and less concerned about how data is transferred, we become more and more interested in the data itself rather than in the means for transmitting it. As programmers, we are interested in layers 3, 4, and 5. We must use the tools they provide to build layers 6 and 7 that end users can work with.

Network layer

The OSI network layer implements the IP protocols (Structure of the Internet Protocol IPv4, IPv6), IPX, IGMP, ICMP, ARP.

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

Create a complex, structured network with the integration of various basic network technologies, it is also possible by means of the link layer: for this, some 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 with the help of custom filters, for which the administrator must deal with the binary representation of the contents of the packets.

    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.

interaction of open systems. In other words, this is a certain standard by which network technologies operate.

The mentioned system consists of seven layers of the OSI model. Each protocol works with protocols at its own level, either at a level below or above itself.

Each level operates on a specific data type:

  1. Physical - bit;
  2. Channel - frame;
  3. Network - package;
  4. Transport - segments/datagrams;
  5. Sessional - session;
  6. Executive - flow;
  7. Application - data

OSI Model Layers

Application layer ( application layer)

This is the top one OSI network model layer. It is also called the application layer. Designed for user interaction with the network. The layer provides applications with the ability to use various network services.

Functions:

  • remote access;
  • Post service;
  • generation of requests to the next level ( presentation layer)

Network layer protocols:

  • BitTorrent
  • HTTP
  • SMTP
  • SNMP
  • TELNET

Presentation layer ( presentation layer)

This is the second level. Otherwise called the executive level. Designed for protocol conversion, as well as for data encoding and decoding. At this stage, requests delivered from the application layer are formed into data for transmission over the network and vice versa.

Functions:

  • data compression/decompression;
  • data encoding/decoding;
  • redirection of requests

Network layer protocols:

  • LPP
  • NDR

Session level ( session layer)

This OSI network model layer is responsible for maintaining the communication session. Thanks to this layer, applications can interact with each other over time.

Functions:

  • granting rights
  • creating/pausing/restoring/terminating a connection

Network layer protocols:

  • ISO-SP
  • L2TP
  • NetBIOS
  • PPTP
  • SMPP

Transport layer ( transport layer)

This is the fourth level, if you count from above. Designed for reliable data transmission. However, transmission may not always be reliable. Duplication and non-delivery of data parcels are possible.

Network layer protocols:

  • UDP
  • SST
  • RTP

Network layer ( network layer)

The OSI network model layer is responsible for determining the best and shortest route for data transmission.

Functions:

  • address assignment
  • collision tracking
  • route determination
  • switching

Network layer protocols:

  • IPv4/IPv6
  • CLNP
  • IPsec
  • R.I.P.
  • OSPF

Link layer ( Data Link layer)

This is the sixth level, which is responsible for delivering data between devices that are located in the same network area.

Functions:

  • Hardware-level addressing
  • error control
  • error correction

Network layer protocols:

  • SLIP
  • LAPD
  • IEEE 802.11 wireless LAN,
  • FDDI
  • ARCnet

Physical layer ( physical layer)

Lowest and most recent OSI network model layer. Used to define the method of data transmission in the physical/electrical environment. Let's say any site, for example " play online casino http://bestforplay.net ", located on some kind of server, the interfaces of which also transmit some kind of electrical signal through cables and wires.

Functions:

  • determining the type of data transfer
  • data transfer

Network layer protocols:

  • IEEE 802.15 (Bluetooth)
  • 802.11Wi-Fi
  • GSMUm radio interface
  • ITU and ITU-T
  • EIARS-232

Table of the 7-layer OSI model

OSI model
Data type Level Functions
Data Applied Access to network services
Flow Executive Data presentation and encryption
Sessions Session Session management
Segments/Datagrams Transport Direct communication between endpoints and reliability
Packages Network Route determination and logical addressing
Personnel Duct Physical addressing
Bits Physical Working with transmission media, signals and binary data

© 2024 hecc.ru - Computer technology news