What is the OSI Model: Explain the Seven Layers in it?
Introduction
In 1977, the ISO developed an architecture for data exchange between computers. Finally, in 1984, ISO developed an architecture that they named the “OSI” (Open System for Interconnection) reference model. The OSI reference model is an architecture through which two computers conforming to the reference model and associated standards can exchange data between them.
The term “open” signifies that computers can communicate when various vendors adhere to the OSI architecture. Before the OSI model, several vendor-specific reference models existed, wherein only specific vendor computers could connect, but they couldn’t communicate with computers from other vendors. For instance, IBM utilized its reference model, enabling only IBM computers to connect, while they couldn’t connect with Compaq computers.
In short, every reference model was propriety, and at last, in 1984, the OSI reference model eliminated this difference & after that, It was used as a reference model in computer networking. Moreover, the OSI reference model tells us how Network Protocols and equipment will work or communicate with each other.
Layers in OSI Model
There are seven Layers in the OSI reference model: Physical Layer, Data Link Layer, Network Layer, Transport Layer, Session Layer, Presentation Layer, and Application Layer. Every layer has its responsibility. We also call the seven layers a stack.
Application Layer |
Presentation Layer |
Session Layer |
Transport Layer |
Network Layer |
Data Link Layer |
Physical Layer |
OSI model distributes Network Task into seven layers, for which detail is given below.
1) Physical Layer
The physical Layer is responsible for physically moving data from a network interface. This means that the Physical Layer deals with the connector, but it also has some other functions.
Transmission media
The physical layer defines the type of transmission media or cable to be used, the type of connector to be used, and whether the media will be wired or wireless. How will it act?
Encoding & Signaling
The physical layer is responsible for encoding and signalling.
The data is stored in a computer as binary bits (0 or 1). So how to send this data to another computer, and for sending this data, what will be the signal voltage level? What level will represent 1 and zero?
Topology
Topology means the Design of a Network. The physical layer tells us how computers are physically connected to the network.
Devices
The repeater, Hub, and media converter are the physical layer devices.
So, the physical layer is responsible for connector pins, their voltage level, cable specification, and devices.
2) Data Link Layer
The data link layer is the 2nd layer in the OSI model. It takes its input as a bit (0 or 1) from the physical layer, checks transmission errors, and packets it in Frame. It performs an important and complex task in our network. To resolve its complexity, it is divided into two parts to resolve its complexity.
- LLC (Logical link control)
- MAC (Media Access Control)
L.L. C
- The Logical Link Control Protocol provides services to the Network Layer and hides Data Link Control details.
- LLC controls LAN
- All LAN technology operates with L.L.C
- IEEE defines 802.2 LLC Protocol.
MAC
- Media access control protocol is the sub-layer of the data link control layer.
- MAC Layer defines “When and how devices in the Network will communicate with each other at which time so that conflict for accessing the media will be minimal.
- However, if conflicts occur, CSMA/CD, CSMA/CA, or Token Passing will resolve them.
- Physical addressing is another feature of MAC that helps to transfer data from node to node in the network.
It also performs some other features as follows.
Frame
When it reaches the data link layer, a data gram is called a frame. Data coming either from the physical layer (0, 1) or the network layer (Packet) becomes a frame at the Data link layer.
Error Detection
The data link layer helps in the error detection mechanism.
Physical Addressing
Physical address or MAC address, which is 48-bit long works at the Data link layer.
Flow Control
When one device sends data and the 2nd device receiving device doesn’t receive that data at the sender’s speed, then flow control plays an important role in this regard.
Flow control tells us at which speed the sender sends the data.
3) Network Layer
If we start the OSI model from the lower end, the network layer is the third layer. When the Data link layer defines the network boundary, the network layer defines how inter-networking will function. The data link layer deals only with the local network, while the network layer deals with how data will be reached from one system to the other system, even if the system is in a remote location.
Some network functions are as follows
· PACKET
The datagram at the network layer is called the packet
· Logical Addressing
All the network devices need an address, which is called a logical address or IP address. The logical address is an IP address that is 32-bit long. Normally, the IP address is denoted by dotted-decimal notation. The IP address is divided into 4 parts in which each part is called an octet because there are 8 bits (1 byte) in each block. The logical address is not dependent on any particular hardware. It is unique in the whole inter-networking.
· Internetworking
When we communicate between two or more networks, then this function is performed by the network layer
· Routing
Reaching from one network to another network Is called routing, and the network layer also performs this process with the help of a logical address.
· Error Handling and Diagnostics
Some protocols work on layer 3, which we use for error handling and diagnostics in which one of them is the ICMP protocol. ICMP performs the function of error reporting and query messaging which tells about errors and the cause of the error
· Devices
Router, Layer 3 Switches and Firewalls work at the Layer 3 network layer.
4) Transport Layer
The transport layer is the 4th and middle layer in the OSI model. This layer works between the upper layer and lower layer as a transition.
Today’s computers perform multitasking in which many applications run in it. All those applications try to transmit and receive data simultaneously. The transport layer provides a mechanism in which each application uses lower layers simultaneously to send and receive data. This layer is responsible for end-to-end transmission.
The transport layer knows which data is coming from the upper-layer application, then combines all the upper-layer applications’ data and sends it to the lower layer. On the other hand, the receiving device splits that data and sends it to the same application running on it.
Some import functions of the transport layer
· Segmentation
The transport layer divides data into different blocks which are called segmentation.
· Multiplexing and DE multiplexing
It performs multiplexing and DE multiplexing i.e. many-to-one and one-to-many
· Process-Level addressing
Every process running in a computer uses a process number, which is called a port number. The port number is used at the transport layer, e.g., FTP port numbers 20 and 21, telnet port number 23, SMTP port number 25, HTTP port number 80, etc.
· Connection Services
There are two categories of connection services: Connection-oriented services and connectionless services. Connection-oriented service is used by Transmission control protocol (TCP) while connectionless service is used by user datagram protocol (UDP).
· Error Control
The transport layer controls the transmission of error losses at the time of transmission and receiving data, ensuring reliable and efficient transmission.
It also controls the flow of data.
5) Session Layer
The lower layer normally deals with hardware issues, but the upper layer deals with software issues. The session layer is the fifth layer in the OSI model. Its name, “session,” clearly indicates that it controls activities related to the initiation and termination of the session.
Some important tasks of the session layer are below.
- Establishing connection
- Maintaining connection
- Synchronizing communications
- Controls dialogue
- Terminating connection
The services running by the session layer is
- Authentication
- Permissions
- Session restoration
By brief introduction
The session layer establishes a session, manages & synchronizes it, and at last, terminates the session.
6) Presentation Layer
The presentation layer is the 6th layer from the bottom in the OSI model. Its function is clear from its name “presentation” that how to present data. Some important functions of the presentation layer is as follows
· Translation
The presentation layer converts data from one form to another form
· Encryption
Encryption means changing into coding form so that a third person will not be able to read or change it.
· Compression
The presentation layer does compression to minimize data size.
7) Application Layer
It is the top or seventh layer in the OSI model. The application layer works as an interface between the actual application and the remaining layers. The application layer and the end-user interact with the application. It provides services to software or programs so that applications can communicate with other software or applications.
Some important functions of the application layer are:-
- Identifying communication between partners
- Determines resource availability so that it decides how to reach that resource
- Synchronizing communications
It synchronizes communications between applications
Furthermore, it also supports error recovery.