The OSI Reference Model
At all levels of communication carried out between the computer systems and network facilities of different trading partners, there is a need for some form of standardisation, allowing different systems to communicate with each other, no matter what hardware they are using.
This requirement was met by the joint collaboration of the ISO (International Standards Organisation) and the CCITT (Consultative Committee for International Telegraph and Telephone), which produced a hierarchical model known as the OSI (Open Systems Interconnection) seven-layer model.
The seven layers are:
- Level 7 Application Layer
- Level 6 Presentation Layer
- Level 5 Session Layer
- Level 4 Transport Layer
- Level 3 Network Layer
- Level 2 Data Link Layer
- Level 1 Physical Layer
Each layer performs a set of self-contained functions which contribute to the communications process and so have been logically grouped in this way. The lower levels in the model are closely linked to the physical electronics involved in sending and receiving data. The higher levels are linked more closely to the front-end application program used by the operator either to enter the data or to interpret it once it is received.
Layer Description
The 7 layers of the model can be divided into two groups:
The network-dependent group covers the first three layers (1 – 3). These share the common feature of dealing with protocols associated with the data communications network that physically links two or more computer systems together.
The second group covers levels 4 to 7. These deal with the applications of a user’s system. They provide protocols which allow two end-user application processes to interact with one another.
The Transport Layer provides the pivot point for the whole model. It acts as an interface between the two groups of layers building on the network services provided by the lower three layers and making these available to the upper three application layers.
- User information creates the data (layers 5 – 7).
- Data is converted to segments (layer 4)
- Segments are converted to packets or datagrams (layer 3)
- Packets, or datagrams, are converted to frames (layer 2)
- Frames are converted to bits (layer 1)
Each level is defined by a protocol so that it is compatible with the corresponding layer (its peer layer) in another remote system with which it communicates.
Conceptually, two corresponding layers of two separate systems are able to communicate because they share the same protocol. In reality, each layer does not communicate directly with the same layer of another system. It relies on the level below it and provides services for the one above.
The result is that data is actually passed from the applications layer of one system down through the other levels to the physical layer where it is sent to the physical level of the intended receiver. The data is then passed up through the hierarchy of layers to the application level of the receiver’s system. This is illustrated by the diagram above and explained in the section below.
Worked example
The information exchange process occurs between peer OSI layers. Each layer in the source system adds control information to data, and each layer in the destination system analyses and removes the control information from that data.
If System A has data from a software application to send to System B, the data is passed to the application layer. The application layer in System A then communicates any control information required by the application layer in System B by prefixing a header to the data.
The resulting information unit (a header and the data) is passed to the presentation layer, which prefixes its own header containing control information intended for the presentation layer in System B. The information unit grows in size as each layer prefixes its own header (and, in some cases, a trailer) that contains control information to be used by its peer layer in System B.
At the physical layer, the entire information unit is placed onto the network medium. The physical layer in System B receives the information unit and passes it to the data link layer. The data link layer in System B then reads the control information contained in the header prefixed by the data link layer in System A. The header is then removed, and the remainder of the information unit is passed to the network layer.
Each layer performs the same actions: The layer reads the header from its peer layer, strips it off, and passes the remaining information unit to the next highest layer. After the application layer performs these actions, the data is passed to the recipient software application in System B, in exactly the form in which it was transmitted by the application in System A.
The seven layers
Each of the seven layers is described below.
Level 7 The Application Layer
The Application layer is the layer closest to the end user. This layer interacts with software applications that implement a communications component. This layer provides services such as the identification of the intended communication partners, determination of current availability of network resources and intended communications partner, establishing authority to communicate, agreement on privacy (encryption) mechanisms, and identification of constraints on data syntax.
Level 6 The Presentation Layer
The Presentation layer deals with data translation, compression and encryption. It’s main purpose is to define data formats, such as ASCII, EBCDIC, binary and JPEG. For example, FTP allows you to specify a binary or ASCII transfer. If binary is chosen, the sender and receiver do not modify the contents of the file. If ASCII is chosen, the sender first translates the text into ASCII format before sending. On receipt, the receiver translates the text back from ASCII to the character set being used on the receiving computer.
Level 5 The Session Layer
The Session layer defines how to start, control and end electronic “conversations”, known as sessions. It’s responsibilities include checkpointing, which allows the application to be notified if only part of a series of messages is successfully transmitted. For example, an ATM transaction, in which you take cash from your account, should not debit the account and fail before paying out the cash and then record the transaction even though you did not receive the money.
Level 4 The Transport Layer
The Transport layer accepts data from the Session layer and segments the data for transport across the network. It is responsible for ensuring the data is delivered without errors and in the correct sequence. This level also provides acknowledgements of successful transmissions. At this level, data is held in information units known as segments.
Typical Transport layer functions include flow control, and error checking and recovery. Flow control manages data transmission between devices so that the transmitting device does not send more data than the receiving device can process. Error checking involves the creation of various mechanisms for detecting transmission errors, while error recovery involves taking actions, such as requesting that data be re-transmitted, to resolve any errors that occur.
Level 3 The Network Layer
The Network layer defines the network address of the destination system, which differs from the physical address defined in the Data Link layer. It is responsible for addressing, determining routes for sending data packets (the data format at this level), and managing network problems such as packet switching, data congestion and routing. Because this layer defines the logical network layout, routers can use this layer to determine how to forward data packets.
Level 2 The Data Link Layer
The Data Link layer provides reliable transit of data across a physical network link and defines the methods used to transmit and receive data on the network. Different Data Link layer specifications define different network and protocol characteristics, including physical addressing, network topology, error notification, sequencing of frames (the data format at this level), and flow control.
Physical addressing (as opposed to network addressing) defines how devices are addressed at the Data Link layer. The Data Link layer also defines the network topology being used, which describes how devices are to be physically connected, such as in a bus or a ring topology. Error notification alerts upper-layer protocols that a transmission error has occurred, and the sequencing of data frames re-orders frames that are transmitted out of sequence. Finally, flow control moderates the transmission of data so that the receiving device is not overwhelmed with more traffic than it can handle at one time.
Level 1 The Physical Layer
The Physical layer defines such things as cables, network interface cards and connectors, and characteristics such as voltage levels and data rates. This level, where the data is in bit format, deals with the physical and electrical interface between the user’s system and the network.