OSI Model: Layers and its functions
What is an OSI Model?
The OSI(Open Systems Interconnection Model) is a model which describes the universal standard of communication of a telecommunication system or computing system.
The communication between the telecommunication or computing system is split into seven layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application Layers.
The development of the OSI model started in the late 1970s to support the emergence of diverse computer networking methods. It was published by Internation Organization for Standardization(ISO) in the year 1984.
Layers of OSI Model
As the name describes, this physical layer is responsible for the physical connection between devices. They transmit unstructured raw data between devices, such as a switch, Ethernet hub, or a network interface controller.
It also does the conversion of digital bits into electrical, radio, or optical signals. The information shared around is in the form of bits. When this layer receives data, it is converted into 0s and 1s which are then sent back to the Data Link Layer.
Functions of Physical Layer:
This physical layer defines how two physical are connected in the network.
Bit rate: The physical layer is used to define the transmission rate which is the number of bits sent per second.
Topologies: The physical layer defines the topology, i.e. it specifies the way in which different devices/nodes are arranged in a network.
Transmission: The physical layer also used to define the way in which the data flows between the two connected devices. Simplex, half-duplex, and full-duplex are the various transmission modes in the physical layer.
Data Link Layer
The data link layer provides node-to-node transfer, which is basically a link between two directly connected nodes.
This layer establishes and terminates the connection between two physically connected devices. It also handles the flow control between them.
Functions of Data Link Layer:
Access control: When two or more devices are connected in a network, then the data link layer protocol determines which device has control over the link at that time.
Error Control: The data link layer detects and corrects errors that occur in the physical layer. Physical Addressing: The frame is transmitted to the destination address which is added at the header of the frame by the data link layer.
Framing: This layer translates the physical layer’s raw bitstream into packets called frames. It is done by adding special bits to the beginning and end of the frame.
The network layer provides the way for the transmission of data from one node to another connected in different networks. A network is a medium where many nodes can be connected. Each node has its own address.
This layer takes care of packet routing. Packet routing is nothing but selecting the shortest path among the routes available in order to transmit the packet.
The protocols used to route the network traffic is called Network layer protocols. This layer manages the device addressing and tracks the device’s location on the network.
Functions of Network Layer:
Routing: This layer decides the best route from source to destination, also called routing.
Addressing: This layer adds the source and destination address to the header of the frame which is used to identify the device across the network.
Internetworking: This layer provides a connection across devices in the network.
Packet conversion: This layer receives data from the previous layer and converts them into packets.
The Transport layer handles the end-to-end communication between two devices. This layer takes the data transferred to it and breaks it into segments in the transmitting end.
There are two types of protocols used in this layer. They are:
a.) Transmission Control Protocol: TCP is a standard protocol that allows the devices to communicate over the internet. It manages the connection between hosts. * When data is sent over a TCP connection then data is divided into smaller units called segments which then travel over the internet using multiple routes.
b.) User Datagram Protocol: UDP is a transport layer protocol which is an alternative to TCP. Since data is transmitted link by link, there is no end-to-end connection, this is an unreliable protocol. There is a danger of data being lost or even duplicated so this is an unreliable one.
Functions of Transport Layer:
Flow control: This layer is also responsible for the flow control. Flow control is performed by the Transport layer from end to end and not across a single link.
Error Control: This layer is also handles the error control. The sender of the transport layer make sure that message is reached at the destination without any error.
Service-point addressing: To deliver the message to the correct process, this layer adds an address called service point address or port address to it. This makes sure that the message reaches the correct address.
The session layer handles the starting and ending of communication between devices known as sessions. This layer makes sure that the session is open for communication to take place between devices also it closes the session once the communication to avoid wastage of resources.
Functions of Session Layer:
Synchronization: This layer adds checkpoints while transmitting the data. If an error occurs at a point, then the transmission takes place from the checkpoint. This is called Synchronization.
Session maintenance: This layer maintains the session. Creation, and termination of the session are also handled by the Session layer.
Dialog Control: This layer acts as a dialog controller which in turn creates a dialog between two processes. It allows communication either as half-duplex or full-duplex communications.
The presentation layer, also called the translation layer, extracts and converts the data into the required format in order to use it for communication.
Basically, it transforms the data in which the application layer accepts it to be.
Protocol conversion, graphic commands, data compression, data decompression, data encryption, data decryption, and incompatibility of data representation between OSs are handled by the presentation layer.
The presentation layer is also called as syntax layer, because it converts the data and graphics into a display format for the sake of the application layer.
Functions of Presentation Layer:
Translation: It does the work of converting the data from the sender format into a common format and changing the common format into the receiver format.
Encryption/Decryption: This layer encrypts the data from the receiver into cipher text which will be harder to read by common eyes and is highly safe. It also decrypts the encrypted data into plain text for human eyes to read and understand. The encrypted text is harder to read and decrypt by attackers.
Compression: This layer compresses the data like text, images, or audio. This data compression is much needed for media since it reduces the number of bits to be transmitted over the network.
The application layer, also called a desktop layer, is the layer that is very closest to the end-user. The application layer handles file sharing, message handling, and database access, through the protocols such as HTTP, FTP, SMB/CIFS, TFTP, and SMTP.
Functions of Application Layer:
File transfer access and management: Accessing files in a remote computer, retrieving the files, or managing the files from the remote computer are handled by the application layer.
Mail Services: This layer provides email forwarding and storage.
Though the modern internet is based on TCP/IP model rather than OSI model, it acts as a reference model and has been helpful for IT experts to understand the networking model and troubleshoot the issues accordingly.