The Open Systems Interconnection (OSI) model describes how computer networks communicate with each other. Introduced in the late 1970s and standardized in 1984, the OSI provides a conceptual framework for understanding the processes involved when data is transferred between two networked systems.
In this comprehensive guide, we will explore:
- The history and purpose of the OSI model
- A detailed overview of each of the seven OSI layers
- How the OSI model allows different networked systems to communicate
- The key differences between the OSI model and TCP/IP
- Why the OSI model remains essential for modern networking
Whether you‘re a software developer or network engineer looking to expand your knowledge, or simply curious about how computer networking works, read on for a complete explanation of this foundational networking model.
History and Purpose of the OSI Model
In the 1970s, networking technology was still relatively new. Many different proprietary standards and protocols had emerged, which meant that equipment from different manufacturers was often incompatible. This fragmentation hindered innovation and the advancement of networking technology.
To address this, the International Organization for Standardization (ISO) set up a working group focused on Open Systems Interconnection (OSI). The goal was to create an open, standardized model for computer networking that would enable interoperability between diverse systems and technologies.
After extensive work throughout the 1970s, the OSI working group published the OSI reference model in 1984. This defined seven distinct layers for the networking process, with standardized protocols and interfaces between each layer. This modular approach made it much simpler to troubleshoot interoperability issues between different networks and systems.
The OSI model brought some much-needed structure and unity to the fast-evolving world of computer networking in the 80s and 90s. It enabled networks to become more scalable and simplified the process of developing networking software and hardware.
Although TCP/IP has become the standard networking model used for the modern internet, the OSI model remains an essential conceptual framework. It continues to inform network engineering and the development of innovative protocols and technologies today.
The 7 Layers of the OSI Model
The OSI model consists of seven hierarchical layers, each focused on specific networking functions. Let‘s take a closer look at the distinct role of each layer, from top to bottom:
Layer 7: Application Layer
The application layer serves as the interface between the user and the network. This layer deals with high-level data communication, including application protocols that allow software programs to exchange information.
Some key application layer protocols include:
- HTTP (Hypertext Transfer Protocol) – defines communication between web browsers and servers
- SMTP (Simple Mail Transfer Protocol) – handles sending and receiving email
- FTP (File Transfer Protocol) – allows transfer of files between hosts
When you use networking applications like your web browser or email client, you are interacting solely with the application layer. Lower levels handle the complex work of reliably transmitting your data across the physical network infrastructure.
Layer 6: Presentation Layer
The presentation layer is responsible for preparing data for communication. It handles:
- Data formatting – converts data into a standardized format that other systems can understand
- Data encryption – encrypts data for security purposes before transmitting over the network
- Data compression – compresses data to optimize transfer speed and efficiency
Common presentation layer standards used today include encryption protocols like SSL/TLS, data compression formats like JPEG and MPEG, and text formatting languages like HTML, XML, and JSON.
Layer 5: Session Layer
The session layer is responsible for opening, closing, and managing communication sessions between the local and remote hosts. Key jobs for this layer include:
- Establishing, maintaining, and synchronizing communication sessions
- Performing security checks and authentication when a session is established
- Performing checkpointing and recovery of sessions if there is an interruption of communication
Examples of protocols operating at the session layer are RPC (Remote Procedure Call) and SQL (Structured Query Language).
Layer 4: Transport Layer
The transport layer handles reliable transmission of data between hosts. This layer segments data from the session layer into smaller units called segments or datagrams. It then assigns sequence numbers and transport headers to each segment for accurate reassembly later.
Other key responsibilities include:
- Flow control and congestion control to regulate data transfer speed
- Error checking to ensure corrupted data is retransmitted
- Providing acknowledgements when packets are received successfully
Important transport layer protocols include TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).
Layer 3: Network Layer
The network layer, also called the internet layer, handles the routing of data on the network. This involves examining the destination address in data packets and determining the most efficient route across multiple networks.
Key functions include:
- Logical addressing – generates logical IP addresses for hosts
- Routing – determines the best path for transferring data based on network conditions
- Packet forwarding – moves packets from the source network to destination via routers
Significant network layer protocols include IP (Internet Protocol), ICMP (Internet Control Message Protocol), and IPSec (Internet Protocol Security). These standards define addressing schemes, error reporting, and security features for transmitting data between networks.
Layer 2: Data Link Layer
The data link layer handles point-to-point delivery of data on the physical network. This layer receives packets from the network layer and breaks them into smaller frames for transmission to the physical layer.
Some of the key functions include:
- Framing – encapsulates packets into frames, adding MAC addresses and trailers
- Media access control – determines when network nodes can transmit on shared lines
- Error checking – detects and retransmits corrupted frames
Examples of data link protocols are Ethernet for LANs (Local Area Networks) and PPP (Point-to-Point Protocol) for point-to-point serial connections.
Layer 1: Physical Layer
The physical layer handles the physical transmission of raw data in bits across the network media. It deals with the hardware means of sending and receiving signals on physical media like cables and interfaces.
Key functions involve:
- Bit-level transmission – encodes 1s and 0s data into signals
- Specifying voltage levels, timings, and cable specifications
- Initializing, maintaining, and terminating physical links
At this base level of networking there are many diverse physical layer standards specifying different cable types and network interfaces, including standards like USB, Bluetooth, Ethernet over twisted pair, and fiber optic links.
How the OSI Layers Work Together
So in summary, data communication begins at the application layer, travels down through each intermediate layer, which adds more information along the way, until it reaches the physical layer where the raw data is actually placed on the network media.
This encapsulation of data works in reverse on the receiving system – the data climbs back up through the layers as headers are removed at each stop. This process allows very complex functions like addressing, routing, flow control, and error checking to happen automatically behind the scenes.
To visualize how this process allows two different hosts with different hardware and software to seamlessly communicate, let‘s walk through a basic example of a web request:
- You open your web browser (Google Chrome) and request the URL of examplesite.com by typing it into the address bar
- The browser operates at the application layer and uses the application protocol HTTP to construct an HTTP GET message addressed to examplesite.com
- The presentation layer may compress, encrypt, or otherwise format the HTTP request data
- The session layer opens a session between the client and server site
- At the transport layer the data is broken into TCP segments with sequence numbers and checksums added
- The network layer adds source and destination IP addresses to creates data packets for routing
- Packets are converted to frames at the data link layer, with MAC addressing and trailers added
- The physical layer converts data to 1s and 0s and places this encoded signal onto the network cable…
- The server performs these same steps in reverse order as the request climbs back up through the OSI layers
- The presentation layer decrypts data if needed, decompresses it, and converts formats
- The application layer reads the HTTP GET request and forms an HTTP response containing the requested web page content
- This response is passed back down through the layers, encapsulated with all necessary headers for delivery over the network media
- Your browser displays the web page once the response data reaches the application layer on your machine
This simplified example illustrates how different hosts can have entirely different hardware and software, yet still communicate easily thanks to the common protocols and interfaces defined at each layer of the OSI model.
OSI Model vs. TCP/IP
Today the TCP/IP model is the standard protocol stack used for Internet communications. This model defines just four abstract layers, which roughly map to the first four layers of the OSI model:
OSI Model | TCP/IP Model |
---|---|
Application (Layer 7) | Application |
Presentation (Layer 6) | Application |
Session (Layer 5) | Application |
Transport (Layer 4) | Transport |
Network (Layer 3) | Internet |
Data Link (Layer 2) | Network Interface |
Physical (Layer 1) | Network Interface |
As this table shows, TCP/IP combines the highest three OSI layers into a single "application" layer. So why has TCP/IP become the standard over OSI for modern networks?
A few key reasons:
- TCP/IP is simpler to implement. Reducing the number of layers speeds up processing.
- TCP/IP protocols were pioneered first and adopted widely before OSI standardization.
- The OSI specifications are quite complex compared to TCP/IP.
- TCP/IP maps well to how the Internet functions.
However, while TCP/IP has some advantages for practical deployment, the OSI model still remains very useful as an educational and troubleshooting tool. Its seven layers provide more granular visibility into complex networking processes.
OSI also continues to inform much of the work of standards bodies in developing innovative networking technologies. So understanding OSI gives you insight both into the current state of networking and where things might evolve in future.
Why The OSI Model Remains Relevant
Given that TCP/IP is the de facto standard for modern networking, is the OSI model still relevant today? Absolutely! Here are some of the key reasons why:
Conceptual Framework
The OSI model remains an essential pedagogical tool for any IT professionals, software developers, engineers or students seeking to understand inter-system communication fundamentals. By breaking the complex process of computer networking down into seven logical layers, the OSI model enables easier learning. Even though TCP/IP has largely superseded OSI operationally, conceptually the OSI framework offers an intuitive mental model for understanding the key functions of computer networks.
Informs Protocol & Standards Development
Behind the scenes, the OSI model continues to inform much of the work carried out by international standards bodies like the IETF (Internet Engineering Task Force) and IEEE (Institute of Electrical and Electronics Engineers) in developing the specifications and protocols that the modern Internet relies on. So for those involved in designing and engineering cutting-edge network technologies, understanding the OSI framework is essential.
Assists Troubleshooting
Because the OSI model isolates networking functions into seven layers, it can simplify troubleshooting interoperability issues between systems. Identifying which layers are communicating successfully narrows down where problems may be occurring between devices. So while TCP/IP may be used operationally, mapping problems back to the OSI model aids diagnosing and fixing them.
Local Network Communications
While TCP/IP now predominates for Internet communications, within some private business networks OSI protocols are still utilized where they better suit security, performance or operational requirements. The modular OSI approach also offers benefits for modern high-bandwidth applications like Voice over IP (VoIP), audio-visual streaming, and real-time videoconferencing across Local Area Network (LAN) and Virtual Private Network (VPN) infrastructure.
Conclusion
Developed in the 1970s and standardized in 1984, the OSI model brought much-needed unity and interoperability to the fragmented world of computer networking. It made possible the high degrees of sophisticated networking we take for granted today.
And while operationally the TCP/IP stack has become the standard for Internet communications, conceptually the seven-layer OSI model remains an essential tool for understanding and troubleshooting complex networked communications. It continues to provide immense value for networking students, engineers, software developers and IT professionals.
With granular visibility into the encapsulation, formatting, routing and transmission of data across physical media, the OSI framework gives unparalleled insight into the intricacies of computer network communication.