OSI Model Layers and Their Functions | Networks

Hello! I'm Yuvraj. I'm a Computer Science Student. I love to learn, create, and explore new things. I am currently doing a Bachelor of Computer Science from the University of Delhi.
Search for a command to run...

Hello! I'm Yuvraj. I'm a Computer Science Student. I love to learn, create, and explore new things. I am currently doing a Bachelor of Computer Science from the University of Delhi.
No comments yet. Be the first to comment.
Now that we understand the basics of Kafka producers and consumers, let's build a more realistic example that shows how Kafka can be used in a real-world scenario. We'll create a simple order processing system with these components: Order Service: C...
Now that we've created a producer that sends messages to Kafka, let's create a consumer that reads those messages. A consumer is an application that subscribes to Kafka topics and processes the messages. Setting Up the Project First, let's set up our...
Now that we understand the basic concepts of Kafka, let's create our first producer. A producer is an application that sends messages to Kafka topics. Setting Up the Project First, let's set up our Node.js project: Create a package.json file in the ...
Kafka Basic Concepts Now that we have Kafka running, let's understand the key concepts that make Kafka work. I'll explain these in simple terms without jargon. The Big Picture Kafka is a system that lets different parts of your application talk to ea...
Chapter 2
Note: In this article, we have discussed layers in the OSI model, for introduction to the OSI model refer to this article.
Let's discuss each of the following layers of the OSI model:
The physical layer is the lowest layer of the OSI model, responsible for sending bits from one computer to another through a physical medium. It deals with the setup of physical connection to the network and with transmission and reception of signals. It also defines the functions that physical devices and interfaces have to perform for transmission to occur.

The Physical Layer is responsible for the movement of individual bits from one node(hop) to the next.
Functions of Physical Layer
The data link layer is responsible for the node to node(or hop to hope) delivery of the message. It makes sure data transfer is error-free from one node to another, over the physical layer.
The data link layer is concerned for delivery on the same network between two directly connected nodes like in LAN.

The data link layer is responsible for moving frames from one hop to the next.
Functions of the Data Link Layer:
Framing - The data link layer divides the stream of bits received from the network layer into manageable data units called frames.
Physical Addressing - After creating frames, DLL adds physical addresses(MAC address) of the sender and receiver in the header of each frame.
Flow Control - If the rate at which the data are absorbed by the receiver is less than the rate at which data are produced in the sender, the data link layer imposes a flow control mechanism to avoid overwhelming the receiver.
Example - If the sender can send 5 frames per second but the receiver can only receive 3 frames per second the data link layer will reduce the frames from 5 to 3 per second on the sender's side.
Error Control - The DLL adds reliability to the physical layer by adding mechanisms to detect and retransmit damaged or lost frames. It also uses a mechanism to recognize duplicate frames.
Error Control is achieved through a trailer added to the end of the frame.
Access Control - When two or more devices are connected to the same link, data link layer protocols are necessary to determine which device has control over the link at any given time.

The network layer is responsible for the source to destination delivery of a packet, possibly across multiple networks(links).
Whereas the data link layer oversees the delivery of the packet between two systems on the same network(links), the network layer ensures that each packet gets from its point of origin to its final destination.
If two systems are connected to the same link, there is usually no need for a network layer. However, if the two systems are attached to different networks (links) with connecting devices between the networks (links), there is often a need for the network layer to accomplish source-to-destination delivery.

Functions of Network Layer:
The network layer is responsible for the source to destination delivery of a packet across multiple networks.
Logical addressing - Network layers allocate a unique address called IP address to the header of the packet to distinguish each device.
The DLL adds a physical address to identify devices locally, the IP address identifies devices universally.
Routing - The network layer determines which route is suitable from source to destination across multiple networks.
The device which implements routing at the network layer is known as router or a switch.

The transport layer is responsible for process to process delivery of the entire message.
A process is an application program running on a host. Whereas the network layer oversees source to destination delivery of individual packets, it does not recognize any relationship between those packets and treats them individually as though each piece belonged to a separate message, whether or not it does.
The transport layer, on the other hand, ensures that the whole message arrives intact and in order, overseeing both error control and flow control at the source to destination level.

The transport layer is responsible for the delivery of a message from one process to another.
Functions of Transport Layer:
Service Point Addressing/Port Addressing - The transport layer header includes the port address(a 16-bit address allocated to every process) which delivers a message from a specific process on one computer to another process on another computer.
The network layer gets each packet to the correct computer; the transport layer gets the entire message to the correct process on that computer.
Segmentation and Reassembly - A message is divided into transmittable segments, with each segment containing a sequence number. The receiver transport layer uses these numbers to reassembles segments and replace packets that were lost in the transmission.
Connection Control - The transport layer can be either connectionless or connection-oriented.
Flow Control - Like DLL, the transport layer is responsible for flow control. However, flow control at this layer is performed end to end rather than across a single link.
Error Control - Like DLL, Transport Layer also performs error control. However, error control at this layer is performed process to process rather than across a single link.

The session later is responsible for dialog control and synchronization.

Functions of Session Layer -
The Presentation Layer is concerned with the syntax and semantics of the information exchanged between two systems.

The Presentation Layer is responsible for translation, compression, and encryption.
Functions of Presentation Layer -
The application layer enables the user, whether human or software, to access the network.

The application layer is responsible for providing services to the user.
Example of services:

References