Technology blog::Life hacks::Linux::Hardware::Gaming

The OSI 7 Layer Model

By , 8th August 2002 in Hardware

The OSI 7 Layer Model is a solution to the chaotic early development of LANs, MANs, and WANs from the early 1980's which saw tremendous increases in the numbers and sizes of networks.

The early development of LANs, MANs, and WANs was chaotic in many ways. The early 1980's saw tremendous increases in the numbers and sizes of networks. As companies realized the money they could save and the productivity they could gain by using networking technology, they added networks and expanded existing networks almost as rapidly as new network technologies and products could be introduced.

By the mid 1980's, these companies began to experience growing pains from all the expansions they had made. It became harder for networks that used different specifications and implementations to communicate with each other. They realized that they needed to move away from proprietary networking systems.

To address the problem of networks being incompatible and unable to communicate with each other, the International Organization for Standardization (ISO) researched network schemes like DECNET, SNA, and TCP/IP in order to find a set of rules. As a result of this research, the ISO created a network model that would help vendors create networks that would be compatible with, and operate with, other networks.

The OSI reference model, released in 1984, was the descriptive scheme they created. It provided vendors with a set of standards that ensured greater compatibility and interoperability between the various types of network technologies that were produced by the many companies around the world.

The OSI model is the primary model for network communications. Although there are other models in existence, most network vendors, today, relate their products to the OSI model, especially when they want to educate users on the use of their products. They consider it the best tool available for teaching people about sending and receiving data on a network.

The OSI model allows you to view the network functions that occur at each layer. More importantly, the OSI model is a framework that you can use to understand how information travels throughout a network. In addition, you can use the OSI model to visualize how information, or data packets, travels from application programs (e.g. spreadsheets, documents, etc.), through a network medium (e.g. wires, etc.), to another application program that is located in another computer on a network, even if the sender and receiver have different types of network media.

In the OSI model, there are seven numbered layers, each of which illustrates a particular network function. This separation of networking functions is called layering. Dividing the network into these seven layers provides the following advantages:

  1. It breaks network communication into smaller, simpler parts.
  2. It standardizes network components to allow multiple-vendor development and support.
  3. It allows different types of network hardware and software to communicate with each other.
  4. It prevents changes in one layer from affecting the other layers, so that they can develop more quickly.
  5. It breaks network communication into smaller parts to make learning it easier to understand.

The problem of moving information between computers is divided into seven smaller and more manageable problems in the OSI model. Each of the seven smaller problems is represented by its own layer in the model. The seven layers of the OSI model are:

Layer 7: The Application Layer
Layer 6: The Presentation Layer
Layer 5: The Session Layer
Layer 4: The Transport Layer
Layer 3: The Network Layer
Layer 2: The Data link Layer
Layer 1: The Physical Layer

These layers can be split into two groups - Host Layers and Media Layers. The diagram below illustrates how the layers communicate with each other, and what protocols are active upon each layer.

Communication in the OSI Model
Communication in the OSI Model

Application Layer

The Application Layer contains a variety of protocols that are commonly needed. For example, there are hundreds of incompatible terminal types in the world. Consider the plight of a full screen editor that is supposed to work over a network with many different terminal types, each with different screen layouts, escape sequences for inserting and deleting text, moving the cursor, etc.

Presentation Layer

The Presentation Layer performs certain functions that are requested sufficiently often to warrant finding a general solution for them, rather than letting each user solve the problems. In particular, unlike all the lower layers, which are just interested in moving bits reliably from here to there, the presentation layer is concerned with the syntax and semantics of the information transmitted.

A typical example of a presentation service is encoding data in a standard, agreed upon way. Most user programs do not exchange random binary bit strings. They exchange things such as people's names, dates, amounts of money, and invoices. These items are represented as character strings, integers, floating point numbers, and data structures composed of several simpler items. Different computers have different codes for representing character strings, integers and so on. In order to make it possible for computers with different representation to communicate, the data structures to be exchanged can be defined in an abstract way, along with a standard encoding to be used "on the wire". The job of managing these abstract data structures and converting from the representation used inside the computer to the network standard representation is handled by the presentation layer.

