Table of Contents |
The OSI Model, also known as the OSI Stack or Open Systems Interconnection Model, is a fundamental concept used in computer development to standardize interactions of devices that need to communicate with each other. Whether it involves designing computer hardware, networking hardware, or software, the OSI Model plays a role in guiding developers on how data should flow through the various levels of computer technology.
View this video to learn each of the seven layers of the Open Systems Interconnection, or OSI, model with this easy mnemonic trick.
The OSI Model contains seven layers described in the table below:
| Layer | Name | Function |
|---|---|---|
| 7 | Application | Users interact with applications that use network services to access resources. |
| 6 | Presentation | Data is encoded into a usable format and may be encrypted for privacy. |
| 5 | Session | This layer maintains communication sessions between different systems. |
| 4 | Transport | This layer determines how the data will be transmitted, using Transport Layer Protocol (TCP) or User Datagram Protocol (UDP). |
| 3 | Network | This layer is responsible for determining the physical path the data will take across multiple networks. |
| 2 | Data Link | This layer defines the format of data on the network and associates the physical Media Access Control (MAC) address of the network interface card with the virtual IP address of the system. |
| 1 | Physical | The physical layer is responsible for converting the data into a physical signal representing the raw bits and transmitting it to another device. |
IN CONTEXT![]()
One way to remember the seven layers in the OSI model is to use the mnemonic “Please Do Not Throw Sausage Pizza Away.” Moving in order from Layer 1 to Layer 7.:
Please 1. Physical Do 2. Data Link Not 3. Network Throw 4. Transport Sausage 5. Session Pizza 6. Presentation Away 7. Application
OSI Model (Open Systems Interconnection Model)
A fundamental concept that standardizes network protocols and technology. The OSI Model contains seven layers with specific responsibilities. Also called OSI Stack.
The following table shows how information is communicated through the OSI stack:
| Layer | Computer A | Computer B |
|---|---|---|
| 7 |
Information written by a user into a web-enabled messaging application enters the word “Hello” into the text box and clicks Send.
|
The word “Hello” is displayed on the screen within the messaging application.
|
| 6 |
The letters of the message are encoded as numbers using a character encoding set by the presentation layer.
|
The presentation layer unencodes the message from numbers to the original, human-readable message “Hello”.
|
| 5 |
The session layer was used to establish the connection between the user’s computer and a remote computer and associate the encoded message with the messaging session.
|
Port numbers and identifiers are used to associate the incoming message with a particular application.
|
| 4 |
The transport layer is used to determine how the message will be transmitted using either TCP or UDP.
|
The transport layer then reassembles the message using the appropriate mechanisms. For TCP, the sequence numbers are used to reassemble the original message, and any lost or damaged packets are resent by the origin. In the case of UDP, the packets are simply processed up to the next layer.
|
| 3 |
The message is formatted into a network packet that uses IP addresses to track the origin and destination systems involved in the communication.
|
The frames are then reassembled into the original network packet and the IP addresses are examined.
|
| 2 |
The network packet is then segmented and formatted into data frames to be transmitted to the next device. Physical MAC addresses are used to track the frame from this device to the next connected device.
|
The NIC sends the received frames to be reassembled and the MAC addresses are examined.
|
| 1 |
The NIC (network interface card) converts the bits of the frame into either electrical, light, or radio signals and transmits them to the next device.
|
The bits are received and assembled in the NIC’s memory.
|
|
||
Keep in mind that the table above only represents the data flow from the origin system to the destination system as if they were connected directly to each other. In reality, there are many other intermediate systems and networking devices that sit between the origin and destination. When the data reaches an intermediate system, the data must flow up through some, if not all, of the layers before being sent down through the layer again onto the next system. This process continues until the network packet finally reaches the system whose IP address matches the packet’s destination IP address.
Network Packet
Formatted data units that contain control information and a payload of data and are transmitted across a network.
Source: This Tutorial has been adapted from "The Missing Link: An Introduction to Web Development and Programming " by Michael Mendez. Access for free at https://open.umn.edu/opentextbooks/textbooks/the-missing-link-an-introduction-to-web-development-and-programming. License: Creative Commons attribution: CC BY-NC-SA.