osi model presentation layer. OSI network model. Description of the levels of the network model

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

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

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

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

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


Rice. 11.6.

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

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

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

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

Model Open Systems Interconnection (OSI) is the skeleton, foundation and base of all network entities. The model defines network protocols, distributing them into 7 logical layers. It is important to note that in any process, network transmission control moves from layer to layer, sequentially connecting protocols at each layer.

Video: OSI model in 7 minutes

The lower layers are responsible for physical transmission parameters, such as electrical signals. Yes - yes, signals in wires are transmitted using representation into currents :) Currents are represented as a sequence of ones and zeros (1s and 0s), then the data is decoded and routed over the network. Higher levels cover queries related to data presentation. Relatively speaking, higher layers are responsible for network data from the user's point of view.

The OSI model was originally coined as standard approach, an architecture or pattern that would describe the network interaction of any network application. Let's take a closer look, shall we?


#01: Physical level

On the first level OSI models physical signals (currents, light, radio) are transmitted from source to recipient. At this level we operate with cables, contacts in connectors, coding of ones and zeros, modulation, and so on.

Among the technologies that live at the first level, we can highlight the most basic standard - Ethernet. It is now in every home.

Note that not only electric currents. Radio frequencies, light or infrared waves are also used everywhere in modern networks.

Network devices that belong to the first level are hubs and repeaters - that is, “stupid” pieces of hardware that can simply work with a physical signal without delving into its logic (without decoding).

#02: Data Link level

Imagine, we received a physical signal from the first level - physical. This is a set of voltages of different amplitudes, waves or radio frequencies. Upon receipt, the second level checks and corrects transmission errors. At the second level, we operate with the concept of “frame”, or as they also say “frame”. Here the first identifiers appear - MAC addresses. They consist of 48 bits and look something like this: 00:16:52:00:1f:03.

The link layer is complex. Therefore, it is conventionally divided into two sublevels: logical channel control (LLC, Logical Link Control) and media access control (MAC, Media Access Control).

Devices such as switches and bridges live at this level. By the way! The Ethernet standard is also here. It is comfortably located at the first and second (1 and 2) levels of the OSI model.

#03: Network layer

Let's go up! The network layer introduces the term “routing” and, accordingly, the IP address. By the way, to convert IP addresses to MAC addresses and back, it is used ARP protocol.

It is at this level that traffic routing occurs as such. If we want to go to the site website, then we send, receive a response in the form of an IP address and substitute it into the packet. Yes - yes, if at the second level we use the term frame/frame, as we said earlier, then here we use a package.

Of the devices, His Majesty the Router lives here :)

The process when data is transferred from upper layers to lower ones is called encapsulation data, and when on the contrary, upward, from the first, physical to the seventh, then this process is called decapsulation data
#04: Transport layer

The transport layer, as the name suggests, provides data transmission over the network. There are two main rock stars here - TCP and UDP. The difference is that different transport is used for different categories of traffic. The principle is this:

  • Traffic is sensitive to losses- no problem, TCP (Transmission Control Protocol)! It provides control over data transfer;
  • We'll lose a little - no big deal- in fact, now that you are reading this article, a couple of packages might have been lost. But this is not felt for you as a user. UDP (User Datagram Protocol) is good for you. What if it was telephony? The loss of packets there is critical, since the voice in real time will simply begin to “croak”;
#05: Session layer

Ask any network engineer to explain the session layer to you. It will be difficult for him to do this, infa 100%. The fact is that in everyday work, a network engineer interacts with the first four layers - physical, channel, network and transport. The rest, or the so-called “upper” levels, relate more to the work of software developers :) But we’ll try!

The session layer is responsible for managing connections, or simply put, sessions. He tears them apart. Remember the meme about “ THERE WAS NOT A SINGLE BREAK"? We remember. So, this is the fifth level tried :)

#06 Presentation layer

At the sixth level, conversion of message formats, such as encoding or compression, occurs. JPEG and GIF, for example, live here. The level is also responsible for transmitting the stream to the fourth (transport layer).

#07 Application level

On the seventh floor, at the very tip of the iceberg, lives the application layer! There are network services here that allow us, as end users, to surf the Internet. Look, what protocol do you use to open our knowledge base? That's right, HTTPS. This guy is from the seventh floor. Simple HTTP, FTP and SMTP also live here.