The Presentation Layer is also concerned with other aspects of information representation. For example, data compression can be used here to reduce the number of bits that have to be transmitted and cryptography is frequently required for privacy and authentication.

Session Layer

The Session Layer allows users on different machines to establish sessions between them. A session allows ordinary data transport, as does the transport layer, but it also provides some enhanced services useful in some applications. A session might be used to allow a user to log into a remote time-sharing system or to transfer a file between two machines.

One of the services of the session layer is to manage dialogue control. Sessions can allow traffic to go in both directions at the same time, or in only one direction at a time. If traffic can only go one way at a time, the session layer can help keep track of whose turn it is.

Another session service is synchronization. Consider the problems that might occur when trying to do a two-hour file transfer between two machines on a network with a 1 hour mean time between crashes. After each transfer was aborted, the whole transfer would have to start over again, and would probably fail again with the next network crash. To eliminate this problem, the session layer provides a way to insert checkpoints into the data stream, so that after a crash, only the data after the last checkpoint has to be repeated.

Transport Layer

The basic function of the Transport Layer, is to accept data from the session layer, split it up into smaller units if need be, pass these to the network layer, and ensure that the pieces all arrive correctly at the other end. Furthermore, all this must be done efficiently, and in a way that isolates the session layer from the inevitable changes in the hardware technology.

Under normal conditions, the Transport Layer creates a distinct network connection for each transport connection required by the session layer. If the transport connection requires a high throughput, however, the transport layer might create multiple network connections, dividing the data among the network connections to improve throughput. On the other hand, if creating or maintaining a network connection is expensive, the transport layer might multiplex several transport connections onto the same network connection to reduce the cost. In all cases, the transport layer is required to make the multiplexing transparent to the session layer.

The Transport Layer also determines what type of service to provide to the session layer, and ultimately, the users of the network. The most popular type of transport connection is an error-free point-to-point channel that delivers messages in the order in which they were sent. However, other possible kinds of transport, service and transport isolated messages with no guarantee about the order of delivery, and broadcasting of messages to multiple destinations. The type of service is determined when the connection is established.

The Transport Layer is a true source-to-destination or end-to-end layer. In other words, a program on the source machine carries on a conversation with a similar program on the destination machine, using the message headers and control messages.

Network Layer

The Network Layer is concerned with controlling the operation of the subnet. A key design issue is determining how packets are routed from source to destination. Routes could be based on static tables that are "wired into" the network and rarely changed. They could also be determined at the start of each conversation, for example a terminal session. Finally, they could be highly dynamic, being determined anew for each packet, to reflect the current network load.

Data Link Layer

The main task of the Data Link Layer is to take a raw transmission facility and transform it into a line that appears free of transmission errors in the network layer. It accomplishes this task by having the sender break the input data up into data frames (typically a few hundred bytes), transmit the frames sequentially, and process the acknowledgement frames sent back by the receiver. Since the physical layer merely accepts and transmits a stream of bits without any regard to meaning of structure, it is up to the data link layer to create and recognize frame boundaries. This can be accomplished by attaching special bit patterns to the beginning and end of the frame. If there is a chance that these bit patterns might occur in the data, special care must be taken to avoid confusion.

The Physical Later

The Physical Later is concerned with transmitting raw bits over a communication channel. The design issues have to do with making sure that when one side sends a 1 bit, it is received by the other side as a 1 bit, not as a 0 bit. Typical questions here are how many volts should be used to represent a 1 and how many for a 0, how many microseconds a bit lasts, whether transmission may proceed simultaneously in both directions, how the initial connection is established and how it is torn down when both sides are finished, and how many pins the network connector has and what each pin is used for. The design issues here deal largely with mechanical, electrical, and procedural interfaces, and the physical transmission medium, which lies below the physical layer. Physical layer design can properly be considered to be within the domain of the electrical engineer.

Further Reading

There are no comments for this post. Be the first!

Leave a Reply

Your email address will not be published.