Better to know some
... than all
The OSI Model
The International Standards Organization (ISO) has developed a reference model for network design called the Open Systems Interconnection (OSI). It proposes a seven-layer architecture for networks. Each layer is characterized by a set of standard protocols which specify its behavior.
These seven layers represent the protocol architecture for the communications component of a host. The nodes in a network implement only the lower three layers. The reason for this is that the upper four layers are irrelevant to the task of communication between the nodes. Although actual communication takes place only at the physical layer, it is often useful to think of virtual communication between corresponding layers. For example, we can use an imaginary line of communication between the presentation layer on host A and the same layer on host B. This would be characterized by the Presentation Protocol
The terms protocol and layer are often used interchangeably. This is harmless but not entirely accurate. Strictly speaking, protocol refers to the rules and conventions that the functions of a layer should conform to. Layer refers to a set of services and functions and their realization in hardware or software. A layer is therefore characterized by its protocol. A set of network layers is also commonly referred to as a protocol stack.
Each of the seven layers of the OSI model hides the implementation details of the lower layers from the upper layers. Well-defined protocols and interfaces for each of the layers make it possible for the layer to be designed and implemented in isolation from the other layers. Except for the physical layer, which is implemented in hardware, all other layers are implemented in software. For example, each of these layers may be implemented as a set of routines which communicate with the layer above and the layer below it via parameters passed in function calls. Alternatively, each layer may be implemented as a task (in a multi-tasking environment) which communicates with other tasks by message passing.
For house-keeping purposes, each layer adds an additional piece of information to the message it is transmitting. The same layer removes the additional piece of information on the receiving end. The additional information appears in form of a header (e.g., TH = Transport Header). The data link layer adds a header as well as a trailer to its data.
Each of the seven layers of the OSI model is described below in more detail. Subsequent chapters examine the layers in greater depth and discuss their main protocols. It should be pointed out that the OSI model is not the only model in use. It is, however, the most-widely respected model and has become a standard benchmark for comparing other network architectures against.
The Physical Layer
The physical layer is concerned with the transmission of raw data bits over communication lines. Physical layer standards and protocols are concerned with issues such as the following:
*How a physical circuit is established between communicating devices.
* How the circuit is terminated when no longer needed.
* The physical form (e.g., voltages, frequencies, timing) in which data bits (binary values 0 and 1) are represented.
* Whether transmission of data can take place in one or both directions over the same physical connection.
* Characteristics of the physical media that carry the signals (e.g., copper wire, optical fiber, radio waves).
* Characteristics of the connectors used for connecting the physical media.
* How data from a number of sources should be multiplexed before transmission and demultiplexed upon arrival, and the type of multiplexing technique to be used.
* The type of modulation to be used for transmitting digital data over analog transmission lines.
The physical layer accounts for much of the tangible components of a network, including cables, satellites, earth stations, repeaters, multiplexers, concentrators, and modems. Physical layer protocols and standards are of mechanical, electrical, functional, and procedural nature.
The physical layer hides the above details from the higher layers. To the data link layer, it appears as a logical communication channel which can send a stream of bits from one point in the network to another (but not necessarily reliably).
The Data Link Layer
The data link layer is concerned with the reliable transfer of data over the communication channel provided by the physical layer. To do this, the data link layer breaks the data into data frames, transmits the frames sequentially over the channel, and checks for transmission errors by requiring the receiving end to send back acknowledgment frames. Data link protocols are concerned with the following issues:
* How to divide the data into frames.
* How to delimit frames by adding special bit patterns to the beginning and end of each frame. This allows the receiving end to detect where each frame begins and where it ends.
* Error detection. Some form of error check is included in the frame header. This is constructed by the transmitting end based on the contents of the frame, and checked for integrity by the receiving end. A change in the frame bits can be detected in this way.
* Error correction. When a frame arrives corrupted or is for any reason lost in the network, it is retransmitted. Lost acknowledgment frames may result in duplicate frames, which need to be detected and corrected as well.
* Flow control. In general, not all communication devices in a network operate at the same speed. Flow control provides a means of avoiding a slow receiver from being swamped by data from a fast transmitter.
The data link layer hides the above details from the higher layers. To the network layer, it appears as a reliable communication channel which can send and receive data packets as frames.
The Network Layer
The network layer is concerned with the routing of data across the network from one end to another. To do this, the network layer converts the data into packets and ensures that the packets are delivered to their final destination, where they can be converted back into the original data. Network layer protocols are concerned with the following issues:
* The interface between a host and the network.
* The interface between two hosts across the network.
* Routing of packets across the network, including the allocation of a route and handling of congestion.
* Correct ordering of packets to reflect the original order of data.
* Collection of statistical information (e.g., number of transmitted packets) for performance measurement and accounting purposes.
* Internetworking: communication between two or more networks.
The network layer hides the above details from the higher layers. To the transport layer, it appears as a uniform data transfer service, regardless of the location of the communicating devices and how they are connected.
The Transport Layer
The aim of the transport layer is to isolate the upper three layers from the network, so that any changes to the network equipment technology will be confined to the lower three layers (i.e., at the node level). Transport layer protocols are concerned with the following issues:
* Establishment and termination of host-to-host connections.
* Efficient and cost-effective delivery of data across the network from one host to another.
* Multiplexing of data, if necessary, to improve use of network bandwidth, and demultiplexing at the other end.
* Splitting of data across multiple network connections, if necessary, to improve throughput, and recombining at the other end.
* Flow control between hosts.
* Addressing of messages to their corresponding connections. The address information appears as a part of the message header.
* Type of service to be provided to the session layer (e.g., error-free versus errorprone connections, whether messages should be delivered in the order received or not).
The transport layer hides the above details from the higher layers. To the session layer, it appears as a customized data transfer service between two hosts, isolating the underlying network technology from it.
The Session Layer
The session layer provides a structured means for data exchange between user processes on communicating hosts. Session layer protocols are concerned with the following issues:
* Negotiating the establishment of a connection (a session) between user processes on communicating hosts, and its subsequent termination. This includes the setting of various communication parameters for the session (e.g., synchronization and control).
* Correct ordering of messages when this function is not performed by the transport layer.
* Recovery from interrupted transport connections, if necessary.
* Grouping of messages into a larger message, if necessary, so that the larger message becomes available at the destination only when its constituent messages have all been delivered successfully.
The session layer hides the above details from the higher layers. To the presentation layer, it appears as an organized communication service between user processes.
The Presentation Layer
The presentation layer provides a mutually-agreeable binary representation of the application data communicated between two user processes. Since there are many ways of encoding application data (e.g., integers, text) into binary data, agreement on a common representation is necessary. Presentation layer protocols are concerned with issues such as the following:
* Abstract representation of application data.
* Binary representation of application data.
* Conversion between the binary representation of application data and a common format for transmission between peer applications.
* Data compression to better utilize network bandwidth.
* Data encryption as a security measure.
The presentation layer hides the above details from the higher layers. To the application layer, it appears as a universal communication service between user processes, regardless of their system-specific idiosyncrasies, allowing them to converse in a common syntax.
The Application Layer
The application layer is concerned with the semantics of data, i.e., what the data means to applications. The application layer provides standards for supporting a variety of application-independent services. Examples include:
* Virtual terminal standards to allow applications to communicate with different types of terminals in a device-independent manner.
* Message handling system standards used for electronic mail.
* File transfer, access, and management standards for exchanging files or parts thereof between different systems.
* Transaction processing standards to allow different companies with different systems to access each other's on-line databases (e.g., in banking and airline reservation).
* On-line directory standards for storing details of individuals, organizations, and network components.
* Standards for exchanging formatted documents.
Application layer standards have paved the way for open software systems, in which data can be communicated between incompatible base systems (i.e., different hardware and software architectures) without loss of meaning or usefulness.