What is the OSI session layer (5) used for?

osi

I have been reading about the OSI model and understand all the other layers but this layer seems to have many websites describing it differently

Are the sessions to keep track on connections, such as computer connecting to stream 1,stream 2 and stream 3. These would all have different sessions and be identified by their port.

Or are the sessions for the services being connected to such as session ids for websites.

Best Answer

First, let's have a look at the ISO/OSI stack vs the TCP/IP stack:

enter image description here

ISO/OSI layer 5 is not much "used" alone: it is implemented together with layers 6 and 7 to the TCP/IP Application layer, where network applications such as HTTP, NTP, IMAP etc. take place. In practice, its functions are mixed with the upper layers.

From Wikipedia:

The session layer controls the dialogues (connections) between computers. It establishes, manages and terminates the connections between the local and remote application. It provides for full-duplex, half-duplex, or simplex operation, and establishes checkpointing, adjournment, termination, and restart procedures. The OSI model made this layer responsible for graceful close of sessions, which is a property of the Transmission Control Protocol, and also for session checkpointing and recovery, which is not usually used in the Internet Protocol Suite. The session layer is commonly implemented explicitly in application environments that use remote procedure calls.

Related Topic