Was this article useful to you?

Please tell me why?

We are sorry that the article was not useful for you: (Please, if it is not difficult, indicate why? We will be very grateful for a detailed answer. Thank you for helping us become better!

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

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

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

chief editor

model

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

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

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

Rice. 1.1. ISO/OSI Open Systems Interconnection Model

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

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

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

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

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

ISO/OSI Model Layer Functions

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

Physical layer functions are implemented in all devices connected to the network. On the computer side, the physical layer functions are performed by the network adapter or serial port.

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

Data Link Layer: The physical layer simply transfers bits. This does not take into account that in some networks in which communication lines are used (shared) alternately by several pairs of interacting computers, the physical transmission medium may be occupied. Therefore, one of the tasks of the link layer is to check the availability of the transmission medium. Another task of the link layer is to implement error detection and correction mechanisms. To do this, at the data link layer, bits are grouped into sets called frames. The link layer ensures that each frame is transmitted correctly by placing a special sequence of bits at the beginning and end of each frame to mark it, and also calculates a checksum by summing all the bytes of the frame in a certain way and adding the checksum to the frame. When the frame arrives, the receiver again calculates the checksum of the received data and compares the result with the checksum from the frame. If they match, the frame is considered correct and accepted. If the checksums do not match, an error is recorded.

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

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

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

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

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

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

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

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

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

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

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

The choice of transport layer service class is determined, on the one hand, by the extent to which the problem of ensuring reliability is solved by the applications and protocols of higher levels than the transport one, and on the other hand, this choice depends on how reliable the entire data transportation system is online. So, for example, if the quality of communication channels is very high, and the likelihood of errors not detected by lower-level protocols is small, then it is reasonable to use one of the lightweight transport layer services that are not burdened with numerous checks, handshaking, and other techniques for increasing reliability. If vehicles are initially very unreliable, then it is advisable to turn to the most developed transport level service, which works using maximum means for detecting and eliminating errors - by first establishing a logical connection, monitoring message delivery using checksums and cyclic numbering of packets, setting delivery timeouts, etc.

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

Session Layer: The session layer provides conversation management to record which party is currently active and also provides synchronization facilities. The latter allow you to insert checkpoints into long transfers so that in case of failure you can go back to the last checkpoint, instead of starting all over again. In practice, few applications use the session layer, and it is rarely implemented.

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

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

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

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

Characteristics of popular communication protocol stacks

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

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

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

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

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

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

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

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

OSI stack

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

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

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


Rice. 1.3. OSI stack

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

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

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

X.400

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

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

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

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

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

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

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

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

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

TCP/IP stack

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

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

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

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

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

Rice. 1.4. TCP/IP stack

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

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

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

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

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

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

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

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

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

IPX/SPX stack

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

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

Rice. 1.5. IPX/SPX stack

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

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

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

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

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

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

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

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

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

NetBIOS/SMB stack

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

Rice. 1.6. NetBIOS/SMB stack

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

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

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

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

Why do we need this valuable knowledge? (editorial)

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

  • troubleshooting (
troubleshooting)

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

  • mutual understanding with colleagues

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

  • learning new technologies

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

Alexander Goryachev, Alexey Niskovsky

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

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

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

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

Physical layer

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

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

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

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

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

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

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

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

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

The considered topologies are most often built using cable connections.

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

Data Link Layer

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

Link layer protocols are defined by:

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

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

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

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

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

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

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

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

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

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

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

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

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

Media access

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

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

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

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

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

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

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

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

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

Examples of such adversarial protocols are:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Network layer

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Transport layer

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

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

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

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

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

Addressing methods

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

  • connection ID;
  • transaction ID.

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

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

Session layer

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

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

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

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

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

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

Data presentation layer

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

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

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

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

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

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

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

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

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

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

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

Application layer

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

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

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

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

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

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

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

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

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

ComputerPress 6"1999

To harmonize the operation of network devices from different manufacturers and ensure the interaction of networks that use different signal propagation environments, a reference model of open systems interaction (OSI) has been created. The reference model is built on a hierarchical principle. Each level provides services to the higher level and uses the services of the lower level.

Data processing begins at the application level. After this, the data passes through all layers of the reference model, and is sent through the physical layer to the communication channel. At reception, reverse processing of the data occurs.

The OSI reference model introduces two concepts: protocol And interface.

A protocol is a set of rules on the basis of which the layers of various open systems interact.

An interface is a set of means and methods of interaction between elements of an open system.

The protocol defines the rules for interaction between modules of the same level in different nodes, and the interface - between modules of adjacent levels in the same node.

There are a total of seven layers of the OSI reference model. It's worth noting that real stacks use fewer layers. For example, the popular TCP/IP uses only four layers. Why is that? We'll explain a little later. Now let’s look at each of the seven levels separately.

OSI Model Layers:

  • Physical level. Determines the type of data transmission medium, the physical and electrical characteristics of the interfaces, and the type of signal. This layer deals with bits of information. Examples of physical layer protocols: Ethernet, ISDN, Wi-Fi.
  • Data link level. Responsible for access to the transmission medium, error correction, and reliable data transmission. At the reception The data received from the physical layer is packed into frames, after which their integrity is checked. If there are no errors, then the data is transferred to the network layer. If there are errors, the frame is discarded and a request for retransmission is generated. The data link layer is divided into two sublayers: MAC (Media Access Control) and LLC (Local Link Control). MAC regulates access to the shared physical medium. LLC provides network layer service. Switches operate at the data link layer. Examples of protocols: Ethernet, PPP.
  • Network layer. Its main tasks are routing - determining the optimal data transmission path, logical addressing of nodes. In addition, this level may be tasked with troubleshooting network problems (ICMP protocol). The network layer works with packets. Examples of protocols: IP, ICMP, IGMP, BGP, OSPF).
  • Transport layer. Designed to deliver data without errors, losses and duplication in the sequence in which they were transmitted. Performs end-to-end control of data transmission from sender to recipient. Examples of protocols: TCP, UDP.
  • Session level. Manages the creation/maintenance/termination of a communication session. Examples of protocols: L2TP, RTCP.
  • Executive level. Converts data into the required form, encryption/encoding, compression.
  • Application layer. Provides interaction between the user and the network. Interacts with client-side applications. Examples of protocols: HTTP, FTP, Telnet, SSH, SNMP.

