In the seven-layer
OSI model
The Open Systems Interconnection (OSI) model is a reference model developed by the International Organization for Standardization (ISO) that "provides a common basis for the coordination of standards development for the purpose of systems inter ...
of
computer network
A computer network is a collection of communicating computers and other devices, such as printers and smart phones. In order to communicate, the computers and devices must be connected by wired media like copper cables, optical fibers, or b ...
ing, the session layer is layer 5.
The session layer provides the mechanism for opening, closing and managing a
session between end-user application processes, i.e., a semi-permanent dialogue. Communication sessions consist of requests and responses that occur between applications. Session-layer services are commonly used in application environments that make use of
remote procedure call
In distributed computing, a remote procedure call (RPC) is when a computer program causes a procedure (subroutine) to execute in a different address space (commonly on another computer on a shared computer network), which is written as if it were a ...
s (RPCs).
An example of a session-layer protocol is the
OSI protocol suite session-layer protocol, also known as X.225 or ISO 8327. In case of a connection loss this protocol may try to recover the connection. If a connection is not used for a long period, the session-layer protocol may close it and re-open it. It provides for either
full duplex or
half-duplex
A duplex communication system is a point-to-point system composed of two or more connected parties or devices that can communicate with one another in both directions. Duplex systems are employed in many communications networks, either to allow ...
operation and provides
synchronization points in the stream of exchanged messages.
Other examples of session layer implementations include
Zone Information Protocol (ZIP) – the
AppleTalk
AppleTalk is a discontinued proprietary suite of networking protocols developed by Apple Computer for their Macintosh computers. AppleTalk includes a number of features that allow local area networks to be connected with no prior setup or the ...
protocol that coordinates the name binding process, and Session Control Protocol (SCP)
– the
DECnet
DECnet is a suite of network protocols created by Digital Equipment Corporation. Originally released in 1975 in order to connect two PDP-11 minicomputers, it evolved into one of the first peer-to-peer network architectures, thus transforming DEC ...
Phase IV session-layer protocol.
Within the service layering semantics of the OSI network architecture, the session layer responds to service requests from the
presentation layer and issues service requests to the
transport layer
In computer networking, the transport layer is a conceptual division of methods in the layered architecture of protocols in the network stack in the Internet protocol suite and the OSI model. The protocols of this layer provide end-to-end c ...
.
Services
Connection establishment and release
At the minimum, the session layer allows the two sides to establish and use a connection, called a session, and allows orderly release of the connection.
In the OSI model, the transport layer is not responsible for an orderly release of a connection. Instead, the session layer is responsible for that. However, in modern TCP/IP networks, TCP already provides orderly closing of connections at the transport layer.
After a session connection is released, the underlying transport connection may be reused for another session connection. Also, a session connection may make use of multiple consecutive transport connections. For example, if, during a session, the underlying transport connection has a failure, the session layer may try to re-establish a transport connection to continue the session.
Dialogue control
The session layer may provide three different dialogue types - two way simultaneous (full-duplex), two way alternate (half-duplex), and one way (simplex). It also provides the mechanisms to negotiate the type of the dialogue, and controls which side has the "turn" or "token" to send data or to perform some control functions.
Dialogue control is not implemented in TCP/IP, and is left to the application layer to handle, if necessary. In the widely-used HTTP/1.1 protocol, the client and the server typically work in a half-duplex way. HTTP/1.1 also supports
HTTP pipelining for full-duplex operation, but many servers/proxies couldn't handle it correctly, and there was no dialogue negotiation mechanism to check whether full-duplex is usable or not, so its support was eventually dropped by most browsers.
Synchronization points and resynchronization
The session layer may also allow the two sides to insert ''synchronization points'' into the dialogue, and allow them to do a ''resynchronization'', which aborts the current transmission, sets the synchronization point to a certain value, and restarts transmission from that point.
This may be used in real-time audio/video transmission. Synchronization points can be used to insert timestamps to the data flow, and a resynchronization may be used to reset the transmission to start from a new timestamp. For example, if the video stream lags behind the audio stream too much, the receiving side may issue a resynchronization request on the video stream, restarting its transmission from a later timestamp.
This may also be used by the application to do checkpointing. Synchronization points can be used to indicate that a checkpoint has been committed by the application, and after an application crash or a power failure, a resynchronization can be used to indicate that the application has recovered from a checkpoint and the transmission can be resumed from that point.
This may also be used to interrupt / resume a dialogue at any time, not due to an application failure, but as planned by the application. The application may interrupt a dialogue, start another dialogue in the same session, and resume the previous dialogue in the same session or in another session.
The session layer may also provide explicit support for managing multiple interruptible dialogues over one or more sessions. These dialogues are called ''activities''. Activities can be interrupted and resumed explicitly. Compared to implicitly interrupting and resuming dialogues by resynchronization, activity support gives the application simpler control of these dialogues.
Protocols
*ADSP,
AppleTalk Data Stream Protocol
*ASP,
AppleTalk Session Protocol
*H.245,
Call Control Protocol for Multimedia Communication
*ISO-SP, OSI session-layer protocol (X.225, ISO 8327)
*iSNS,
Internet Storage Name Service
*L2F,
Layer 2 Forwarding Protocol
*L2TP,
Layer 2 Tunneling Protocol
*NetBIOS,
Network Basic Input Output System
*PAP,
Password Authentication Protocol
*PPTP,
Point-to-Point Tunneling Protocol
*RPC,
Remote Procedure Call Protocol
*RTCP,
Real-time Transport Control Protocol
*SMPP,
Short Message Peer-to-Peer
Short Message Peer-to-Peer (SMPP) in the telecommunications industry is an open, industry standard protocol designed to provide a flexible data communication interface for the transfer of short message data between External Short Messaging Enti ...
*SCP,
Secure Copy
Secure copy protocol (SCP) is a means of securely transferring computer files between a local host and a remote server (computing), host or between two remote hosts. It is based on the Secure Shell (SSH) protocol. "SCP" commonly refers to both the ...
*SOCKS, the
SOCKS
A sock is a piece of clothing worn on the feet and often covering the ankle or some part of the Calf (leg), calf. Some types of shoes or boots are typically worn over socks. In ancient times, socks were made from leather or matted animal hair. ...
internet protocol
*ZIP,
Zone Information Protocol
*SDP,
Sockets Direct Protocol
{{div col end
Comparison with TCP/IP model
The
TCP/IP reference model
The Internet protocol suite, commonly known as TCP/IP, is a framework for organizing the communication protocols used in the Internet and similar computer networks according to functional criteria. The foundational protocols in the suite are ...
does not concern itself with the OSI model's details of application or transport protocol semantics and therefore does not consider a session layer. OSI's session management in connection with the typical transport protocols (TCP, SCTP), is contained in the
transport-layer protocols, or otherwise considered the realm of the
application layer
An application layer is an abstraction layer that specifies the shared communication protocols and interface methods used by hosts in a communications network. An ''application layer'' abstraction is specified in both the Internet Protocol Su ...
protocols. TCP/IP's layers are ''descriptions'' of operating scopes (application, host-to-host, network, link) and not detailed ''prescriptions'' of operating procedures or data semantics.
See also
*
Session (computer science)
References
OSI model