The open systems interconnection (OSI) model is a model created by the International Organization for Standardization that enables diverse communication systems to communicate using standard protocols.
In plain English, the OSI provides a standard (language, if you may) for different computer systems to be able to communicate with each other.
This framework structures communication into seven distinct layers, each building on the services provided by the layer below it. Together, the layers define an abstract model for passing data between two networked end points.
Why We Need The OSI Model
This modular approach is valuable in analyzing and troubleshooting connectivity issues. If a network problem can be isolated to a single layer, for example, faulty cabling at the physical layer, you can target solutions more precisely.
And because today’s Internet protocol suite closely aligns with the layered OSI approach, the model still provides crucial insight when diagnosing cloud infrastructure outages or distributed denial of service (DDoS) attacks.
The 7 Layers of The OSI Model
Here are the 7 layers of the OSI Model from top to bottom:
Layer 7: The Application Layer
The application layer sits at the very top of the OSI model. It provides network services to end-user software such as web browsers, email programs, video conferencing apps, games, and everything we humans directly interact with.
This layer essentially manages and controls user-level access to network communications. It provides standardized interfacing, information formatting, and representation that allows users to access network services without having to deal with lower-level details.
Also Read: Understanding DDoS attacks and how to defend against them
For example, when you open a webpage in your browser, the HTTP requests and responses used to load the webpage are Layer 7 events. This means that the Application Layer is responsible for initiating these requests and handling the responses.
Some examples of application layer protocols and their usage:
- HTTP (Hypertext Transfer Protocol) – used by web browsers and servers to transmit web pages, images, video, API data and such. For example, Firefox sending requests and receiving HTML & assets from servers.
- SMTP (Simple Mail Transfer Protocol) – used by email clients and servers to send and receive email messages, attachments across the Internet. For example, Gmail client accessing Gmail servers to send an email.
- FTP (File Transfer Protocol) – used for uploading and downloading files between client and server over the network. For example transferring files between your computer and a remote server.
- SSH (Secure Shell) – used for securely logging into remote systems and servers, executing commands and transferring files. For example admins accessing servers remotely via command line interface.
In summary, the Application Layer is like a translator that allows your software applications to communicate with the network and use its resources. It’s the layer that you, as a user, interact with directly when you use network-based applications.
Layer 6: The Presentation Layer
Layer 6 of the OSI model is known as the Presentation Layer. This layer is responsible for the formatting and delivery of information to the Application Layer for further processing or display.
The Presentation Layer can be thought of as the layer that translates the data between the application and the network format. Applications running on the local system may or may not understand the format that is used to transmit the data over the network. The Presentation Layer works as a translator.
For example, it converts the ASCII text that you type into a network standard format for transmission over the network. Then, when it receives network-standard formatted data, it converts it back into ASCII text for your application to use.
Also Read: Understanding HEIC: The space-saving photo format on iPhones
In addition to translation, the Presentation Layer is also responsible for data compression and encryption. Data compression reduces the bandwidth needed to transmit the data, and encryption ensures that the data can only be read by the intended recipient.
In summary, the Presentation Layer ensures that the data that the Application Layer of one system sends out can be read by the Application Layer of another system, regardless of how the data is formatted or what kind of systems are being used.
Layer 5: The Session Layer
The Session Layer manages the open and close of communication between two hosts. It establishes, maintains, and synchronizes their interaction – known as a session – for as long as needed to complete the data exchange.
When you connect to a website for example, the Session Layer creates a session to handle that active communication. It makes sure the session remains open long enough to transfer the webpage content, transaction information, or media streams.
It also ends inactive sessions after an allotted timeout period, closing dangling connections that are no longer transferring data.
So in essence, the session layer establishes order by keeping host interactions time-bounded and purposeful. This optimized opening and closing of communication channels ensures resources are conserved on the network.
The hosts can easily pick up where they left off in a time-synchronized manner by opening another coordinated session when needed. So whether it’s short lived or persists over time, the session layer keeps inter-host communication organized and efficient.
Layer 4: The Transport Layer
The transport layer provides reliable transmission of data between two hosts on a network. It takes data from the higher session layer, breaks it up into smaller pieces if needed, passes these pieces to lower layers, and ensures they arrive correctly at the other end.
This layer handles a lot of the dirty work needed for reliable communication:
- Flow control – Managing the amount of data exchanged per second to prevent overwhelm
- Segmentation – Breaking up large amounts of session layer data into smaller packages
- Connection establishment – Setting up and dismantling communication channels
- Error checking – Detecting errors and correcting them if possible using retries
Some well known transport layer protocols and their uses:
TCP (Transmission Control Protocol):
- Provides reliable, ordered data delivery
- Confirms data arrival
- Handles segmentation and flow control
- Used for web traffic, emails, file transfers
UDP (User Datagram Protocol):
- Minimal overhead, no error correction
- Quick transmission of real-time data
- Used for video chats, voice calls, livestreams
So in essence, this layer manages host-to-host communication integrity across the network. The segmentation, sequencing, and error handling it provides creates reliable end-to-end connections. This allows the higher layers to focus on managing sessions and application data.
Layer 3: The Network Layer
The network layer handles the routing and forwarding of data packets across different networks. If the two devices communicating are on the same network, then the network layer is unnecessary.
It takes packets from the transport layer, assigns logical addresses to them (IP addresses), and decides which route they take to reach their destination. Routers operate in this layer.
This layer has two key jobs:
- Logical Addressing
- Assigns IP addresses to devices so they can be identified on internetworks
- For example, your computer has an IP address assigned by your WiFi router
- Routing
- Determines the best path for data to take across networks
- Routes packets based on logical IP addresses to reach the destination
- For example, packets routed via routers over the Internet
Some well known network layer protocols:
- IP (Internet Protocol) – The fundamental network layer protocol for the internet and internal TCP/IP networks
- ICMP (Internet Control Message Protocol) – Reports errors and provides diagnostics
- ARP (Address Resolution Protocol) – Translates IP addresses to physical MAC addresses
So in summary, the network layer handles the logical addressing and transmission of data in packets or datagrams between computers across diverse interconnected networks. This routing functionality creates internetwork communication channels.
Layer 2: The Data Link Layer
The data link layer is very similar to the network layer, except the data link layer facilitates data transfer between two devices on the same network. Switches operate in this layer.
The data link layer takes packets from the network layer and breaks them into smaller pieces called frames.
This layer has two main functions:
- Framing
- Breaks down packets from network layer into smaller pieces called frames
- Adds physical hardware addresses of source and destination
- Addressing
- Uses MAC (media access control) addressing to identify devices on a LAN
- MAC is the unique hardware ID assigned to network adapters
The data link also provides flow control and error checking mechanisms. It ensures data transfer is reliable between two physically connected nodes before passing frames to the physical layer.
Some common data link protocols:
- Ethernet – Frames traffic on local area networks with MAC addressing
- PPP (Point-to-Point Protocol) – Connects individual devices like computers, routers
- FDDI (Fiber Distributed Data Interface) – High speed fiber optic LAN transmission
So in essence, the data link layer establishes reliable direct host-to-host connections locally before handing data off to be transmitted physically. This builds secure lanes for networked communication one hop at a time.
Layer 1: The Physical Layer
The physical layer deals with the physical equipment involved in data transmission. It conveys the binary 0s and 1s of digital information as real world signals that get transmitted from one device to another over physical media.
This bottom most layer defines the electrical, mechanical, procedural characteristics for data transmission between devices. Some examples:
- Cables and connectors specifications
- Signal voltages and timing
- Layout of pins and wires
- Frequency ranges
- Wireless signal frequencies
- Modulation schemes
- Bit rate limits
Physical layer standards and protocols deal with:
- Interfaces mechanical properties
- Converting digital bitstreams into electrical signals
- Specifying signal propagation timing
Some examples of physical layer interfaces and systems:
- Ethernet physical structure
- USB cables and ports
- WiFi (Wireless Fidelity) radio signals
- Fiber optic light pulses
All communication that happens on networks relies on the physical layer converting digital communication into tangible signals.
It transforms the invisible 1s and 0s into forms that travel physically between sending and receiving devices.
Wrapping Up
That covers the basics of the 7 OSI model layers! Understanding what functions each layer serves helps shed light on the overall communication that happens across networks and the internet.
Next time you use a networked app, you’ll know that many layers are working in harmony behind the scenes to make it work!