Blog

Keep up to date with the latest news

OSI model and layers

OSI Layers

International standard organization (ISO) provide us the model known as Open systems interconnection. This model has seven layers. Each layer has its own properties, functionalities and protocols as pre-defined by the organization.

1) Physical Layer

2) Data Link Layer

3) Network Layer

4) Transport Layer

5) Session Layer

6) Presentation Layer

7) Application Layer

1) Physical Layer

This layer is responsible to deliver data from sender to the receiver. It also defines the features and procedures performed by physical interfaces and devices for the transmission. This layer also decides who to send the data for example if the medium is fiber optic data should be converted to the light signals and if the medium is coaxial cable then the data should be converted into electrical signal because as we all know that fiber cables use light signals and coaxial cables use electrical signals.

It also performs these functions e.g. Representation of bits: The data is sending in the form of bits (0s and 1s) which do not interpret. The bits represented to encode the bits into optical or electrical signal corresponding with the medium. This layer also control the Bit rate of the bits in other words this layer decides how long a bit lasts in other words it decides the duration of every bit.

It keeps the sender and receiver synced e.g. the clock of both devices should be synced and check on number of bits sent by the sender is same as the number of bits received by the receiver this syncing is also administrated by this layer. It defines the Mode of transmission. This means that the layer tells the direction of transmission between two devices. Direction means that the transmission is simplex, half duplex or full duplex.

Simplex: This mode bounds one device to only send and other device to only receive the data

Half duplex: This mode both devices can send and receive data but one thing at a time.

Full duplex: In this mode both devices can send and receive data at the same time.

2) Data Link Layer

In physical layer we deal with the bits and in this layer we deal with the frames. Frames are the manageable units of bits. The purpose of this layer is to make the data error-free for the upper layers e-g Network layer. In the list of many functions of data link layer one of them is Access control.

This function is very important because it prevents the data from collision. Another responsibility which is performed by this layer is Control of flow. If the sender is sending the amount of bits which the receiver couldn’t absorb than this layer will set the amount of data to prevent data from wastage. Error control is a function which it performs to detect and re-transmit lost, duplicated or damaged frames. It makes the data error free for upper layers. Trailer which is normally added at the end of the frame is used to achieve the task of error control.

Physical addressing is a very important factor for sending frame from one source to destination. Headers usually have the information of sending device or receiving device. If we want send the frame to the device within a same network this layer will add information of destination and source to the header. But if the frame is intended outside the system or network then this layer will add the address of the device which connects the network to the system. These are some purposes which these layers fulfills.

3) Network Layer

Network layer or the fifth layer is responsible for source-to-destination delivery of packet. Whereas the data link layer overseas the delivery of packet between the devices of the same network, the network layer ensures that packet to send it to the final destination. The point which should be duly noted is that if two devices are connected to the same network then there is no need of network layer. If the device is connected to the different network then network layer is required for source to destination delivery of the packet. Another function which it performs is called logical addressing.

As we all have studied that data link handles the addressing problem logically but it only valid if the packet stays within the network boundaries but if the packet is meant for the device outside the network boundaries than network layer is responsible for source to destination delivery of the packet. Last but not least this layer performs another function which is of Routing. When a packet has to be sent on another network then this layer does the routing and switching of the packet to reach to the final destination. As we all know internet is the network of networks. Many different networks all over the world are connected to form a big network which makes it an internet.

4) Transport Layer

This layer is responsible for process to process delivery of the message. As we all know that the network layer is responsible of source to destination delivery of the packet. Network layer treats every packet individually and separately, as though each piece belonged to a different message. While on other hand transport layer makes sure that the whole message arrives intact and in the same sequence and without any error. Functions of this layer involve Service point delivery as we all know that multiple programs run a computer, to make sure that each packet reaches at the required program, we use transport layer.

Transport layer adds its header to the packet and then network layer get each packet to the desired device and transport layer make the correct sequence. Segmentation and reassembly is also a process in which each the message is divided into transmittable segments and each segment is numbered. These segments are numbered so that it could be resent in case of any error. Connection control is another function of this layer. It means either it is connection-less or connection oriented.

Connection-less transport layer treats each packet as an independent segment and it just send the packet to transport layer of the receiving device. While on other hand connection oriented transport layer establishes the connection with the transport layer of receiving device before delivering the packet. Error control and Flow control is also administrated by this layer just like data link layer do but the only difference is this layer performs this tasks on process to process rather than across a single link.

5) Session Layer

Services which are provided by physical, data link and network layer are not enough for some processes. It performs a task of Dialog control. Such layer is the dialog controller of the network. This layer first establishes than maintain and then it synchronizes the interaction between the communicating devices. The purpose of this layer is to maintain a dialog between the two devices and it also decides whether the communication is half duplex or full duplex.

This is an important function which means it adds synchronization points or check points to a stream of data. For example if one device has sent a book of 1000 pages this layer will insert check point after every hundred words? When the receiver receive hundred it will check the data after another 100 it will again check the data and say if after five hundred pages it detects an error. Now the session layer will request the sender to send the last hundred pages again. If there were no check point it will the sender has to send the whole file again all over.

6) Presentation Layer

The purpose of presentation layer is to translate the data to encrypt and compress the data. As we know that the computer sends its information in form of strings, numbers and special characters. The data has to be converted into bit stream before transmission as each computer uses different type of encoding scheme.

The sender format converted to common format then the device at receiving end change the format from the common format to receiver format is called Translation. Such function also known as compression. It is a very important task. Presentation layer reduces the number of bits combined in the information which is very important for sending multimedia such as text, video, and audio. It also performs function of encryption on sensitive data before sending for securing data then decrypted on receiving side.

7) Application Layer

This layer give access to the user whether human or a machine on the network. This layer provides information and services such as electronic mail and functions like remote file control and access. It also known as Mail service. Such layer also provides access to remote user to access and control the files this called File transfer, access and management.

It provides information related to various objects and services as distributed all over the database known as directory service. This layer also provides a virtual terminal to access and log on to a remote host this is the software version physical terminal. The user talks to the software which in turn talks to the host and vice versa.