• Aucun résultat trouvé

Because it is the most common decomposition of protocol services, a good starting point for discussing communication protocols is the Open Systems Interconnection (OSI) “protocol stack” [DZ83]. In the OSI model, protocols are conceptually

organized as a series of layers, each one built upon its predecessor. Each layer offers a set of services to the higher layers, hiding the details of how the services are implemented. The goal is to present the illusion to layer n on host A that the message exchange takes place atomically via layer

n - 1

to a layer n peer on host B, as shown in Figure 1— 1. In reality, each layer passes data and control information the layer immediately below it, until the lowest (physical) layer is reached. The function of each layer is outlined in Table 1— 1.

Figure 1— 1. OSI Protocol Layers

Two dimensions of abstraction are present in this model: service abstraction and inter-layer communication abstraction. Between each pair of adjacent layers there is an interface that defines the primitive operations and services provided by the lower layer. Usually, a foremost objective is to specify the set of services that each layer offers, while abstracting the details of how these services are provided.

Implicitly with this objective is the desire to limit dependencies between each layer to a set of interface primitives known as service access points (SAPs).

The rationale behind this objective is that it makes it possible, in principle, to replace the implementation of a particular layer with another implementation, requiring only that each implementation provide a consistent interface that offers the same services and service access points to the upper layer. Thus, the goal of service abstraction is modularity and freedom to choose the implementation that is best suited for a particular environment. Detail about inter-layer communication, on the other hand, is usually considered to be a concern that is orthogonal to the design of the protocol.

Layer Number

Layer Name Layer Function

7 Application User functions. For example, file transfer, database query.

6 Presentation Data representation and translation.

5 Session Conversation initiation, coordination, and

breakdown. A session protocol controls which peer can transmit, provides services to synchronize the queue between peers, and defines how Protocol Data Units (PDUs) are related for error recovery.

4 Transport Reliable end-to-end data delivery between peers.

Depending on the quality of service offered by the network layer, transport usually performs error correction and flow control.

3 Network Handles routing between peers, global naming and addressing, fragmentation and re-assembly.

For point-to-point connections, handles framing, station addressing, error control and flow control.

For networks where transmitting stations share a common medium, the protocol governing access to the medium is separated into a sub-layer referred to in the IEEE standards as the media access control (MAC) layer.

1 Physical Electrical and mechanical attributes governing connection to the communication medium.

Table 1— 1. The OSI Service Layers

While this model provides an excellent starting point for conceptually partitioning a set of protocol services, it must be used with care. This model has two implicit assumptions that fail to hold in many practical contexts. First, there is the assumption that cost of abstraction and separation is negligible compared to advantage of being able to interchange layers. Second, there is an assumption that interchanging layers that provide the same logical services – for example, a wired physical layer and a wireless physical layer – provide equivalent service.

Since in wired networks the point-to-point network topology is essentially static, physical-layer channels can be modeled as time-invariant systems and user-to-user interference can be modeled as a stationary random process. Both of these properties provide simple, understandable statistical models for characterizing the probability of errors, justifying abstractions that allow the services provided to be partitioned into orthogonal concerns. For example, a networked file system provides the abstraction that all files reside on a single logical file system, greatly simplifying the design of an application that read and write files using a standard file I/O interface. In turn, the networked file system is simplified if it can assume a black box, reliable packet delivery service from the lower-level network services.

The difficulty in applying this layering approach lies not in defining clean service access points and abstracting lower level functionality; the real difficulty is in separating the semantics of the service primitives. This is a subtle point, and one worth further discussion.

The specification for the widely used ARPA Transmission Control Protocol (TCP), for example, contains no explicit reference to a physical media or to any particular style of implementation. Instead, it is assumed that the implementation has a

the TCP specification focuses solely upon higher level issues such as setting up a connection, maintaining order, and so on. Informally, the SAPs to the lower levels are primitives to send and receive datagrams. TCP maintains its own timer for datagrams that still require an acknowledgement, and since corrupted packets received by lower layers are discarded, TCP has no way of distinguishing between a packet corrupted by bit errors from packets that are lost due to congestion in the network.

TCP has been successfully used with a variety of lower-level media access protocols such as carrier-sense multiple access (CSMA) and token ring, and on a variety of physical media, including wireless, optical fiber, and wired media. Although the TCP specification makes no explicit reference to the characteristics of the lower layers, implicitly in the timeout and retransmission mechanisms there are the assumption that the error rate is low, and that lost packets occur due to network congestion. Accordingly, lost packets trigger a congestion-avoidance mechanism in TCP that reduces the rate at which packets are sent. Thus when TCP is used over a wireless link, a slight change in the packet error rate can mean that the performance drops drastically due to the compounded effect of lost packets and a rate reduction by the sender. An aggregate throughput of 25% of the link capacity is typical of TCP over wireless [BPSK97].

The problem here arises due to misinterpreting the semantics of the event “lost packet.” The appropriate behavior for the protocol depends strongly on the semantics of this event, and misinterpretation leads to behavior that, although it does not violate any safety or liveness properties, severely limits the usefulness of the protocol.