What is the network layer. Network layers

subset, and then only with certain reservations). Below in fig. 12.1 shows a diagram of these levels, on the right are the codes of documents of the International Telecommunication Union (ITU), which regulate the protocols of the corresponding levels.


Rice. 12.1.

The division of the set (stack) of network protocols into levels is associated with an attempt to unify hardware and software. It is assumed that each of the levels corresponds to a certain functional program with hard-coded input and output interfaces. The data formats at a given model level for sender and receiver must be identical. Physical layer LANs are defined by documents, such as Ethernet II, IEEE 802.3, etc. The ISO models are most closely aligned with the X.25 network, although this protocol is now obsolete.

Physical layer X.25 defines a standard for communication between computers and network switches (X.21), as well as procedures for exchanging packets between computers. X.21 characterizes some aspects of building public data networks. It should be taken into account that the X.25 standard appeared before the ITU-T recommendations and the experience of its application was taken into account when compiling the latest recommendations. At the physical layer, X.21bis, RS232, Ethernet or V.35 protocols can also be used.

Link layer determines how information is transmitted from the computer to the packet switch (HDLC - High Data Link Communication, bit-oriented control procedure), errors that occur at the physical layer are corrected at this level.

network layer defines the interaction of various parts of the subnet, packet formats, packet retransmission procedures, standardizes the addressing and routing scheme.

transport layer defines the reliability of data transfer according to the "point-to-point" scheme, relieves the session layer from the concerns of ensuring reliable and efficient data transfer.

Session level describes how protocol software should arrange for the enforcement of any application programs. Organizes two-way interaction of network objects and the necessary synchronization of procedures.

Presentation level provides application layer standard services (compression of information, support for ASN .1 (Abstract Syntax Notation 1) control protocols, etc.).

Application layer- this is all that users of networks, such as X.400, may need.

The international standard defines two types of frames in the HDLC procedure:



Rice. 12.2.

Flag F = 01111110 sets the frame boundaries, FCS - check sum. Field information can be variable length multiple of eight bits. Three classes of frames are defined for HDLC: informational (I), control (S - supervisory) and unnumbered (U - unnumbered). Field Format control I-frame is shown in fig. 12.3.



Rice. 12.3.

N(S) and N(R) are frame number fields, N(S) is the current frame number, and N(R) is the next frame number that the sender of the current frame expects to receive. An error occurs if the expected and received numbers do not match. If frame numbering is used modulo 8, then the maximum number of unacknowledged frames cannot exceed 7, and the size of the N(S) and N(R) fields is three bits. This is also true for S-frames. I-, S-, and U-frames can have regular (one byte) and extended (2 bytes) formats. The least significant bit (1) is on the left. Field P/F- flag "polling/end of polling". The information (I) frame contains the field information(see fig. 12.2). The S-frame format is shown in fig. 12.4.



Rice. 12.4.

