OSI Seven Layers Model Explained with Examples (2024)

This tutorial explains the OSI reference model. Learn the seven layers of the OSI model and the functions of each layer in detail through examples.

The OSI (Open System Interconnection) reference model is a comprehensive set of standards and rules for hardware manufacturers and software developers. By following these standards, they can build networking components and software applications that work in any environment. It was published in 1984 by ISO (International Organization for Standardization).

It provides a framework for creating and implementing networking standards, devices, and internetworking schemes. It explains the networking from a modular perspective, making it easier to understand and troubleshoot.

Seven layers of the OSI Model

The OSI model has seven different layers, which are divided into two groups. The following table lists all the layers with their names and numbers.

Group Layer Number Layer Name Description
Top Layers 7 Application Provide a user interface for sending and receiving data
6 Presentation Encrypt, format, and compress data for transmission
5 Session Initiate and terminate a session with the remote system
Bottom Layers 4 Transport Break the data stream into smaller segments and provide reliable and unreliable data delivery
3 Network Provide logical addressing
2 Data Link Prepare data for transmission
1 Physical Move data between devices

OSI Seven Layers Model Explained with Examples (1)

Let’s understand each layer in detail.

This tutorial is the second part of the article "Networking reference models explained in detail with examples.". Other parts of this article are the following.

OSI Model Advantages and Basic Purpose Explained

This tutorial is the first part of the article. It summarizes why the OSI model was created and what advantages it has.

Similarities and Differences between OSI and TCP/IP Model

This tutorial is the third part of the article. It compares the OSI reference model with the TCP/IP model and lists the similarities and differences between both.

TCP/IP Reference Model Explained

This tutorial is the fourth part of the article. It explains the five layers of the TCP/IP model in detail.

Data Encapsulation and De-encapsulation Explained

This tutorial is the fifth part of the article. It explains how data is encapsulated and de-encapsulated when it passes through the layers.

The Application Layer

This is the last and topmost layer of the OSI model. This layer provides an interface between the local system and the application program running on the network. If an application wants to use the resources available on the remote system, it interacts with this layer. Then, this layer provides the protocols and services that the application needs to access those resources.

There are two types of application programs: Network-aware and Network-unaware. An application program is considered a Network-aware application if it can make any type of network request. If an application program cannot make any type of network request, it is considered a Network-unaware program.

Network-aware programs are further divided into two types.

  1. Programs that are mainly built to work on a local system. This type of program occasionally accesses the network for particular reasons such as updates, documentation, and troubleshooting. MS-Word, Adobe-Photoshop, and VLC Player are examples of this type of program.

  2. Programs that are mainly built to work with a remote system. This type of program provides a platform to access resources available on a remote system. This type of program only works if the system is connected to the network. SSH, FTP, and TFTP are examples of this type of program.

The Application layer describes only the programs which fall in the second type. But it doesn’t mean that the first type of programs can’t take the advantage of the Application layer. It simply means that they are not documented in the Application layer. But if required, they can also connect to the network through the Application layer.

The Top layer of the OSI model is the application layer. It provides the protocols and services that are required by the network-aware applications to connect to the network. FTP, TFTP, POP3, SMTP, and HTTP are examples of standards and protocols used in this layer.

The Presentation Layer

The sixth layer of the OSI model is the Presentation layer. 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. When receiving data from the Application layer, it converts that data in such a format that can be sent over the network. When receiving data from the Session layer, it reconverts the data in such a format that the application, which will use it, can understand.

Conversion, compression, and encryption are the main functions that the Presentation layer performs on the sending computer while on the receiving computer these functions are reconversion, decompression, and decryption. ASCII, BMP, GIF, JPEG, WAV, AVI, and MPEG are examples of standards and protocols that work in this layer.

The Session Layer

The session layer is the fifth layer of the OSI model. It is responsible for setting up, managing, and dismantling sessions between presentation layer entities and providing dialogs between computers.

When an application makes a network request, this layer checks whether the requested resource is available on the local system or on a remote system. If the requested resource is available on a remote system, it tests whether a network connection to access that resource is available or not. If a network connection is not available, it sends an error message back to the application informing that the connection is not available.

If a network connection is available, it establishes a session with the remote system. For each request, it uses a separate session. This allows multiple applications to send or receive data simultaneously. When data transmission is completed, it terminates the session.

The session layer is responsible for establishing, managing, and terminating communications between two computers. RPCs and NFS are examples of the session layer.

The Transport Layer

The transport layer is the fourth layer of the OSI model. It provides the following functionalities: -

Segmentation

