OSI model made easy!!!

SAKSHI CHHABRA
5 min readDec 12, 2021

--

ref: http://www.highteck.net/EN/Physical/OSI_Physical_Layer.html

OSI Model (Open System Interconnection Model) describes all the layers that systems use to transfer data over the network. In an OSI model, the communication between two systems is split into seven abstraction layers with each layer having a different functionality. All of the layers perform in conjunction to transfer data from one system to another across the globe.

The modern internet is not based on OSI, but on TCP/IP protocol because OSI is a newer model compared to the other two and internet was already set up on TCP/IP for data transfer. Nevertheless, OSI model helps visualize how networks work, and troubleshoot networking issues.

Advantages of OSI model:

  • Helps troubleshoot by providing which layer is creating issue, so that efforts are focussed on that specific layer
  • Understand the process followed by devices while communicating over the internet
  • Helps determine the required hardware to build network
  • Helps user understand about which layer is their product operating.

We’ll discuss OSI model layers top-to-bottom starting from the application layer down to physical layer.

Layer 7: Application Layer:

The very top layer in the OSI model is the Application layer which directly serves the end user such as browsers. This layer serves as a window for applications to access the network, and also present meaningful information to the clients. Application layer also provides protocols to send and receive information over the network such as Hyper Text Transfer Protocol(HTTP), Simple Mail Transfer Protocol(SMTP), Domain Name System(DNS).

Layer 6: Presentation Layer:

Presentation Layer(Translation Layer) receives the data transmitted by application layer, manipulate as per requirement and transmits it over to the session layer. The main functionalities of the presentation layer are:

  • Data encoding
  • Data compression
  • Data encryption and decryption

On the receiver end, the presentation layer prepares the data for use by application layer.

Layer 5: Session Layer:

Session Layer creates a communication channel for devices to be able to transfer data. It is responsible for establishment, maintenance and termination of sessions once the data is transferred. It also add checkpoints i.e. synchronization points during data transfer, and resumes the data transfer from the last checkpoint incase session gets interrupted. This ensures that data is not cut pre maturely and the data loss is minimized.

The above three layers(Application layer, presentation layer and session layer) are known as Application layer in TCP/IP and it is set-up within network app itself.

Layer 4 : Transport layer(Heart of OSI model, part of OS):

The transport layer is responsible for end-to-end delivery of the entire message. The transport layer re-transmits the data(called segments in transport layer) if error occurs and provides acknowledgement of successful transmission.

Below are transport layer’s responsibilities at respective side:

Sender’s side: Receives the data from upper layers, segments the data into packets, adds source & destination port number(associated with an application and is configured for every application) in the header of every segment, and implements error control for genuine data transfer.

Receiver’s side: Reassembles the segments. Extracts the port number from it’s header and re-directs to its respective process in the application. Checks for errors and requests for re-transmission. . Sends acknowledgement to the sender for successful transmission.

Transport layer provides two services: connection oriented and connection-less.

Connection oriented service: Reliable and secure. It’s a three step process where the connection is established, data is transferred and then connection is closed after successful transmission. The receiver also sends an acknowledgement when the segments are received.

Connectionless services: Fast transfer. It’s a one-step process where the data is transferred. No connection is set-up prior to data transfer. The receiver doesn’t send an acknowledgement when the segments are received.

Layer 3: Network Layer(implemented by router):

The Network layer is responsible for transmitting the data from one host onto other host over different networks.

Below are network layer’s responsibilities at respective side:

Sender’s side: The network layer receives the data from the transport layer and breaks them into network packets. To identify each device on a network uniquely and universally, a device is assigned an IP address(Internet Protocol address) by the ISP(Internet Service Provider). These IP addresses are placed in the header of every packets by the network layer.

The network layer also determines the best route to transmit packets from source to destination. This function is known as routing.

Receiver’s side: The network layer reassembles the packets received and passes them onto the upper layers.

Layer 2: Data Link Layer(handled by Network Interface Card and device drivers of machines):

Data Link Layer transmits the data between two physically connected nodes on the network. The layer is composed of two parts:

(a) Logical Link Layer performs error checking, identifies network protocols and synchronizes frames. The frames are the packets that are broken down by data link layer depending on the frame size of Network Interface Card(NIC).

Difference between frame v/s packet. ref: https://techdifferences.com/difference-between-frame-and-packet.html

(b) Media Access Control uses MAC addresses to connect devices and defines permissions to transmit/receive data. When a communication channel is shared by multiple devices, the sub-layer determines which device has control over channel at a specific time.

Functions of Data Link Layer (DDL):

(a) DDL provides a set of special bits patterns that are useful to the receiver and attaches them to the beginning and ending of frame. This is known as framing.

(b) For data to not get corrupted, DDL synchronizes the amount of data that can be sent before receiving acknowledgement.

(c ) Adds sender’s and receiver’s MAC address at the header of each frame.

(d) Provides a mechanism of error control.

Layer 1: Physical Layer:

The Physical layer is responsible for actual physical connection(which could either be physical cable or wireless connection) between two devices. On the receiver end, this layer receives the data as signals, converts it into bits of 0s and 1s, and transfers them to DataLink layer.

Functions of Physical Layer:

(a) Defines transmission rate i.e. no of bits transferred per sec

(b) Specifies the mode in which data would be transferred i.e. half duplex, full duplex or simplex.

(c )Synchronization of bits by providing a clock which controls both sender and receiver, thus keeping synchronization at bit level.

The above two layers(DataLink layer and Physical layer) are known as Network Interface layer in TCP/IP.

Difference between TCP/IP and OSI model is that TCP/IP is designed to solve specific problems and has a set of standard protocols while OSI model is a generic model covering all forms of network communication.

ref: https://www.guru99.com/difference-tcp-ip-vs-osi-model.html

Thank you for checking out my blog!!!

--

--

SAKSHI CHHABRA

Master's student in Computer Science from University of Florida. I love to write and help others, so here am i.