After getting acquainted with the reference model, let's look at the TCP/IP protocol stack.

There are four layers defined in the TCP/IP model. As can be seen from the figure above, one TCP/IP layer can correspond to several layers of the OSI model.

TCP/IP model levels:

  • Network interface level. Corresponds to the two lower layers of the OSI model: data link and physical. Based on this, it is clear that this level determines the characteristics of the transmission medium (twisted pair, optical fiber, radio), the type of signal, coding method, access to the transmission medium, error correction, physical addressing (MAC addresses). In the TCP/IP model, the Ethrnet protocol and its derivatives (Fast Ethernet, Gigabit Ethernet) operate at this level.
  • Interconnection layer. Corresponds to the network layer of the OSI model. Takes over all its functions: routing, logical addressing (IP addresses). The IP protocol operates at this level.
  • Transport layer. Corresponds to the transport layer of the OSI model. Responsible for delivering packets from source to destination. On this level two protocols are used: TCP and UDP. TCP is more reliable than UDP by creating pre-connection requests for retransmission when errors occur. However, at the same time, TCP is slower than UDP.
  • Application layer. Its main task is to interact with applications and processes on hosts. Examples of protocols: HTTP, FTP, POP3, SNMP, NTP, DNS, DHCP.

Encapsulation is a method of packaging a data packet in which independent packet headers are abstracted from the headers of lower levels by including them in higher levels.

Let's look at specific example. Let's say we want to get from a computer to a website. To do this, our computer must prepare an http request to obtain the resources of the web server on which the site page we need is stored. At the application level, an HTTP header is added to the browser data. Next, at the transport layer, a TCP header is added to our packet, containing the sender and recipient port numbers (port 80 for HTTP). At the network layer, an IP header is generated containing the IP addresses of the sender and recipient. Immediately before transmission, an Ethrnet header is added at the link layer, which contains the physical (MAC addresses) of the sender and recipient. After all these procedures, the packet in the form of bits of information is transmitted over the network. At the reception, the reverse procedure occurs. The web server at each level will check the corresponding header. If the check is successful, the header is discarded and the packet goes to top level. Otherwise, the entire packet is discarded.




Top