The Open Systems Interconnection (OSI) model (ISO/IEC 7498-1) is a conceptual model that characterizes and standardizes the internal functions of a communication system by partitioning it into abstraction layers. The model is a product of the Open Systems Interconnection project at the International Organization for Standardization (ISO).
The model groups similar communication functions into one of seven logical layers. A layer serves the layer above it and is served by the layer below it. For example, a layer that provides error-free communications across a network provides the path needed by applications above it, while it calls the next lower layer to send and receive packets that make up the contents of that path. Two instances at one layer are connected by a horizontal connection on that layer.
|Data||7. Application||Network process to application||The application layer is the OSI layer closest to the end user, which means that both the OSI application layer and the user interact directly with the software application. This layer interacts with software applications that implement a communicating component. Such application programs fall outside the scope of the OSI model. Application-layer functions typically include identifying communication partners, determining resource availability, and synchronizing communication. When identifying communication partners, the application layer determines the identity and availability of communication partners for an application with data to transmit. When determining resource availability, the application layer must decide whether sufficient network or the requested communication exists. In synchronizing communication, all communication between applications requires cooperation that is managed by the application layer.
Some examples of application-layer implementations also include:
On TCP/IP stack:
|6. Presentation||Data representation, encryption and decryption, convert machine dependent data to machine independent data||The presentation layer establishes context between application-layer entities, in which the higher-layer entities may use different syntax and semantics if the presentation service provides a mapping between them. If a mapping is available, presentation service data units are encapsulated into session protocol data units, and passed down the stack.|
|5. Session||Interhost communication, managing sessions between applications||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.|
|Segments||4. Transport||Reliable delivery of packets between points on a network.||The transport layer provides the reliable sending of data packets between nodes (with addresses) located on a network, providing reliable data transfer services to the upper layers.
An example of a transport layer protocol in the standard Internet protocol stack is TCP, usually built on top of the IP protocol.
Although not developed under the OSI Reference Model and not strictly conforming to the OSI definition of the transport layer, the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP) of the Internet Protocol Suite are commonly categorized as layer-4 protocols within OSI.
Transmission Control Protocol is a connection-oriented protocol, which means that it requires handshaking to set up end-to-end communications. Once a connection is set up user data may be sent bi-directionally over the connection.
UDP is a simpler message-based connectionless protocol. Connectionless protocols do not set up a dedicated end-to-end connection. Communication is achieved by transmitting information in one direction from source to destination without verifying the readiness or state of the receiver. However, one primary benefit of UDP over TCP is the application to voice over internet protocol (VoIP) where latency and jitter are the primary concerns. It is assumed in VoIP UDP that the end users provide any necessary real time confirmation that the message has been received.
|Packet/Datagram||3. Network||Addressing, routing and (not necessarily reliable) delivery of datagrams between points on a network.||The network layer provides the functional and procedural means of transferring variable length data sequences (called datagrams) from one node to another connected to the same network. A network is a medium to which many nodes can be connected, on which every node has anaddress and which permits nodes connected to it to transfer messages to other nodes connected to it by merely providing the content of a message and the address of the destination node and letting the network find the way to deliver (“route”) the message to the destination node. In addition to message routing, the network may (or may not) implement message delivery by splitting the message into several fragments, delivering each fragment by a separate route and reassembling the fragments, report delivery errors, etc.|
|Bit/Frame||2. Data link||A reliable direct point-to-point data connection.||The data link layer provides a reliable link between two directly connected nodes
Point-to-Point Protocol (PPP)
|Bit||1. Physical||A (not necessarily reliable) direct point-to-point data connection.||it defines the electrical and physical specifications of the data connection|
Comparison with TCP/IP model
In the TCP/IP model of the Internet, protocols are deliberately not as rigidly designed into strict layers as in the OSI model. RFC 3439 contains a section entitled “Layering considered harmful“. However, TCP/IP does recognize four broad layers of functionality which are derived from the operating scope of their contained protocols: the scope of the software application; the end-to-end transport connection; the internetworking range; and the scope of the direct links to other nodes on the local network.
Even though the concept is different from the OSI model, these layers are nevertheless often compared with the OSI layering scheme in the following way:
- The Internet application layer includes the OSI application layer, presentation layer, and most of the session layer.
- Its end-to-end transport layer includes the graceful close function of the OSI session layer as well as the OSI transport layer.
- The internetworking layer (Internet layer) is a subset of the OSI network layer (see above)
- The link layer includes the OSI data link and physical layers, as well as parts of OSI’s network layer