On the sending computer, it breaks the data stream into smaller pieces. Each piece is known as a segment and the process of breaking the data stream into smaller pieces is known as the segmentation. On the receiving computer, it joins all segments to recreate the original data stream.

Data transportation

This layer establishes a logical connection between the sending system and receiving system and uses that connection to provide end-to-end data transportation. This process uses two protocols: TCP and UDP.

The TCP protocol is used for reliable data transportation. TCP is a connection-oriented protocol. UDP protocol is used for unreliable data transportation. UDP is a connection-less protocol.

The main difference between a connection-less and connection-oriented protocol is that a connection-oriented protocol provides reliable data delivery. For reliable data delivery, it uses several mechanisms such as the three-way handshake process, acknowledgments, sequencing, and flow control.

Multiplexing

Through the use of port numbers, this layer also provides connection multiplexing. Connection multiplexing allows multiple applications to send and receive data simultaneously.

The main functionalities of the Transport layer are segmentation, data transportation, and connection multiplexing. For data transportation, it uses TCP and UDP protocols. TCP is a connection-oriented protocol. It provides reliable data delivery.

The Network Layer

The third layer of the OSI model is the Network Layer. This layer takes the data segment from the Transport layer and adds a logical address to it. A logical address has two components; network partition and host partition. The Network partition is used to group networking components while the host partition is used to uniquely identify a system on the network. A logical address is known as the IP address. Once the logical address and other related information are added to the segment, it becomes the packet.

This layer decides whether the packet is intended for the local system or a remote system. It also specifies the standards and protocols which are used to move data packets over networks.

To move data packets between two different networks, a device known as the router is used. Routers use the logical address to make the routing decision. Routing is the process of forwarding data packets to their destination.

Defining logical addresses and finding the best path to reach the destination address are the main functions of this layer. Routers work in this layer. Routing also takes place in this layer. IP, IPX, and AppleTalk are examples of this layer.

The Data Link Layer

The Data Link Layer is the second layer of the OSI model. This layer defines how networking components access the media and what transmission methods they use. This layer has two sub-layers: MAC and LLC.

MAC (Media Access Control)

This sub-layer defines how the data packets are placed in media. It also provides physical addressing. The physical address is known as the MAC address. Unlike logical addresses that need to be configured, physical addresses are pre-configured in NIC. The MAC address is used to uniquely identify a host in the local network.

LLC (Logical Link Control)

This sub-layer identifies the network layer protocol. On the sending computer, it encapsulates the information of the Network Layer protocol in the LLC header from which the Data Link layer receives the data packet. On the receiving computer, it checks the LLC header to get the information about the network layer protocol. This way, a data packet is always delivered to the same network layer protocol from which it was sent.

Defining physical addresses, finding hosts in the local network, specifying standards and methods to access the media are the primary functions of this layer. Switching takes place in this layer. Switches and Bridges work in this layer. HDLC, PPP, and Frame Relay are examples of this layer.

The Physical Layer

The Physical Layer is the first layer of the OSI model. This layer specifies the standards for devices, media, and technologies that are used in moving the data across the network such as:-

  • Type of cable used in connecting the devices
  • Patterns of pins used in both sides of the cable
  • Type of interface-card used in the networking device
  • Type of connector used to connect the cable with the network interface
  • Encoding of digital signals received from the Data Link layer based on the attached media type such as electrical for copper, light for fiber, or a radio wave for wireless.

On the sending computer, it converts digital signals received from the Data Link layer, into analog signals and loads them on the physical media. On the receiving computer, it picks analog signals from the media and converts them into digital signals, and transfers them to the Data Link layer for further processing.

The Physical Layer mainly defines standards for media and devices that are used to move data across the network. 10BaseT, 10Base100, CSU/DSU, DCE, and DTE are examples of the standards used in this layer.

That’s all for this tutorial. In the next part of this article, we will compare the OSI model with the TCP/IP model and explains the similarities and differences between both models. If you like this tutorial, please don’t forget to share it with friends.

OSI Seven Layers Model Explained with Examples (2024)
Top Articles
Latest Posts
Article information

Author: Dean Jakubowski Ret

Last Updated:

Views: 5901

Rating: 5 / 5 (70 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Dean Jakubowski Ret

Birthday: 1996-05-10

Address: Apt. 425 4346 Santiago Islands, Shariside, AK 38830-1874

Phone: +96313309894162

Job: Legacy Sales Designer

Hobby: Baseball, Wood carving, Candle making, Jigsaw puzzles, Lacemaking, Parkour, Drawing

Introduction: My name is Dean Jakubowski Ret, I am a enthusiastic, friendly, homely, handsome, zealous, brainy, elegant person who loves writing and wants to share my knowledge and understanding with you.