Understanding Session Layer and its Functioning

Photo of author

By Vijay Singh Khatri

The session layer is the fifth layer present in the Open Systems Interconnection (OSI) model. This layer is responsible for controlling the connections that are present between the computers. Also, it tracks down the dialogue and other communication that takes place between the computers. This dialogue and communication are known as a session. So this layer is the one that establishes and ends the sessions between the local and remote applications. In this article, we are going to find out the different functions of the session layer. Besides, we will also define the various protocols that use session layers in one way or the other. So let’s begin.

Working of Session Layer

The session layer works on the services that are provided by the transport layer. The transport layer is present on the top of the session layer. The main responsibility of the session layer is to enable applications to establish and maintain sessions. At the same time, it also synchronizes the sessions between the two computers. On the other hand, there are a lot of things that go on when it comes to creating a session connection between the two computers. First, the network needs to map the session address to the shipping address. After that, it needs to select the required transport quality of service.

This is also known as QoS. In addition to this, the network needs to take care of the negotiations between the session parameters. Likewise, the session layer needs to send a limited amount of transparent data to the receiver. At the very least, the session layer needs to properly monitor the data transfer phase. All these steps are required if the user wants to send a large number of data files over the network.

Functions of Session Layer

Being the fifth layer in the OSI model, the session layer has dealt with some of the essential tasks of the networking. One of them is to maintain a safe and secure connection between the nodes. Apart from that, it has to manage the dialog control used to make connections between half and full-duplex. This layer is also responsible for token management, which means preventing the two users from accessing the same critical operation simultaneously. The session layer also takes control of synchronization with the help of checkpoints. These checkpoints are used as the synchronization points for data streaming. Moreover, with the help of checkpoints, it is also responsible for session checkpointing and recovery.

The session layer works to provide the mechanism that opens, closes, and manages the sessions that are a part of end-user application processes. In addition to this, the session layer’s services can also be implemented in the environment where the applications are running via remote procedure calls (RPCs). Moreover, the session layer also takes the responsibility of synchronizing the information from several resources. In the same way, with the help of this, the layered network can control the single or multiple connections from each end-user application. This results in direct communication with the transport and presentation layers.

It can also use the checkpoints along with adjournment, restart, and termination to create new procedures for the session. Apart from that, the session layer uses checkpoints to make the communication sessions possible. This way, when there is a problem in the communication, the transmission can restart from the same checkpoint from where the failure occurred. Lastly, the session layer can fetch or receive data information from the previous layer, which is the transport layer. After that, it sends the data to the presentation layer for further processing.

Example of Session Layer Protocol

The session layer uses tons of protocols, making the connection and communication between the two nodes safe, secure, and accurate. Given below, we have defined those protocols in brief along with their function.

AppleTalk Data Stream Protocol (ADSP)

The ADSP is used to set up the session so that the exchange between the various networking devices can take place. Besides, you are also getting the added feature of flow-control when ADSP is used with the transport layer. As a result, it guarantees sequential data delivery with flow control. With ADSP, you are getting a solid interface with the clients. That means clients have the power to open connections, send data over the network, receive data, and can even close the connection when the transfer is complete via a remote end.

For internal control, ADSP can come up with an alert message mechanism for clients. It can be used for the forward-reset mechanism that allows clients to abort the transmission of outstanding bytes of data to the remote client. From this protocol, the session layer is able to terminate the sending of duplicate data bytes, with the implementation of the Connection Control Block (CCB) for control information. This will lead to synchronized communication among multiple sockets and allow error checking. Keep in mind that it does not provide any mechanism that can be used to encrypt data and authentication of users. Furthermore, you need to manually enable the Transport Service Data Units (TSDUs) as it is not enabled by default.

Real-time Transport Control Protocol (RTCP)

The RTCP provides the message that can control transmission and the quality of the data. It also gives the receiving end the ability to send their feedback to the source or even to multiple sources. It comes with a sender report, receiver report, source description message, bye message, and application-specific message. On the other hand, RTCP uses the temporary port, and it should be an odd-numbered port. As a result, it uses a UDP port number that includes the next highest odd number port most of the time. While still following the port number that the RTP preselects in the first place.

Point-to-Point Tunneling Protocol (PPTP)

