OSI reference model is a logical model, not a physical model. This model provides a guideline for developers to help them develop applications that run on a network. The OSI also provides a framework for creating various networking standards and guidelines. There are 7 layers in the OSI model.

7 layers of OSI

The upper 3 layers provides with the understanding on how applications on the user end would communicate with each other.

upper layers

The lower 4 layers provide information on how data is been handled, and transported along the networks.

lower layers

Application Layer

This layer is layer 7 in OSI model. This layer is the spot where user actually communicate with computers and also comes into play when there is access to the network. Thus, this layer acts as an interface between the actual application program and the layer beneath in order to pass on the information. Here are some of the protocols that work at the application layer:-

  • HTTP
  • FTP
  • DNS
  • SMTP

Presentation Layer

The purpose of this layer you can incur from the name itself. The main purpose of this layer to present the data in the right format to the Application layer along with data translation and code formatting. This layer can also be considered as providing the coding and conversion service. This layer also performs some other functions like data compression, decompression, encryption and decryption.

Session Layer

All communication management of the user with other host is been by session layer. Communication to creating a session, dismantling a session and keeping each piece of data separate for each application. The session layer also maintains the communication modes between client and server like simplex, half-  duplex, full duplex mode. Simplex communication includes only one way communication, half duplex is two-way communication but can exist in one direction at a time. Full duplex is a common real-world communication where both users can send and receive a message.

Transport Layer

Transport layer segments and reassembles the data into a single data stream. Data received from upper layers have been combined into a single data stream. This layer also provides end to end transport services to the data and also established a connection between the host for communications. The most common protocols TCP and UDP  work at this layer.  TCP provides with reliable connection whereas the UDP  doesn’t, which means the transport layer to be either connection oriented or connectionless oriented. The application developer selects any of the two protocol to be used in the application for communication. This layer also provides a mechanism for multiplexing upper layer application, establishing sessions, and can also hide details related to the network from the higher layers.

Network Layer

The main function of the network layer is to track all the networking devices connected to it and provide the best path to move data.  Devices that work at this layer are routers and some layer 3 switches. They work in this way, the packet is received at the router and the destination network address packet is checked. If the address has been addressed to a particular device then the packet is sent through to the interface of the destined router, if not the destination address is looked up in the routing table and then forwarded to the destined router through an interface, if a regular network address is not found, then the packet is dropped. The network layer deals with two types of packets:-

  1. Data Packets:- They are used in transporting the user data through the network, protocols supporting this are IPv4 IPv6
  2. Network Packets:-  These packets are used to send updates to the neighbouring router about the network connected to all routers within the inter network and protocol supporting this are RIP, RIPv2, EIGRP, OSPF.

Data Link Layer

This layer provides with the functionality of physical transmission of data, handles error notification, network topology and flow control. In a nutshell, this layer makes sure that the data is transmitted to the proper device on the LAN and also translates the message from the network layer into bits for the physical layer.  The data is formatted into small data frames and custom headers are added in front of the frame with destination and source hardware (MAC) address.

The header and trailer which is added by data link layer has been truncated at the receiving end and only the packet which contains the information is been given to upper later.

Note:- Data is encapsulated by the header which contains source and destination address and the Trailer which contains a checksum which is used to check whether the packet that was sent is error-free or not and also tamper free.

Data link layer has two sub layers:-

Logical Link Layer (LLC):- This layer is responsible for identifying network layer protocol and then encapsulating them, it also tells the data link layer what to do with the packet when it's received. This layer also provides sequencing of bit and flow control.

logical link layer

Media Access Control (MAC):- This layer defines how the layer has been placed in the media. Contention data is placed on the logic of “First come, First Served” since each packet shares the same bandwidth. Physical, as well as logical topologies, are defined in this layer. Other functionality like line discipline, error notification, optional control flow, ordered delivery of frames are also done at this layer.

Physical Layer

This is the bottom layer in the OSI model, where the actual data bits are transmitted over the network. Data is sent and received in 0’s and 1’s. This layer communicates with different type of communication data and each type of data represents these bits in different way. Some represent them as audio tone and some represent it as state transitions. This is an important layer, as it identifies DTE- Data terminal Equipment and DCE- Data communication Terminal. DCE  is usually located at service provider and DTE is the attached device. Services offered to DTE are accessed by modem or Channel service unit / Data service unit (CSU/DSU).

Techie Mike
Techie Mike
Self-taught techie, with a passion for computers and all the cool things you can do with them. Techie Mike, B.Eng. B.Sc.
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to Techie Mike - The IT guy in Thailand.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.