Networking is a vast topic. The OSI model helps us better understand it. In this article, we will cover the OSI model. The Open Systems Interconnection (OSI) model is a conceptual framework that describes the functions of a networking or telecommunication system in seven layers.
The OSI model describes how a network functions and standardizes the way that systems send information to one another. In this article, we will introduce you to the OSI model and discuss each layer in detail.
We will cover the following:
Take a deep dive on everything network-related
This course will teach you the fundamentals of networks, socket programming in Python, command-line tools and the main protocols of each layer.
Developed in 1984, the Open Systems Interconnection or OSI model is a seven-layer model used to describe networking connections. It was initially developed by ISO, the International Organization for Standardization in 1984 and is now common practice for learning networking concepts.
The OSI models specifies how information is transmitted from a network device like a router to its destination through a physical medium and how it interacts with the application. In other words, it provides a standard for different systems to communicate with each other.
We will go through the different layers in detail below, but keep in mind that the upper layers (first 4) are about transport issues like the physical characteristics of the network and data transmission.
The lower layers (last 3) are about application issues like data formatting and user interfacing.
Some people argue that the OSI model is obsolete because it is less important than the four layers of the TCP/IP model, but this is not true. The OSI model is essential theory for understanding modern computer network technology in a connection-oriented way.
Most discussions on network communication include references to the OSI model and its conceptual framework.
The purpose of this model is to enhance interoperability and functionality between different vendors and connectors. It describes the functions of a networking system. From a design point of view, it divides larger tasks into smaller, more manageable ones.
The OSI model allows network administrators to focus on the design of particular layers. It is also useful when troubleshooting network problems by breaking them down and isolating the source.
At the lowest layer of the OSI reference model, the physical layer is responsible for transmitting unstructured data bits across the network between the physical layers of the sending and receiving devices. In other words, it takes care of the transmission of raw bit streams.
The physical layer may include physical resources like cables, modems, network adapters, and hubs, etc.
The data link layer corrects any errors that may have occurred at the physical layer. It ensures that any data transfer is error-free between nodes over the physical layer. It is responsible for reliable transmission of data frames between connected nodes.
The data is packaged into frames here and transferred node-to-node. The data layer has the following sub-layers
Learn networking fundamentals without scrubbing through videos or documentation. Educative’s text-based courses are easy to skim and feature live coding environments, making learning quick and efficient.
The network layer receives frames from the data link layer and delivers them to the intended destination based on the addresses inside the frame. It also handles packet routing. The network layer locates destinations using logical addresses like the IP. Routers are a crucial component at this layer as they route information to where it needs to go between different networks.
The main functions of the Network layer are:
The transport layer is responsible for delivering, error checking, flow control, and sequencing data packets. It regulates the sequencing, size, and transfer of data between systems and hosts. It gets the data from the session layer and breaks it into transportable segments.
Two examples of the Transport Layer are the UDP (User Datagram Protocol) and TCP (Transmission Control Protocol) that is build on top of the Internet Protocol (IP model), which work at layer 3.
The session layer will create communication channels, called sessions, between different devices. This layer is responsible for opening those sessions and ensuring that they’re functional during data transfer.
In other words, the session layer is responsible for establishing, managing, and terminating communication sessions with the lower layers with the presentation and application layer. It is also responsible for authentication and reconnections, and it can set checkpoints during a data transfer—if.
The presentation layer is responsible for ensuring that the data is understandable for the end system or useful for later stages. It translates or formats data based on the application’s syntax or semantics. It also manages any encryption or decryption required by the application layer. It is also called the syntax layer.
The application layer is where the user directly interacts with a software application, so it is closest to the end user. When the user wants to transmit files or pictures, this layer interacts with the application communicating with the network. The application layer identifies resources, communication partners, and synchronizes communication.
Other functions of the application layer are the Network Virtual Terminal and FTAM-File transfer access, and mail/directory services. The protocol used depends on the information the user wants to send. Some common protocols include:
Examples of communications that use Layer 7 are web browsers (Chrome, Firefox, Safari).
Here is how data flows through the OSI model. Let’s say you send an email to a friend. Your email passes through the application layer to the presentation layer. This layer will compress your data.
Next, the session layer initializes communication. It will then be segmented in the transportation layer, broken up into packets in the network layer, and then into frames at the data link layer. It will then be sent to the physical layer where it is converted to 0s and 1s and sent through a physical medium like cables.
When your friend gets the email through the physical medium, the data flows through the same layers but in the opposite order. The physical layer will convert the 0s and 1s to frames that will be passed to the data link layer. This will reassemble the frames into packets for the next layer.
The network layer will assemble the segments into data. The data is then passed on to the presentation layer that ends the communication session. The presentation layer will then pass the data to the application layer. The application layer feeds the human-readable data to the email software that will allow your friend to read your email.
Congratulations on making it to the end. I hope you now know what the OSI model is, how the OSI layers work, and why you need to know about it. These concepts are essential for understanding how networks function.
This was just the beginning, and there is a lot you can learn. You can start with:
To get hands on with these concepts, check out Educative’s course Grokking Computer Networking for Software Engineers. You will learn about networks, command-line tools, socket programming in Python, all in a hands-on environment. Any software engineer can benefit from a solid grasp on these concepts.
Join a community of 500,000 monthly readers. A free, bi-monthly email with a roundup of Educative's top articles and coding tips.