OSI (Open Systems Interconnection)-model

Before we talk about the OSI model, we have to know the difference between a protocol model and a reference model.

Basically, a protocol model closely fits the structure of a given protocol set. The hierarchically interconnected protocols in a protocol set usually represent all the functions of the interface between the human network and the data network. The TCP/IP model is a protocol model, because it describes the functions of all layers of protocols in the TCP/IP protocol suite.

A reference model provides the consistency across all types of the network protocols and services by describing what needs to be done, but it does not prescribe how it should be done. The reference model is not intended to be an implementation specification or to specify the services of the network architecture in sufficent detail. The primary purpose of the reference model is to help you better understand the functions and the processes involved.

The OSI-model is the best-known network reference model. The development of the model began in 1977 by ISO (International Organization for Standardization) and finished in 1984. It consist of 7 layers and nowadays it is used in the design of data networks, for operational planning and for troubleshooting.

Technically, the OSI model is divided into two layers: upper layers and lower layers.

  • The upper layer of the OSI model mainly deals with the application related issues. The application layer is closest to the end user. Both the end user and the application layer interact with the software applications. An upper layer refers to the layer just above another layer.
  • The lower layer of the OSI model deals with the data transport issues. The data link layer and the physical layer are implemented in hardware and software. The physical layer is the lowest layer of the OSI model and is closest to the physical medium. The physical layer is mainly responsible for placing the information on the physical medium.

The role of the OSI layers

Physical Layer (1.)

The lowest layer of the OSI reference model is the physical layer. The physical layer protocols describes the mechanical, electronical, functional and procedural means for activating, maintaining and deactivating the physical connections required to transfer bits to and from a network device.
This layer contains all the information in the form of bits and responsible for transmitting these bits from one node to another. When data are received, this layer will get the signal received and convert it into 0s and 1s and send them to the data link layer for to put the frame back together.

Functions of the Physical layer:

  • Provides the synchronization of the bits by providing a clock which controls both the sender and the receiver therefore providing bit level synchronization
  • Defines the transmission rate(number of bit per seconds)
  • Specifies how the different devices are arranged in a network topology like star, bus or mesh
  • Defines the way of dataflow between two connected devices which can be simplex, half-duplex or full-duplex transmission mode

Data link layer (2.)

The protocols of the data-link layer describes the methots of exchanging data frames between end devices on a general media. Essentially, it receives the Layer 3 packets, puts them in a frame and forward them between nodes. Moreover it controls the access of the media and performs troubleshooting.
It provides the access of the transmission media for upper layers as well as controls the way data is put on and received by the media.

It consits of two layers:

  1. Logical Link Control (LLC): This upper sublayer defines the software processes which provide services for the protocols of the Network layer. It puts information in a frame to identify the Layer 3 protocol which will be using the frame – this information makes possible for several layer 3 protocols to use the same network interface and media.
  2. Media Access Control (MAC): This lower layer determines the media access processes performed by the hardver. It provides data-link level addressing and framing of the appropriate data packet of the signaling system and the transmission media.

Splitting the Data-link layer for sublayers allows any frame created in the upper layer to access any media type in the lower layer.

Network Layer (3.)

The protocols of the Network layer of the OSI model defines the addressing and the processes that allow the Transport layer data to be packaged and transmitted. Embedding in the Network layer allows data to reach a destination within a network or on another network with minimal additional overload.

Functions of the Network layer:

  • Addresses end devices, since an end device can only be identified with a unique IP address
  • Embed the Transport layer PDU
  • Its protocols determine which route is suitable from source to destination.
  • Unpacking also falls under the role of this layer.


Transport Layer (4.)

This layer is responsible for end-to-end communication between two devices. It provides services to the application layer and takes services from the network layer. It takes data transferred in the session layer and breaks it into “segments” on the transmitting end. It is also responsible for reassembling the segments on the receiving end, turning it back into data that can be used by the session layer.

The transport layer performs error control on the receiving end by ensuring that the data received is complete, and requesting a retransmission if it isn’t. Moreover it implements flow and error control to ensure proper data transmission.

Functions of the Transport Layer:

  • Tracks each individual conversation flowing between a source application and a destination application seperately
  • Devides the data into segments that are easier to manage and transport
  • It ensures that even with multiple applications running on a device, all applications receive the correct data

Session Layer (5.)

This layer is responsible for opening and closing communication between the two devices. These communication channels called ‘sessions’. The session layer ensure that these communication channels remain open and functional while data is being transferred, and close them when communication ends. 

Functions of the Session layer:

  • Allows the two processes to establish, use and terminate a connection
  • Provides synchronization by allowing a process to add checkpoints that are considered synchronization points in the data. With the help of these points, it is easier to identify the error, so that the data is re-synchronized properly and data loss is avoided
  • It supports half-duplex or full-duplex communication mode

Presentation Layer (6.)

This layer is primarily responsible for preparing data so that it can be used by the application layer. (In simple terms, it makes the data presentable for applications.) It defines how two devices should encode, encrypt, and compress data so it is received correctly on the other end.

Functions of the Presentation layer:

  • Translates the incoming data into a syntax that the application layer on the receiving end can understand. For example, ASCII to EBCDIC
  • It encrypts the data on the sender’s end and decodes it on the receiver’s end for the application layer to be able to present readable data
  •  With data compression, reduces the number of bits that need to be transmitted on the network. This helps improve the speed and efficiency of communication

Application Layer (7.)

This layer is the closest to the end user. It provides the interface between the applications that we use to communicate and the underlying network on which our messages are carried. Application layer protocols are used to exchange data between programs running on source and destination hosts. The best known application layer protocols are HTTP (Hypertext Transfer Protocol), FTP (File Transfer Protocol), TFTP (Trivial File Transfer Protocol), IMAP (Internet Message Access Protocol) and DNS (Domain Name System).

Functions of the Application layer:

  • It allows a user to log on to a remote host
  • Allows a user to access files in a remote host, retrieve files in a remote host, and manage or
    control files from a remote computer
  • Provides distributed database sources and access for global information about various objects and services with directory services
  • Provide email service

How data flows through the OSI model?

First, the data is passed through the 7 layers of the OSI model starting from the sender side, then the same process is performed, but in reverse, from the receiver side.
Let’s look at that with an example:
Joe sends an e-mail to his teacher Mr. Calvin

  1. In the Application layer: Joe writes his e-mail by interacting with an e-mail application, like Gmail and then click on the send button.
  2. In the Presentation layer: The mail application encrypts the data and formats it for transmission.
  3. In the Session layer: A connection is estabilished between the sender and the receiver on the internet.
  4. In the Transport layer: The data of the e-mail is broken into smaller segments. For to maintain the reliability of the information, this layer adds sequence number and debugging information.
  5. In the Network layer: Data packets are addressed to find the best path for transmission.
  6. In the Data-link layer: The packets are encapsulated into frames, the MAC address of the local device is then added, and error detection is then used to check for errors.
  7. In the Physical layer: Finally, the frames are transmitted as electrical/optical signals over a physical network medium such as Ethernet cable or WiFi.

Once the email reaches Mr. Calvin, the process is reversed and the email content is decrypted. Finally, the email will appear in Mr. Calvin’s e-mail client.

Advantages of OSI model

  • Reduces complexity and standardizes interfaces by determining the requied hardware to build their network
  • Performs troubleshooting by identifying which layer is causing an issue and focusing efforts on that layer
  • It is easier to improve with advancements as each layer can get updates separately
  • Simplifies teaching and learning