When studying how computer networks work, sooner or later you will encounter the so-called OSI open network model. The OSI model is crucial for understanding network technologies, and it often presents unexpected challenges for beginners.
In this article, we’ll go over the basic principles of the OSI model and will try to provide an “OSI model for dummies” kind of guide.
Communication protocols (or simply protocols) are necessary so that participants in information exchange can understand each other. A wide variety of protocols are involved in the operation of computer networks, relating to different network layers. For example, a computer's network controller follows a protocol that describes how to convert digital data into an analog signal transmitted over wires. A browser connects to a website using the TCP transport protocol, and a server and a browser communicate using the HTTP protocol.
In other words, a protocol is a set of agreements between software and hardware developers. It describes how programs and devices interact with other programs and devices that support the protocol.
OSI stands for Open Systems Interconnection. It does not refer to Open Source; in this context, "open systems" are systems built on open (publicly available) specifications that conform to established standards.
You will often come across the term "Open Systems Interconnection (OSI) Reference Model." The reference model outlines the layers a network should have and the functions performed at each layer. The OSI model divides all protocols into the following seven layers:
The OSI model does not include descriptions of the protocols themselves; these are defined in separate standards.
Today, the OSI model is not much used in practice. In the past, there were literal implementations with exactly seven layers, but over time, they were replaced by the less prescriptive TCP/IP protocol suite, which underpins the modern Internet.
Nevertheless, the protocols in use today roughly correspond to the OSI layers, and the model is still used as a common language for describing how networks work.
All layers are numbered, starting from the one closest to the data transmission medium. In this case, the first layer of the OSI model is the physical layer. This is where bits of information are converted into signals that are then transmitted through the medium. The physical protocol used depends on how the computer is connected to the network.
For example, in a typical local area network (LAN) using twisted-pair cables, the 100BASE-TX specification (IEEE 802.3u standard) is employed. It defines the cables and connectors, wire characteristics, frequencies, voltage, encoding, and much more. Wi-Fi connections are more complex since data is transmitted over shared radio channels. The interaction of Wi-Fi devices is described by the IEEE 802.11 specification, which, like Ethernet, includes parts of both the physical and data link layers.
When accessing the Internet via a cellular network, GSM specifications are utilized, which include specialized protocols (such as GPRS) that affect not only the first two layers but also the network layer. There are also relatively simple protocols, such as RS232, which is used when connecting two computers via a null-modem cable through COM ports.
Next is the data link layer of the OSI model. At this layer, entire messages (frames) are transmitted instead of just bits. The data link layer receives a stream of bits from the physical layer, identifies the start and end of the message, and packages the bits into a frame. Error detection and correction also take place here. In multipoint network connections, where multiple computers use the same communication channel, the data link layer additionally provides physical addressing and access control to the shared transmission medium.
Some tasks theoretically handled by protocols at this layer are addressed in the Ethernet and Wi-Fi specifications; however, there is more. Network interfaces in multipoint connections recognize each other using special six-byte identifiers—MAC addresses. When configuring a network, network adapters must know which device is responsible for which network address (IP address) to send packets (blocks of data transmitted in a packet-switched mode) to their destinations correctly. The ARP (Address Resolution Protocol) is used to automatically build tables that map IP addresses to MAC addresses.
In point-to-point connections, ARP is not needed. However, the PPP (Point-to-Point Protocol) is often used. In addition to frame structure and integrity checks, PPP includes rules for establishing a connection, checking line status, and authenticating participants.
The next level is the network layer of the OSI model. It is designed to build large, composite networks based on various networking technologies. At this level, differences between different data link layer technologies are reconciled, and global addressing is provided, allowing each computer on the network to be uniquely identified. Routing is also performed here, determining the path for packet forwarding through intermediate nodes.
It’s sometimes said that in the Internet, the IP (Internet Protocol) functions as the network layer. This is true in a sense: IP defines the structure of individual packets transmitted through gateways, the system of network addresses, and some other functions. However, several other protocols can also be attributed to the network layer, even though they operate "on top" of the IP protocol.
One of the most important of these is the Internet Control Message Protocol (ICMP). It enables communication between network participants regarding various normal and abnormal conditions, including link failures, the absence of a suitable route, and other delivery issues. Sometimes, ICMP messages contain recommendations for using alternative routes.
Packets transmitted over a network using network layer protocols are typically limited in size. They may arrive out of order, be lost, or even duplicated. Application programs require a higher level of service that ensures reliable data delivery and ease of use. This is precisely the role of transport layer protocols in the OSI model. They monitor packet delivery by sending and analyzing acknowledgments, numbering packets, and reordering them correctly upon arrival.
As mentioned earlier, network layer protocols do not guarantee packet delivery. A sent packet might be lost, duplicated, or arrive out of sequence. The content of such a packet is usually called a datagram.
One of the simplest transport protocols is the User Datagram Protocol (UDP). Participants in network communication running on the same computer are identified by integers called port numbers (or simply ports). The UDP protocol requires that the data sent over the network be accompanied by the sender’s and receiver’s port numbers, the length of the datagram, and its checksum. All of this is “wrapped” into a packet according to the IP protocol's conventions. However, the responsibility for acknowledgments, retransmissions, splitting information into smaller pieces, and reassembling it in the correct order falls on the software developer. Therefore, UDP does not protect against packet loss, duplication, or disorder — only the integrity of data within a single datagram is ensured.
There is also a second type of transport interaction — stream-based communication. Here, all issues related to packet loss and data reconstruction from fragments are handled by the transport protocol implementation itself, which makes it significantly more complex than datagram-based protocols. The corresponding transport protocol used on the Internet is TCP (Transmission Control Protocol). Unlike UDP, TCP stream communication requires establishing a connection. It guarantees that all bytes written to the stream will be available for reading on the other end and in the correct order. If this guarantee cannot be upheld, the connection will be terminated, and both parties will be informed.
The TCP protocol includes a number of sophisticated agreements, but fortunately, all of these are handled by the operating system.
Identifying which real-world protocols correspond to the remaining three layers is somewhat more difficult. Following the transport layer comes the session layer. According to the creators of the OSI model, its purpose is to establish communication sessions. This includes managing the order of message transmission during dialogues (such as in video conferences), handling concurrent access to critical operations, and providing protection against connection loss (synchronization function).
The problem is that, in practice, all of these functions are either implemented by application-layer protocols or by even higher-level mechanisms that fall outside the scope of the OSI model. As a result, the session layer is not used in real networks.
The next layer is the presentation layer. Its task is to present data in a form that is understandable to both the sender and the receiver. This includes various data formats and interpretation rules, such as text encoding protocols (like ASCII, UTF-8, and KOI8-R), specifications for different versions of HTML/XHTML, image formats (JPEG, GIF, PNG), the MIME specification set, and others. This is also the layer where encryption and decryption are implemented. The most popular examples are TLS (Transport Layer Security) and SSL (Secure Sockets Layer).
The application layer is the most straightforward. It facilitates the interaction of user-facing applications. This includes email, the World Wide Web, social networks, video and audio communication, and so on.
The OSI model was adopted by the International Organization for Standardization (ISO) in 1983, a time when networking technologies were rapidly developing. While the committee debated standards, the world gradually shifted to the TCP/IP stack, which began to displace other protocols. When the OSI protocol implementations were finally released, they were met with a wave of criticism. Critics pointed out their incompatibility with real technologies, incomplete specifications, and limited capabilities compared to existing protocols.
Additionally, experts considered the division into seven layers to be unjustified. Some layers were rarely used, and the same tasks were often handled at multiple different layers. Specialists joke that the OSI model ended up with seven layers because the committee had seven subcommittees, and each proposed its own addition. Meanwhile, the TCP/IP protocol suite, which underpins the entire modern Internet, was developed by a small group of people in an ad hoc fashion—solving problems as they arose, with no committees involved.
However, not everything is negative. A clear advantage of the OSI model is its strong theoretical foundation for network communication, making it a standard reference for documentation and education. Some believe that all is not lost and that the model may still find a role—for example, in cloud computing.