For the one-byte version of the S-frame, the S field is immediately followed by the P/F field. Field S defines the type of control frame (see

wave resistance other. At the same level, the characteristics electrical signals, transmitting discrete information, such as the steepness of the fronts of the pulses, the voltage or current levels of the transmitted signal, the type of coding, the signal transmission rate. In addition, the types of connectors and the purpose of each pin are standardized here.

Physical layer:

  • bit transfer over physical channels ;
  • formation electrical signals ;
  • information encoding;
  • synchronization ;
  • modulation .

Implemented in hardware.

Functions physical layer implemented in all devices connected to the network. Computer Side Functions physical layer performed network adapter or serial port.

Protocol example physical layer may serve as the 10Base-T specification for Ethernet technology, which defines unshielded cable as the cable used. twisted pair category 3 with 100 ohm impedance, RJ-45 connector, maximum physical segment length 100 meters, Manchester code to represent data in a cable, as well as some other characteristics of the environment and electrical signals.

Link layer

On physical level bits are simply sent. This does not take into account that in those networks in which communication lines are used (shared) alternately by several pairs of interacting computers, the physical transmission medium may be busy. Therefore, one of the tasks link layer (Data Link layer ) is a check medium availability. Another task link layer- implementation of mechanisms error detection and correction. For this on link layer bits are grouped into sets called personnel ( frames). Link layer ensures the correct transmission of each frame by placing a special bit sequence at the beginning and end of each frame to highlight it, and also calculates checksum, processing all bytes of the frame in a certain way, and adds checksum to the frame . When a frame arrives over the network, the receiver again calculates checksum received data and compares the result with checksum from the frame. If they match, the frame is considered valid and accepted. If checksums do not match, an error is thrown. Link layer can not only detect errors, but also correct them by retransmitting corrupted frames. It should be noted that the error correction function for link layer is optional, so some protocols of this layer do not have it, such as Ethernet and frame relay .

Link Layer Functions

Reliable package delivery :

  1. Between two neighboring stations in a network with arbitrary topology.
  2. Between any stations in a network with a typical topology:
    • availability check shared environment;
    • selection of frames from the data stream coming over the network; framing when sending data ;
    • counting and checking checksum.

Implemented in hardware and software.

In the protocols link layer used in local networks, a certain structure of connections between computers and ways of addressing them are laid down. Though link layer and ensures the delivery of the frame between any two nodes of the local network, it does this only in a network with a certain connection topology, exactly the topology for which it was designed. To such typical topologies supported by protocols link layer local networks include "common bus", "ring" and "star", as well as the structures derived from them using bridges and switches. Protocol examples link layer are Ethernet, Token Ring, FDDI, 100VG-AnyLAN protocols.

In local area networks, protocols link layer used by computers, bridges, switches and routers. Functions in computers link layer implemented jointly network adapters and their drivers.

In WANs, which rarely have a regular topology, link layer often provides message exchange only between two neighboring computers connected by an individual communication line. Examples of point-to-point protocols (as such protocols are often called) are the widely used PPP and LAP-B protocols. In such cases, network layer facilities are used to deliver messages between end nodes across the entire network. This is how X.25 networks are organized. Sometimes in global networks, functions link layer it is difficult to single out in its pure form, since in the same protocol they are combined with network layer functions. Examples of this approach are ATM and frame relay technology protocols.

Generally link layer is a very powerful set of functions for forwarding messages between network nodes. In some cases, protocols link layer turn out to be self-sufficient vehicles, and then application layer protocols or applications can work directly on top of them, without involving the means of the network and transport layers. For example, there is an implementation control protocol SNMP network directly over Ethernet, although by default this protocol runs over network protocol IP and UDP transport protocol. Naturally, the use of such an implementation will be limited - it is not suitable for composite networks of different technologies, such as Ethernet and X.25, and even for a network in which Ethernet is used in all segments, but loop-like connections exist between segments. But in a two-segment bridged Ethernet network, the implementation of SNMP over link layer will be fully functional.

However, in order to ensure quality transportation messages in networks of any topologies and technologies of functions link layer is not enough, so

The Physical layer deals with the transmission of bits over physical links such as coaxial cable, twisted pair, fiber optic cable, or digital territorial circuit. This level is related to the characteristics of physical data transmission media, such as bandwidth, noise immunity, wave impedance, and others. At the same level, the characteristics of electrical signals transmitting discrete information are determined, such as the steepness of the pulse fronts, the voltage or current levels of the transmitted signal, the type of coding, and the signal transmission rate. In addition, the types of connectors and the purpose of each pin are standardized here.

Physical layer:

    transmission of bits over physical channels;

    generation of electrical signals;

    information encoding;

    synchronization;

    modulation.

Implemented in hardware.

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

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

    1. Link layer

At the physical layer, bits are simply sent. This does not take into account that in those networks in which communication lines are used (shared) alternately by several pairs of interacting computers, the physical transmission medium may be busy. Therefore, one of the tasks of the data link layer (Data Link layer) is to check the availability of the transmission medium. Another task of the link layer is the implementation of error detection and correction mechanisms. To do this, at the data link layer, bits are grouped into sets called frames. The link layer ensures the correct transmission of each frame by placing a special bit sequence at the beginning and end of each frame to highlight it, and also calculates the checksum by processing all the bytes of the frame in a certain way, and adds a checksum to the frame.

Link Layer Functions

Reliable package delivery:

    Between two neighboring stations in a network with arbitrary topology.

    Between any stations in a network with a typical topology:

    checking the availability of a shared environment;

    selection of frames from the data stream coming over the network; framing when sending data;

    calculation and verification of the checksum.

Implemented in hardware and software.

    1. network layer

Network layer (Network layer) serves to form a single transport system that combines several networks, and these networks can use different principles of message transmission between end nodes and have an arbitrary structure of connections.

Inside the network, data delivery is provided by the corresponding link layer, but data delivery between networks is handled by the network layer, which supports the ability to correctly select the message transmission route even when the structure of connections between the constituent networks is different from that adopted in link layer protocols.

Networks are interconnected by special devices called routers. A router is a device that collects information about the topology of internet connections and forwards network layer packets to the destination network. To transfer a message from a sender located in one network to a recipient located in another network, you need to make a certain number of transit transmissions between networks, or hops (from the word hop - jump), each time choosing the appropriate route. Thus, a route is a sequence of routers through which a packet passes.

Network layer - packet delivery:

    between any two network nodes with arbitrary topology;

    between any two networks in a composite network;

    network - a set of computers that use a single network technology to exchange data;

    route - the sequence in which a packet traverses routers in a composite network.

    1. transport layer

On the way from the sender to the recipient, packets can be corrupted or lost. While some applications have their own error handling, there are some that prefer to deal with a reliable connection right away. The transport layer (Transport layer) provides applications or upper layers of the stack - application and session - data transfer 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 differ in the quality of the services provided: urgency, the ability to restore interrupted communications, the availability of multiplexing facilities for 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 the class of service of the transport layer is determined, on the one hand, by the extent to which the task of ensuring reliability is solved by the applications themselves and protocols of higher levels than the transport one, and on the other hand, it depends on how reliable the data transportation system in the network is, provided by the levels located below the transport - network, channel and physical. Transport layer - ensuring the delivery of information with the required quality between any network nodes:

    splitting the session-level message into packets, their numbering;

    buffering of received packets;

    ordering of arriving packets;

    application process addressing;

    flow control.

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

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

      1. session layer

Session layer (Session layer) provides control of the dialogue: fixes which of the parties is active at the moment, provides a means of synchronization. The latter allow you to insert checkpoints into long transfers so that in case of a failure you can go back to the last checkpoint, rather than start all over again. In practice, few applications use the session layer, and it is rarely implemented as separate protocols, although the functions of this layer are often combined with those of the application layer and implemented in a single protocol.

Session layer - managing the dialog of application layer objects:

    setting the message exchange method (full-duplex or half-duplex);

    messaging synchronization;

    organization of "control points" of the dialogue.

    1. Representative level

The presentation layer deals with the form of presentation of information transmitted over the network without changing its content. Due to the presentation layer, the information transmitted by the application layer of one system is always understood by the application layer of another system. With the help of this layer, application layer protocols can overcome syntactic differences in data representation or differences in character codes, such as ASCII and EBCDIC codes. At this level, encryption and decryption of data can be performed, thanks to which the secrecy of data exchange is ensured immediately for all application services. An example of such a protocol is the Secure Socket Layer (SSL) protocol, which provides secure messaging for the application layer protocols of the TCP/IP stack.

Presentation layer - coordinates the presentation (syntax) of data when two application processes interact:

    data conversion from external format to the inner;

    encryption and decryption of data.

    1. Application layer

The Application layer is really just a collection of various protocols that enable network users to access shared resources such as files, printers, or hypertext Web pages, and to collaborate, such as through the email protocol. The unit of data that the application layer operates on is usually called a message.

Application layer - a set of all network services that the system provides to the end user:

    identification, verification of access rights;

    print and file service, mail, remote access...

There are many different application layer services. Here are just a few of the most common implementations of file services as an example: NCP in the Novell NetWare operating system, SMB in Microsoft Windows NT, NFS, FTP and TFTP, which are part of the TCP/IP stack.