3.2 Services and Protocols

   


Services and protocols were briefly discussed in Section 3.1; they are basic elements of layered communication systems. This section describes the meaning of these two terms and the functionality of services and protocols. These two terms serve as a theoretical basis for further explanations in this book, where we will focus on services and protocols used in real-world systems.

We know from the models described in the previous sections that modern telecommunication systems consist of several layers. Each layer has different purposes (depending on the reference model) and offers services to the next higher layer. For example, the IP layer in the TCP/IP reference model offers the following services: forwarding data units (without guarantees) from a local computer to another computer, specified by its IP address. This service is used by the transport layer (e.g., by TCP) and expanded so that a byte stream can be transmitted free from errors and in the correct order.

We can say that a service describes the set of functions offered to the next higher layer. In addition, a service defines single service elements, used to access the entire range of services. In other words, the service definition defines the extent and type of service and the interface used to call that service. The definition of a service refers only to the interaction between two neighboring layers and the interfaces concerned. The literature describes this often as vertical communication. Exactly how a layer provides its service is not part of the service definition; it only deals with what an implementation has to offer the service user at the interface.

To be able to use the services of a layer, the participating systems have to overcome the spatial separation and coordinate their communication. This is achieved by use of communication protocols, which run by instances of a layer in the communicating systems. A protocol regulates the behavior of the distributed instances and defines rules for their coordination. For example, it defines messages to be exchanged between the instances to regulate distributed handling between these instances. More specifically, a layer, N, provides its service by distributed algorithms in the respective instances of layer N and by exchanging protocol messages about their coordination. (See Figure 3-1.) Coordination between the instances by protocol messages is also called horizontal communication. The service of the lower layer (N ?1) is used to exchange protocol messages.

The specification of a service describes the behavior of a layer versus the next higher layer (vertical communication), but says nothing about how a service is implemented. It merely defines the format and dynamics at the interfaces to the layer that uses the service. A service is rendered by instances of a layer, which use protocols to coordinate themselves (horizontal communication). The protocol specification describes the syntactic and dynamic aspects of a protocol. The protocol syntax describes the format of the protocol data units (PDUs) to be exchanged and the protocol dynamics describe the behavior of the protocol. The goal of this book is to explain how all of these elements can be designed and implemented in a communication system. Using Linux as our example operating system, we will see what the interfaces between the different layers can look like and what design decisions play a role, mainly from the perspective of efficiency and correctness of the protocols. In addition, we will see how different protocols use their instances, to show the technologies used to implement network protocols.

3.2.1 Interplay of Layers, Instances, and Protocols

After our brief introduction to services and protocols in the previous sections, this section describes the horizontal and vertical processes involved when protocol instances provide a service. The description of these processes forms the basis for understanding how network protocols work, mainly the principles of horizontal and vertical communication. The terms introduced earlier will help us better classify and distinguish structures and parameters involved in the interaction of different layers at the interfaces.

Instances are the components offering services within a layer. To offer a service, the instances of a layer communicate (horizontally). This communication is realized by exchanging protocol data units (PDUs) of layer N. However, data is not exchanged directly between the two instances, but indirectly, over the next lower layer. This means that the instance of layer N uses the service of layer (N ?1) to exchange a PDU with its partner instance. Figure 3-4 shows the interplay of layers and the elements involved.

Figure 3-4. Data units for vertical and horizontal communication.

graphics/03fig04.gif


  • Protocol Data Unit (PDU): A PDU is a message exchanged between two instances of a layer to coordinate their behavior. It represents the basic element of horizontal communication. A PDU consists of the following two elements:

    • The Protocol Control Information (PCI) contains control information used to coordinate the two protocol instances and is also called the packet header. A PCI carries protocol-specific data and is created by the sending instance, depending on its state. The information is then evaluated and removed from the PDU in the receiver instance.

    • The Service Data Unit (SDU) contains the payload to be transmitted at the order of the higher-level layer. The SDU of layer N normally consists of the PCI of layer (N + 1) and an SDU of layer (N + 1) (i.e., of the (N + 1) PDU).

    In certain states of a protocol, it can happen that the PDU does not contain any SDU at all (e.g., to establish a connection or in pure acknowledgment packets). In such cases, merely information needed to coordinate the protocols, but no payload, is exchanged.

  • Interface Control Information (ICI) is created by an instance and forwarded to the next lower layer together with a PDU (vertical communication). This information is needed by the service-rendering layer (N ?1) to offer that service. For example, an ICI can contain the address of the partner instance that should receive the (N) PDU. The (N) PDU are pure payload data for layer (N ?1), so that it cannot evaluate the elements of the (N) PCI included in the (N) PDU, but has to rely on the ICI contents.

  • The Interface Data Unit (IDU) of layer (N ?1) is composed of the PDU and the ICI of layer N. The IDU is delivered to layer (N ?1) at the service access point and forms the basis for horizontal communication.

Note that, in the case of a vertical communication between two layers, this communication can take place only in defined service access points (SAPs), serving to distinguish different service users. SAPs are identified by service-access-point addresses, based on the rule that a service access point addresses exactly one service user. The principle of a service access point will come up often in the following chapters in connection with different environments (e.g., IP address for IP, ports for TCP, etc.).

The further course of this book will show how the dynamic aspects of a network protocol can be implemented (i.e., which programming elements there are and how they can be used in Linux. In addition, we will introduce interfaces and data structures of different instances and explain which parameters play a role as interface control information for different protocols. In this connection, we will explain that the theoretical model of a communication instance described above and the strict separation of the individual layers have to be given up if we want to achieve better performance of the entire protocol stack. When compared with a standard telecommunication work (e.g., [Tane97]), this book deals not only with the specification of protocols and their horizontal communication, but also with vertical communication and implementation aspects of different network protocols.


       


    Linux Network Architecture
    Linux Network Architecture
    ISBN: 131777203
    EAN: N/A
    Year: 2004
    Pages: 187

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net