The OSI model is not a protocol; it is a model for understanding and designing a network architecture that is flexible, robust, and interoperable. The OSI model was intended to be the basis for the creation of the protocols in the OSI stack.
Physical Transmission: At the Physical Layer (Layer 1), the encapsulated data is converted into an electromagnetic signal and transmitted over a physical medium.
Reception and Decapsulation: Upon reaching the destination, the signal is converted back into digital form at the Physical Layer (Layer 1). The data units move upward through the layers, with each layer removing its corresponding header and processing the data.
Application: By the time the data reaches the Application Layer (Layer 7) of the receiving device, it is in a form appropriate for the application and is made available to the recipient.
Layered Architecture
The OSI model is a layered framework for the design of network systems that allows communication between all types of computer systems without requiring changes to the underlying hardware and software. It achieves this by dividing the network communication process into seven distinct layers. Each layer is responsible for a specific aspect of the communication process moving information across a network.
While developing the model, the designers simplified the data transmission process to its essential elements. They pinpointed networking functions with similar applications and grouped these functions into distinct layers and created an architecture that is both comprehensive and flexible.
While developing the model, the designers simplified the data transmission process to its essential elements. They pinpointed networking functions with similar applications and grouped these functions into distinct layers and created an architecture that is both comprehensive and flexible.
The OSI model layers.
Within a single machine, each layer calls upon the services of the layer just below it. Layer 3, for example, uses the services provided by layer 2 and provides services for layer 4. Between different machines, layer x on one machine communicates with layer x on another machine.Peer-to-Peer Processes
In order for data to travel from the source to the destination, each layer of the OSI model at the source must communicate with its peer layer at the destination using defined protocols. These protocols ensure that the data sent by one machine is correctly interpreted and understood by the receiving machine. This form of communication is referred to as peer-to-peer. During this process, the protocols of each layer exchange information, called protocol data units (PDUs). Each layer of communication on the source computer communicates with a layer-specific PDU, and with its peer layer on the destination computer. The processes on each machine that communicate at a given layer are called peer-to-peer processes.The interaction between layers in the OSI model
The upper four layer (Application, Presentation, Session, Transport) on one machine communicates directly with the corresponding same layer on the different machine using defined protocols. Transport layer and above are only involved at the source and destination devices.
Peer-to-peer process means when protocol directly talks to the counter part of the protocol at the receiver. The data packet does not reach transport, session presentation and application layer of the intermediate routers. Data packet will reach those layers at the receiver only and that is why this is called as peer-to-peer process.
On the other hand, there are intermediate nodes as well, because in the routing process, if the destination is far away, there are intermediate routers needed to be visited by the data packet and those routers will then forward it to the next router. For every intermediate router data packet sent from device A will involve up to network layer of that intermediate device. At each intermediate router:
Peer-to-peer process means when protocol directly talks to the counter part of the protocol at the receiver. The data packet does not reach transport, session presentation and application layer of the intermediate routers. Data packet will reach those layers at the receiver only and that is why this is called as peer-to-peer process.
On the other hand, there are intermediate nodes as well, because in the routing process, if the destination is far away, there are intermediate routers needed to be visited by the data packet and those routers will then forward it to the next router. For every intermediate router data packet sent from device A will involve up to network layer of that intermediate device. At each intermediate router:
- Physical Layer: The router receives the bit stream and converts it back into a frame.
- Data Link Layer: The router processes the frame header, performs error checking, and updates the MAC address for the next hop.
- Network Layer: Examines the packet header's destination address to determine the most efficient route for forwarding. It may also update the header information with the address of the next router. After processing, the data packet is passed back to the physical layer to be transmitted to the next router or the final destination.
The data itself remains encapsulated within the packet and is not accessed or unpacked by the intermediate routers. Only the headers at each relevant layer are processed for routing purposes.
While the lower layers (Physical, Data Link, and Network) focus on the actual transmission of data across network segments and intermediary devices, the upper layers are responsible for ensuring that the data is meaningful and useful to the applications on both ends.
For example, the session layer on the sending device must coordinate with the session layer on the receiving device to establish and manage sessions, ensuring synchronized communication.
While the lower layers (Physical, Data Link, and Network) focus on the actual transmission of data across network segments and intermediary devices, the upper layers are responsible for ensuring that the data is meaningful and useful to the applications on both ends.
For example, the session layer on the sending device must coordinate with the session layer on the receiving device to establish and manage sessions, ensuring synchronized communication.
Interfaces Between Layers
The passing of the data and network information down through the layers of the sending device and back up through the layers of the receiving device is made possible by an interface between each pair of adjacent layers. Each interface defines the information and services it must provide for the layer above it. Well-defined interfaces and layer functions provide modularity to a network. As long as a layer provides the expected services to the layer above it, the specific implementation of its functions can be modified or replaced without requiring changes to the surrounding layers.Organization of the Layers
The seven layers of the OSI model are organized into three subgroups based on their functions and roles in the communication process:
Network Support Layers (Layers 1, 2, 3)
Physical Layer (Layer 1): Deals with the physical connection between devices and the transmission of raw bit streams. Involves hardware components like cables, switches, and network interfaces.
Data Link Layer (Layer 2): Manages node-to-node data transfer, framing, error detection, and correction. Uses protocols like Ethernet and PPP.
Network Layer (Layer 3): Handles routing, addressing, and packet forwarding. Uses protocols like IP (Internet Protocol).
Transport Layer (Layer 4)
Serves as the link between the lower network support layers and the upper user support layers. Ensures reliable data transfer and correct sequencing. Uses protocols like TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).
User Support Layers (Layers 5, 6, 7)
Session Layer (Layer 5): Manages sessions and controls dialogues between applications. Establishes, maintains, and terminates communication sessions.
Presentation Layer (Layer 6): Translates data between the application layer and the network. Handles data encryption, decryption, and compression.
Application Layer (Layer 7): Provides network services directly to end-users and applications. Uses protocols like HTTP, FTP, SMTP, and DNS.
Encapsulation
Encapsulation is a process where each layer wraps data with its own header (and sometimes a trailer) before passing it to the next lower layer. Each layer only deals with its own headers and treats the encapsulated packet (header and data) from the higher layer as a single unit of data, not distinguishing between the data and the headers/trailers of the higher layers.
When the data reaches the corresponding layer on the receiving device, they communicate directly using a shared language (protocol) for decapsulating data.
Data Flow Through the OSI Layers
An exchange of data using the OSI model
Encapsulation: At the sending device, data starts at the Application Layer (Layer 7) and moves downward through each layer. Each layer encapsulates the data by adding its own header (H1-7) and sometimes a trailer (T2) at layer 2. These headers and trailers contain control information specific to each layer.
Physical Transmission: At the Physical Layer (Layer 1), the encapsulated data is converted into an electromagnetic signal and transmitted over a physical medium.
Reception and Decapsulation: Upon reaching the destination, the signal is converted back into digital form at the Physical Layer (Layer 1). The data units move upward through the layers, with each layer removing its corresponding header and processing the data.
Application: By the time the data reaches the Application Layer (Layer 7) of the receiving device, it is in a form appropriate for the application and is made available to the recipient.