With the point-to-point tunneling protocol, the session layer sets up the rules to govern the secure implementation of virtual private networks (VPN). This makes it possible for the companies to extend their own private networks over the internet with the use of tunnels. With the implementation of PPTP, a multinational company having offices in multiple locations can create an extensive local area network (LAN) which basically is a VPN. This development of LAN will be done using the infrastructure of the Wide Area Network (WAN). The same method is used by public Internet Service Providers (ISP) or telecom companies to their customers. This is considered to be one of the most efficient ways to provide private networking over a significant distance without laying out a proper infrastructure.

With the help of PPTP, remote users can access the corporate network over the Internet securely. This allows clients to work from anywhere in the world while still connecting to the virtual network of the company. As a result, the client or the employee will work in a secure company network and don’t have to worry about hacks and other data breaches.

In addition to this, PPTP is more of an extension of the point-to-point protocol that is already being used by Microsoft along with its other partners. All of them came together to make it a standard for networking. As a result, in the next Engineering Task Force (IETF), this protocol has a higher chance of becoming a standard.

Some of the main advantages of PPTP are:

  • Lower transmission costs.
  • The hardware required to run this protocol is readily available, and it is inexpensive.
  • There is a low requirement for administrative overhead.
  • It also provides some of the best security features in networking.

Password Authentication Protocol (PAP)

PAP is used by the PPP links to validate the user who is asking to receive the files from the sender. PAP works by calling the device to provide its username and password. After the receiver sends its credentials and they are matched by the local database of the called devices, the transmission of the file from the sender is allowed. Otherwise, the receiver will be denied access. PAP is an old-school authentication protocol that does not come with the encryption of data. So it sends the username and the password of a user in plain text. This makes it quite vulnerable to attacks when used with PPP. In the old days, PAP was used to connect old UNIX-based servers that could not support advanced encryption protocols.

Apart from that, in the world of networking, there are still some use cases where PAP can come in quite handy, and those are listed down below.

PAP can be helpful in case your software doesn’t come with the support of the Challenge Handshake Authentication Protocol (CHAP). This CHAP is a more secure way of providing authentication, but some legacy software can’t use it.

When there are specific situations where sending username and password in simple text is not a problem and is required for the simulation of login at a remote host.

Remote Procedure Call Protocol (RPCP)

It is a software-based communication protocol where one program uses it to request a service from the other program that is present on the other computer. But these computers are connected to the same network. The transmission between this two software happens without enquiring about the network details in the first place when the network is using RPCP. It can also be used for calling out the processes on the remote system and making them work as a local one. RPCP works on the basics of the client-server model, where the client requests the program, and the server is the one that provides services.

RPCP is a synchronous operation that requires a requesting program to be suspended until the results of the remote procedure are not returned. On the other hand, with the implementation of lightweight processes like threads. It can work concurrently and share the same address space to enable multiple RPCs. There are some significant advantages of using RPCP, and those are written down below:

  • It makes it possible for the client to communicate with the server with the traditional use of procedure calls when there is a high-level language.
  • RPCP can work in a distributed environment, and it can be used in a local environment as well.
  • It comes with the support of both process-oriented and thread-oriented models.
  • In addition to this, it will hide the internal message-passing mechanism from the user.
  • When you want to implement something in your software or network, only slight changes are needed.
  • It jumps over other protocol layers to increase the performance of the network.
  • Lastly, it provides abstraction, which is nothing but hiding the nature of the message-parsing.

Sockets Direct Protocol (SDP)

The SDP is a byte stream protocol that works by taking in the capabilities of InfiniBand fabric. To gain performance over the existing socket-based network application. The SDP is fully interoperable with both Windows and Linux operating systems. The primary purpose of SDP is to provide the RDMA-accelerated alternative for the TCP protocol on IP. The objective is to increase performance while maintaining complete transparency.

Design Issues Resolved by Session Layer

In the network, there were many design issues, and each layer was used to get past them. So the network can provide seamless working and excellent performance. The session layer did solve some of the issues present in the OSI model of the network, and they are:

  • It allowed the machines to establish their sessions with each other in a reliable manner where both the sender and the receiver are aware of the sequence number and the byte size of the data segments.
  • It comes with dialog control, token management, and synchronization. All of these were missing from the network. This brings an enhanced level of service to the users present on the network.

Conclusion

So this was all about the session layer, its use cases, and its working in the network that you are currently using in your homes, offices, and even in shops as well. All in all, the session layer is present in every network that is sending and receiving the files. If there’s any vital protocol that comes under the umbrella of the session layer that we missed mentioning. Feel free to let us know about it in the comment section. Till then, happy learning!

Leave a Comment