• Model osi definition. Open Systems Interconnection (OSI) model

    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 task 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 upper 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 in relation 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 all the main characteristics of a file using a unique name: 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 cars, that is, in in this case it is necessary to organize the coordinated work of the two “hierarchies”. When transmitting messages, both participants 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 for 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 adjacent layer protocols 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 - software module, implementing 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 between 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 interaction model open systems (Open System Interconnection, OSI) or OSI model. The OSI model defines different levels interaction between systems, gives them standard names and indicates what functions each level should perform. The OSI model was developed based on extensive experience gained from creating computer networks, mainly global ones, in the 70s. Full description 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, system hardware. The model does not include interoperability between applications end users. 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 remote access to files. In this case, the application does not use the system file service when accessing remote resources: it bypasses the upper layers of the OSI model and accesses directly the system tools responsible for transporting messages over the network, which are located at the lower layers of the OSI model.

    So, let the application make a request to the application layer, for example to file service. Based on this request software The application layer 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 may be empty or contain some data, such as that which needs to be written to deleted 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 perhaps 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 unshielded twisted pair category 3 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). Data Link Layer ensures the correct transmission of each frame by placing a special sequence of bits at the beginning and end of each frame to highlight it, and also calculates a checksum by 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. Such typical topologies supported by local network link layer protocols include common bus, ring and star, as well as structures obtained 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-like connections between the segments. But in two-segment Ethernet networks, united by a bridge, the implementation of SNMP over the data link layer will be quite functional.

    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 a union 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 in 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 averages over time. long time. The route can be selected based on other criteria, such as transmission reliability.

    In general, the functions of the network level 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 coordination problems 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 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. 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 active in present moment, provides synchronization facilities. The latter allow you to insert checkpoints into long transfers, so that in case of failure you can go back to the last checkpoint, 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 the application layer protocols of the TCP/IP stack.

    Application layer

    The Application layer is really just a set of various protocols through which network users access shared resources such as files, printers, or hypertext Web pages, and also organize their collaboration, for example, using the electronic 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, switching to FDDI equipment means full shift 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 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 direct transport of 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.

    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 usually use standard protocols. These can be branded, national or international standards.

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

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

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

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


    Rice. 11.6.

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

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

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

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

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

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

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


    An application on PC1 sends data to another application on PC2. Starting from the top layer (application layer), data is sent to the network card to the data link layer. On it, the network card converts frames into bits and sends them to physical environment(for example, twisted pair cable). A signal arrives on the other side of the cable, and the PC2 computer's network card receives these signals, recognizing them into bits and forming frames from them. Data (contained in frames) is decapsulated to upper level, and when they reach the application layer, the corresponding program on PC2 receives them.

    Repeater. Hub.

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


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

    Network bridge. Switch.

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


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

    Router.


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

    Conclusion

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


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

    Network OSI model (English) open systems interconnection basic reference model- the basic reference model for the interaction of open systems) - the network model of the OSI/ISO network protocol stack.

    Due to the protracted development of the OSI protocols, the main protocol stack currently in use is TCP/IP, which was developed before the adoption of the OSI model and without connection with it.

    OSI model

    Data type

    Layer

    Functions

    7. Application

    Access to network services

    6. Presentation

    Data representation and encryption

    5. Session

    Session management

    Segments/Datagrams

    4. Transport

    Direct communication between endpoints and reliability

    3. Network

    Route determination and logical addressing

    2. Channel (data link)

    Physical addressing

    1. Physical

    Working with transmission media, signals and binary data

    osi model levels

    In the literature, it is most often customary to start describing the layers of the OSI model from layer 7, called application layer, at which user applications access the network. The OSI model ends with the 1st layer - physical, which defines the standards required by independent manufacturers for data transmission media:

      type of transmission medium (copper cable, optical fiber, radio air, etc.),

      signal modulation type,

      signal levels of logical discrete states (zero and one).

    Any protocol of the OSI model must interact either with protocols at its layer, or with protocols one unit higher and/or lower than its layer. Interactions with protocols of one level are called horizontal, and with levels one higher or lower - vertical. Any protocol of the OSI model can perform only the functions of its layer and cannot perform functions of another layer, which is not performed in the protocols of alternative models.

    Each level, with some degree of convention, corresponds to its own operand - a logically indivisible element of data, which at a separate level can be operated within the framework of the model and the protocols used: at the physical level the smallest unit is a bit, at the link level information is combined into frames, at the network level - into packets ( datagrams), on transport - into segments. Any piece of data logically combined for transmission - frame, packet, datagram - is considered a message. It is messages in general that are the operands of the session, representative and application levels.

    Basic network technologies include the physical and data link layers.

    Application layer

    Application layer (application layer) - top model level, ensuring interaction of user applications with the network:

      Allows applications to use network services:

      • remote access to files and databases,

        forwarding email;

      is responsible for transmitting service information;

      provides applications with error information;

      generates queries to the presentation layer.

    Application level protocols: RDP HTTP (HyperText Transfer Protocol), SMTP (Simple Mail Transfer Protocol), SNMP (Simple Network Management Protocol), POP3 (Post Office Protocol Version 3), FTP (File Transfer Protocol), XMPP, OSCAR, Modbus, SIP, TELNET and others.

    Executive level

    Executive level (presentation level; English) presentation layer) provides protocol conversion and data encryption/decryption. Application requests received from the application layer are converted into a format for transmission over the network at the presentation layer, and data received from the network is converted into an application format. At this level, compression/decompression or encoding/decoding of data can be carried out, as well as redirecting requests to another network resource, if they cannot be processed locally.

    The presentation layer is usually an intermediate protocol for transforming information from neighboring layers. This allows communication between applications on disparate computer systems in a manner transparent to the applications. The presentation layer provides code formatting and transformation. Code formatting is used to ensure that the application receives information to process that makes sense to it. If necessary, this layer can perform translation from one data format to another.

    The presentation layer not only deals with the formats and presentation of data, it also deals with the data structures that are used by programs. Thus, layer 6 provides organization of data as it is sent.

    To understand how this works, let's imagine that there are two systems. One uses the extended binary information interchange code EBCDIC to represent data, for example, this could be the IBM mainframe, and the other uses the American standard information interchange code ASCII (most other computer manufacturers use it). If these two systems need to exchange information, then a presentation layer is needed that will perform the conversion and translate between the two different formats.

    Another function performed at the presentation layer is data encryption, which is used in cases where it is necessary to protect transmitted information from being received by unauthorized recipients. To accomplish this task, processes and code in the presentation layer must perform data transformation.

    Presentation layer standards also define how graphical images are represented. For these purposes, the PICT format can be used - an image format used to transfer QuickDraw graphics between programs. Another representation format is the tagged TIFF image file format, which is typically used for high-resolution raster images. The next presentation layer standard that can be used for graphics is the JPEG standard.

    There is another group of presentation level standards that define the presentation of audio and film fragments. This includes the Electronic Musical Instrument Interface (MIDI) for digital representation of music, developed by the Motion Picture Experts Group MPEG standard.

    Presentation layer protocols: AFP - Apple Filing Protocol, ICA - Independent Computing Architecture, LPP - Lightweight Presentation Protocol, NCP - NetWare Core Protocol, NDR - Network Data Representation, XDR - eXternal Data Representation, X.25 PAD - Packet Assembler/Disassembler Protocol .

    Session layer

    Session level session layer) model ensures the maintenance of a communication session, allowing applications to interact with each other for a long time. The layer manages session creation/termination, information exchange, task synchronization, data transfer eligibility determination, and session maintenance during periods of application inactivity.

    Session layer protocols: ADSP, ASP, H.245, ISO-SP (OSI Session Layer Protocol (X.225, ISO 8327)), iSNS, L2F, L2TP, NetBIOS, PAP (Password Authentication Protocol), PPTP, RPC, RTCP , SMPP, SCP (Session Control Protocol), ZIP (Zone Information Protocol), SDP (Sockets Direct Protocol)..

    Transport layer

    Transport layer transport layer) model is designed to ensure reliable data transfer from sender to recipient. However, the level of reliability can vary widely. There are many classes of transport layer protocols, ranging from protocols that provide only basic transport functions (for example, data transfer functions without acknowledgment), to protocols that ensure that multiple data packets are delivered to the destination in the proper sequence, multiplex multiple data streams, provide data flow control mechanism and guarantee the reliability of the received data. For example, UDP is limited to monitoring the integrity of data within a single datagram and does not exclude the possibility of losing an entire packet or duplicating packets, disrupting the order in which data packets are received; TCP ensures reliable continuous data transmission, excluding data loss or disruption of the order of their arrival or duplication, can redistribute data by breaking up large portions of data into fragments and, conversely, merging fragments into one package.

    Transport layer protocols: ATP, CUDP, DCCP, FCP, IL, NBF, NCP, RTP, SCTP, SPX, SST, TCP (Transmission Control Protocol), UDP (User Datagram Protocol).

    Network layer

    Network layer network layer) model is designed to determine the path of data transmission. Responsible for translating logical addresses and names into physical ones, determining the shortest routes, switching and routing, monitoring problems and congestion in the network.

    Network layer protocols route data from source to destination. Devices (routers) operating at this level are conventionally called third-level devices (based on the level number in the OSI model).

    Network layer protocols: IP/IPv4/IPv6 (Internet Protocol), IPX, X.25, CLNP ( network protocol without organizing connections), IPsec (Internet Protocol Security). Routing protocols - RIP, OSPF.

    Data Link Layer

    Data link layer data link layer) is designed to ensure the interaction of networks at the physical level and control over errors that may occur. It packs the data received from the physical layer, presented in bits, into frames, checks them for integrity and, if necessary, corrects errors (forms a repeated request for a damaged frame) and sends them to the network layer. The data link layer can communicate with one or more physical layers, monitoring and managing this interaction.

    The IEEE 802 specification divides this layer into two sublayers: MAC. media access control) regulates access to a shared physical medium, LLC (eng. logical link control) provides network layer service.

    Switches, bridges and other devices operate at this level. These devices use layer 2 addressing (by layer number in the OSI model).

    Link layer protocols - ARCnet, ATMEthernet, Ethernet Automatic Protection Switching (EAPS), IEEE 802.2, IEEE 802.11wireless LAN, LocalTalk, (MPLS), Point-to-Point Protocol (PPP), Point-to-Point Protocol over Ethernet (PPPoE ),StarLan,Token ring,Unidirectional Link Detection(UDLD),x.25.

    Physical layer

    Physical level physical layer) - the lowest level of the model, which determines the method of transferring data, presented in binary form, from one device (computer) to another. They transmit electrical or optical signals into a cable or radio broadcast and, accordingly, receive and convert them into data bits in accordance with digital signal encoding methods.

    Hubs, signal repeaters and media converters also operate at this level.

    Physical layer functions are implemented on all devices connected to the network. On the computer side, the physical layer functions are performed by the network adapter or serial port. The physical layer refers to the physical, electrical, and mechanical interfaces between two systems. The physical layer defines such types of data transmission media as optical fiber, twisted pair, coaxial cable, satellite channel data transfers, etc. Standard types of network interfaces related to the physical layer are: V.35, RS-232, RS-485, RJ-11, RJ-45, AUI and BNC connectors.

    Physical layer protocols: IEEE 802.15 (Bluetooth),IRDA,EIARS-232,EIA-422,EIA-423,RS-449,RS-485,DSL,ISDN,SONET/SDH,802.11Wi-Fi,Etherloop,GSMUm radio interface ,ITU and ITU-T,TransferJet,ARINC 818,G.hn/G.9960.

    TCP/IP family

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

    IPX/SPX Family

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

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

    TCP/IP model (5 layers)

      Application Layer (5) or the application layer provides services that directly support user applications, e.g. software file transfer, database access, e-mail facilities, server registration service. This level controls all other levels. For example, if the user works with electronic Excel tables and decides to save the working file in its directory on the network file server, then the application layer ensures that the file is moved from the working computer to network drive transparent to the user.

      Transport (4) layer (Transport Layer) ensures delivery of packets without errors and losses, as well as in the required sequence. This is where the breakdown into blocks takes place. transmitted data, placed in packets, and recovery of received data from packets. Packet delivery is possible both with the establishment of a connection (virtual channel) and without. The transport layer is the boundary layer and the bridge between the top three, which are highly application-specific, and the bottom three, which are highly network-specific.

      Network (3) layer (Network Layer) is responsible for addressing packets and translating logical names (logical addresses, such as IP addresses or IPX addresses) to physical network MAC addresses (and vice versa). At the same level, the problem of choosing a route (path) along which the packet is delivered to its destination is solved (if there are several routes in the network). At the network level there are such complex intermediate network devices like routers.

      Channel (2) layer or transmission line control layer (Data link Layer) is responsible for generating packets (frames) of a standard type for a given network (Ethernet, Token-Ring, FDDI), including initial and final control fields. Here, network access is controlled, transmission errors are detected by calculating checksums, and erroneous packets are re-sent to the receiver. The data link layer is divided into two sublayers: the upper LLC and the lower MAC. Intermediate network devices such as switches operate at the data link level.

      Physical (1) layer (Physical Layer)– this is the lowest level of the model, which is responsible for encoding the transmitted information into signal levels accepted in the transmission medium used, and reverse decoding. It also defines the requirements for connectors, connectors, electrical matching, grounding, interference protection, etc. At the physical layer, network devices such as transceivers, repeaters, and repeater hubs operate.

    Network model OSI(basic reference model open systems interaction, English. Open Systems Interconnection Basic Reference Model is an 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 users work final products. 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 network 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. Application layer responsible for ensuring 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 they enter the scene HTTP protocols, FTP, Telnet, SMTP, etc.
    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, serial numbers and handshake numbers, which are used to transport data securely.
    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 bit stream into electrical signals and vice versa. We are not interested in it because we do not develop hardware, chips, etc. 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're 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

    At the OSI network level, the IP protocols (Structure of the Internet Protocol IPv4, IPv6), IPX, IGMP, ICMP, ARP are implemented.

    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 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 network traffic Computers on a 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 shield local traffic inside the segment, without 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 fairly 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 hosts 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, for which the administrator has to deal with the binary representation of the contents of the packages.

      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 the network (or subnet, or segment), which could be used when structuring large network. Therefore, network technology developers decided to entrust the task of building a composite network to a new level - the network level.