The OSI Model – The 7 Layers of Networking Explained in Plain English

Chloe Tucker

This article explains the Open Systems Interconnection (OSI) model and the 7 layers of networking, in plain English.

The OSI model is a conceptual framework that is used to describe how a network functions. In plain English, the OSI model helped standardize the way computer systems send information to each other.

Learning networking is a bit like learning a language - there are lots of standards and then some exceptions. Therefore, it’s important to really understand that the OSI model is not a set of rules. It is a tool for understanding how networks function.

Once you learn the OSI model, you will be able to further understand and appreciate this glorious entity we call the Internet, as well as be able to troubleshoot networking issues with greater fluency and ease.

All hail the Internet!

Prerequisites

You don’t need any prior programming or networking experience to understand this article. However, you will need:

  • Basic familiarity with common networking terms (explained below)
  • A curiosity about how things work :)

Learning Objectives

Over the course of this article, you will learn:

  • What the OSI model is
  • The purpose of each of the 7 layers
  • The problems that can happen at each of the 7 layers
  • The difference between TCP/IP model and the OSI model

Common Networking Terms

Here are some common networking terms that you should be familiar with to get the most out of this article. I’ll use these terms when I talk about OSI layers next.

A node is a physical electronic device hooked up to a network, for example a computer, printer, router, and so on. If set up properly, a node is capable of sending and/or receiving information over a network.

Nodes may be set up adjacent to one other, wherein Node A can connect directly to Node B, or there may be an intermediate node, like a switch or a router, set up between Node A and Node B.

Typically, routers connect networks to the Internet and switches operate within a network to facilitate intra-network communication. Learn more about hub vs. switch vs. router.

Here's an example:

1-Router-Image

For the nitpicky among us (yep, I see you), host is another term that you will encounter in networking. I will define a host as a type of node that requires an IP address. All hosts are nodes, but not all nodes are hosts. Please Tweet angrily at me if you disagree.

Links connect nodes on a network. Links can be wired, like Ethernet, or cable-free, like WiFi.

Links to can either be point-to-point, where Node A is connected to Node B, or multipoint, where Node A is connected to Node B and Node C.

When we’re talking about information being transmitted, this may also be described as a one-to-one vs. a one-to-many relationship.

A protocol is a mutually agreed upon set of rules that allows two nodes on a network to exchange data.

“A protocol defines the rules governing the syntax (what can be communicated), semantics (how it can be communicated), and synchronization (when and at what speed it can be communicated) of the communications procedure. Protocols can be implemented on hardware, software, or a combination of both. Protocols can be created by anyone, but the most widely adopted protocols are based on standards.” - The Illustrated Network.

Both wired and cable-free links can have protocols.

While anyone can create a protocol, the most widely adopted protocols are often based on standards published by Internet organizations such as the Internet Engineering Task Force (IETF).

A network is a general term for a group of computers, printers, or any other device that wants to share data.

Network types include LAN, HAN, CAN, MAN, WAN, BAN, or VPN. Think I’m just randomly rhyming things with the word can ? I can ’t say I am - these are all real network types. Learn more here .

Topology describes how nodes and links fit together in a network configuration, often depicted in a diagram. Here are some common network topology types:

What is Network Topology? Best Guides to Types & Diagrams - DNSstuff

A network consists of nodes, links between nodes, and protocols that govern data transmission between nodes.

At whatever scale and complexity networks get to, you will understand what’s happening in all computer networks by learning the OSI model and 7 layers of networking.

What is the OSI Model?

The OSI model consists of 7 layers of networking.

First, what’s a layer?

Cave, Dragon's Lair, mountains

No, a layer - not a lair . Here there are no dragons.

A layer is a way of categorizing and grouping functionality and behavior on and of a network.

In the OSI model, layers are organized from the most tangible and most physical, to less tangible and less physical but closer to the end user.

Each layer abstracts lower level functionality away until by the time you get to the highest layer. All the details and inner workings of all the other layers are hidden from the end user.

How to remember all the names of the layers? Easy.

  • Please | Physical Layer
  • Do | Data Link Layer
  • Not | Network Layer
  • Tell (the) | Transport Layer
  • Secret | Session Layer
  • Password (to) | Presentation Layer
  • Anyone | Application Layer

Keep in mind that while certain technologies, like protocols, may logically “belong to” one layer more than another, not all technologies fit neatly into a single layer in the OSI model. For example, Ethernet, 802.11 (Wifi) and the Address Resolution Protocol (ARP) procedure operate on >1 layer.

The OSI is a model and a tool, not a set of rules.

OSI Layer 1

Layer 1 is the physical layer . There’s a lot of technology in Layer 1 - everything from physical network devices, cabling, to how the cables hook up to the devices. Plus if we don’t need cables, what the signal type and transmission methods are (for example, wireless broadband).

Instead of listing every type of technology in Layer 1, I’ve created broader categories for these technologies. I encourage readers to learn more about each of these categories:

  • Nodes (devices) and networking hardware components. Devices include hubs, repeaters, routers, computers, printers, and so on. Hardware components that live inside of these devices include antennas, amplifiers, Network Interface Cards (NICs), and more.
  • Device interface mechanics. How and where does a cable connect to a device (cable connector and device socket)? What is the size and shape of the connector, and how many pins does it have? What dictates when a pin is active or inactive?
  • Functional and procedural logic. What is the function of each pin in the connector - send or receive? What procedural logic dictates the sequence of events so a node can start to communicate with another node on Layer 2?
  • Cabling protocols and specifications. Ethernet (CAT), USB, Digital Subscriber Line (DSL) , and more. Specifications include maximum cable length, modulation techniques, radio specifications, line coding, and bits synchronization (more on that below).
  • Cable types. Options include shielded or unshielded twisted pair, untwisted pair, coaxial and so on. Learn more about cable types here .
  • Signal type. Baseband is a single bit stream at a time, like a railway track - one-way only. Broadband consists of multiple bit streams at the same time, like a bi-directional highway.
  • Signal transmission method (may be wired or cable-free). Options include electrical (Ethernet), light (optical networks, fiber optics), radio waves (802.11 WiFi, a/b/g/n/ac/ax variants or Bluetooth). If cable-free, then also consider frequency: 2.5 GHz vs. 5 GHz. If it’s cabled, consider voltage. If cabled and Ethernet, also consider networking standards like 100BASE-T and related standards.

The data unit on Layer 1 is the bit.

A bit the smallest unit of transmittable digital information. Bits are binary, so either a 0 or a 1. Bytes, consisting of 8 bits, are used to represent single characters, like a letter, numeral, or symbol.

Bits are sent to and from hardware devices in accordance with the supported data rate (transmission rate, in number of bits per second or millisecond) and are synchronized so the number of bits sent and received per unit of time remains consistent (this is called bit synchronization). The way bits are transmitted depends on the signal transmission method.

Nodes can send, receive, or send and receive bits. If they can only do one, then the node uses a simplex mode. If they can do both, then the node uses a duplex mode. If a node can send and receive at the same time, it’s full-duplex – if not, it’s just half-duplex.

The original Ethernet was half-duplex. Full-duplex Ethernet is an option now, given the right equipment.

How to Troubleshoot OSI Layer 1 Problems

Here are some Layer 1 problems to watch out for:

  • Defunct cables, for example damaged wires or broken connectors
  • Broken hardware network devices, for example damaged circuits
  • Stuff being unplugged (...we’ve all been there)

If there are issues in Layer 1, anything beyond Layer 1 will not function properly.

Layer 1 contains the infrastructure that makes communication on networks possible.

It defines the electrical, mechanical, procedural, and functional specifications for activating, maintaining, and deactivating physical links between network devices. - Source

Fun fact: deep-sea communications cables transmit data around the world. This map will blow your mind: https://www.submarinecablemap.com/

And because you made it this far, here’s a koala:

Closeup of a Koala

OSI Layer 2

Layer 2 is the data link layer . Layer 2 defines how data is formatted for transmission, how much data can flow between nodes, for how long, and what to do when errors are detected in this flow.

In more official tech terms:

  • Line discipline. Who should talk for how long? How long should nodes be able to transit information for?
  • Flow control. How much data should be transmitted?
  • Error control - detection and correction . All data transmission methods have potential for errors, from electrical spikes to dirty connectors. Once Layer 2 technologies tell network administrators about an issue on Layer 2 or Layer 1, the system administrator can correct for those errors on subsequent layers. Layer 2 is mostly concerned with error detection, not error correction. ( Source )

There are two distinct sublayers within Layer 2:

  • Media Access Control (MAC): the MAC sublayer handles the assignment of a hardware identification number, called a MAC address, that uniquely identifies each device on a network. No two devices should have the same MAC address. The MAC address is assigned at the point of manufacturing. It is automatically recognized by most networks. MAC addresses live on Network Interface Cards (NICs). Switches keep track of all MAC addresses on a network. Learn more about MAC addresses on PC Mag and in this article . Learn more about network switches here .
  • Logical Link Control (LLC): the LLC sublayer handles framing addressing and flow control. The speed depends on the link between nodes, for example Ethernet or Wifi.

The data unit on Layer 2 is a frame .

Each frame contains a frame header, body, and a frame trailer:

  • Header: typically includes MAC addresses for the source and destination nodes.
  • Body: consists of the bits being transmitted.
  • Trailer: includes error detection information. When errors are detected, and depending on the implementation or configuration of a network or protocol, frames may be discarded or the error may be reported up to higher layers for further error correction. Examples of error detection mechanisms: Cyclic Redundancy Check (CRC) and Frame Check Sequence (FCS). Learn more about error detection techniques here .

Example of frames, the network layer, and the physical layer

Typically there is a maximum frame size limit, called an Maximum Transmission Unit, MTU. Jumbo frames exceed the standard MTU, learn more about jumbo frames here .

How to Troubleshoot OSI Layer 2 Problems

Here are some Layer 2 problems to watch out for:

  • All the problems that can occur on Layer 1
  • Unsuccessful connections (sessions) between two nodes
  • Sessions that are successfully established but intermittently fail
  • Frame collisions

The Data Link Layer allows nodes to communicate with each other within a local area network. The foundations of line discipline, flow control, and error control are established in this layer.

OSI Layer 3

Layer 3 is the network layer . This is where we send information between and across networks through the use of routers. Instead of just node-to-node communication, we can now do network-to-network communication.

Routers are the workhorse of Layer 3 - we couldn’t have Layer 3 without them. They move data packets across multiple networks.

Not only do they connect to Internet Service Providers (ISPs) to provide access to the Internet, they also keep track of what’s on its network (remember that switches keep track of all MAC addresses on a network), what other networks it’s connected to, and the different paths for routing data packets across these networks.

Routers store all of this addressing and routing information in routing tables.

Here’s a simple example of a routing table:

A routing table showing the destination, subnet mask, and interface

The data unit on Layer 3 is the data packet . Typically, each data packet contains a frame plus an IP address information wrapper. In other words, frames are encapsulated by Layer 3 addressing information.

The data being transmitted in a packet is also sometimes called the payload . While each packet has everything it needs to get to its destination, whether or not it makes it there is another story.

Layer 3 transmissions are connectionless, or best effort - they don't do anything but send the traffic where it’s supposed to go. More on data transport protocols on Layer 4.

Once a node is connected to the Internet, it is assigned an Internet Protocol (IP) address, which looks either like 172.16. 254.1 (IPv4 address convention) or like 2001:0db8:85a3:0000:0000:8a2e:0370:7334 (IPv6 address convention). Routers use IP addresses in their routing tables.

IP addresses are associated with the physical node’s MAC address via the Address Resolution Protocol (ARP), which resolves MAC addresses with the node’s corresponding IP address.

ARP is conventionally considered part of Layer 2, but since IP addresses don’t exist until Layer 3, it’s also part of Layer 3.

How to Troubleshoot OSI Layer 3 Problems

Here are some Layer 3 problems to watch out for:

  • All the problems that can crop up on previous layers :)
  • Faulty or non-functional router or other node
  • IP address is incorrectly configured

Many answers to Layer 3 questions will require the use of command-line tools like ping , trace , show ip route , or show ip protocols . Learn more about troubleshooting on layer 1-3 here .

The Network Layer allows nodes to connect to the Internet and send information across different networks.

OSI Layer 4

Layer 4 is the transport layer . This where we dive into the nitty gritty specifics of the connection between two nodes and how information is transmitted between them. It builds on the functions of Layer 2 - line discipline, flow control, and error control.

This layer is also responsible for data packet segmentation, or how data packets are broken up and sent over the network.

Unlike the previous layer, Layer 4 also has an understanding of the whole message, not just the contents of each individual data packet. With this understanding, Layer 4 is able to manage network congestion by not sending all the packets at once.

The data units of Layer 4 go by a few names. For TCP, the data unit is a packet. For UDP, a packet is referred to as a datagram. I’ll just use the term data packet here for the sake of simplicity.

Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are two of the most well-known protocols in Layer 4.

TCP, a connection-oriented protocol, prioritizes data quality over speed.

TCP explicitly establishes a connection with the destination node and requires a handshake between the source and destination nodes when data is transmitted. The handshake confirms that data was received. If the destination node does not receive all of the data, TCP will ask for a retry.

TCP also ensures that packets are delivered or reassembled in the correct order. Learn more about TCP here .

UDP, a connectionless protocol, prioritizes speed over data quality. UDP does not require a handshake, which is why it’s called connectionless.

Because UDP doesn’t have to wait for this acknowledgement, it can send data at a faster rate, but not all of the data may be successfully transmitted and we’d never know.

If information is split up into multiple datagrams, unless those datagrams contain a sequence number, UDP does not ensure that packets are reassembled in the correct order. Learn more about UDP here .

TCP and UDP both send data to specific ports on a network device, which has an IP address. The combination of the IP address and the port number is called a socket.

Learn more about sockets here .

Learn more about the differences and similarities between these two protocols here .

How to Troubleshoot OSI Layer 4 Problems

Here are some Layer 4 problems to watch out for:

  • Blocked ports - check your Access Control Lists (ACL) & firewalls
  • Quality of Service (QoS) settings. QoS is a feature of routers/switches that can prioritize traffic, and they can really muck things up. Learn more about QoS here .

The Transport Layer provides end-to-end transmission of a message by segmenting a message into multiple data packets; the layer supports connection-oriented and connectionless communication.

OSI Layer 5

Layer 5 is the session layer . This layer establishes, maintains, and terminates sessions.

A session is a mutually agreed upon connection that is established between two network applications. Not two nodes! Nope, we’ve moved on from nodes. They were so Layer 4.

Just kidding, we still have nodes, but Layer 5 doesn’t need to retain the concept of a node because that’s been abstracted out (taken care of) by previous layers.

So a session is a connection that is established between two specific end-user applications. There are two important concepts to consider here:

  • Client and server model: the application requesting the information is called the client, and the application that has the requested information is called the server.
  • Request and response model: while a session is being established and during a session, there is a constant back-and-forth of requests for information and responses containing that information or “hey, I don’t have what you’re requesting.”

Sessions may be open for a very short amount of time or a long amount of time. They may fail sometimes, too.

Depending on the protocol in question, various failure resolution processes may kick in. Depending on the applications/protocols/hardware in use, sessions may support simplex, half-duplex, or full-duplex modes.

Examples of protocols on Layer 5 include Network Basic Input Output System (NetBIOS) and Remote Procedure Call Protocol (RPC), and many others.

From here on out (layer 5 and up), networks are focused on ways of making connections to end-user applications and displaying data to the user.

How to Troubleshoot OSI Layer 5 Problems

Here are some Layer 5 problems to watch out for:

  • Servers are unavailable
  • Servers are incorrectly configured, for example Apache or PHP configs
  • Session failure - disconnect, timeout, and so on.

The Session Layer initiates, maintains, and terminates connections between two end-user applications. It responds to requests from the presentation layer and issues requests to the transport layer.

OSI Layer 6

Layer 6 is the presentation layer . This layer is responsible for data formatting, such as character encoding and conversions, and data encryption.

The operating system that hosts the end-user application is typically involved in Layer 6 processes. This functionality is not always implemented in a network protocol.

Layer 6 makes sure that end-user applications operating on Layer 7 can successfully consume data and, of course, eventually display it.

There are three data formatting methods to be aware of:

  • American Standard Code for Information Interchange (ASCII): this 7-bit encoding technique is the most widely used standard for character encoding. One superset is ISO-8859-1, which provides most of the characters necessary for languages spoken in Western Europe.
  • Extended Binary-Coded Decimal Interchange Code (EBDCIC): designed by IBM for mainframe usage. This encoding is incompatible with other character encoding methods.
  • Unicode: character encodings can be done with 32-, 16-, or 8-bit characters and attempts to accommodate every known, written alphabet.

Learn more about character encoding methods in this article , and also here .

Encryption: SSL or TLS encryption protocols live on Layer 6. These encryption protocols help ensure that transmitted data is less vulnerable to malicious actors by providing authentication and data encryption for nodes operating on a network. TLS is the successor to SSL.

How to Troubleshoot OSI Layer 6 Problems

Here are some Layer 6 problems to watch out for:

  • Non-existent or corrupted drivers
  • Incorrect OS user access level

The Presentation Layer formats and encrypts data.

OSI Layer 7

Layer 7 is the application layer .

True to its name, this is the layer that is ultimately responsible for supporting services used by end-user applications. Applications include software programs that are installed on the operating system, like Internet browsers (for example, Firefox) or word processing programs (for example, Microsoft Word).

Applications can perform specialized network functions under the hood and require specialized services that fall under the umbrella of Layer 7.

Electronic mail programs, for example, are specifically created to run over a network and utilize networking functionality, such as email protocols, which fall under Layer 7.

Applications will also control end-user interaction, such as security checks (for example, MFA), identification of two participants, initiation of an exchange of information, and so on.

Protocols that operate on this level include File Transfer Protocol (FTP), Secure Shell (SSH), Simple Mail Transfer Protocol (SMTP), Internet Message Access Protocol (IMAP), Domain Name Service (DNS), and Hypertext Transfer Protocol (HTTP).

While each of these protocols serve different functions and operate differently, on a high level they all facilitate the communication of information. ( Source )

How to Troubleshoot OSI Layer 7 Problems

Here are some Layer 7 problems to watch out for:

  • All issues on previous layers
  • Incorrectly configured software applications
  • User error (... we’ve all been there)

The Application Layer owns the services and functions that end-user applications need to work. It does not include the applications themselves.

Our Layer 1 koala is all grown up.

Koala with Photoshopped makeup

Learning check - can you apply makeup to a koala?

Don’t have a koala?

Well - answer these questions instead. It’s the next best thing, I promise.

  • What is the OSI model?
  • What are each of the layers?
  • How could I use this information to troubleshoot networking issues?

Congratulations - you’ve taken one step farther to understanding the glorious entity we call the Internet.

Learning Resources

Many, very smart people have written entire books about the OSI model or entire books about specific layers. I encourage readers to check out any O’Reilly-published books about the subject or about network engineering in general.

Here are some resources I used when writing this article:

  • The Illustrated Network, 2nd Edition
  • Protocol Data Unit (PDU): https://www.geeksforgeeks.org/difference-between-segments-packets-and-frames/
  • Troubleshooting Along the OSI Model: https://www.pearsonitcertification.com/articles/article.aspx?p=1730891
  • The OSI Model Demystified: https://www.youtube.com/watch?v=HEEnLZV2wGI
  • OSI Model for Dummies: https://www.dummies.com/programming/networking/layers-in-the-osi-model-of-a-computer-network/

Chloe Tucker is an artist and computer science enthusiast based in Portland, Oregon. As a former educator, she's continuously searching for the intersection of learning and teaching, or technology and art. Reach out to her on Twitter @_chloetucker and check out her website at chloe.dev .

Read more posts .

If you read this far, thank the author to show them you care. Say Thanks

Learn to code for free. freeCodeCamp's open source curriculum has helped more than 40,000 people get jobs as developers. Get started

  Layer 6 Presentation Layer

De/Encryption, Encoding, String representation

The presentation layer (data presentation layer, data provision level) sets the system-dependent representation of the data (for example, ASCII, EBCDIC) into an independent form, enabling the syntactically correct data exchange between different systems. Also, functions such as data compression and encryption are guaranteed that data to be sent by the application layer of a system that can be read by the application layer of another system to the layer 6. The presentation layer. If necessary, the presentation layer acts as a translator between different data formats, by making an understandable for both systems data format, the ASN.1 (Abstract Syntax Notation One) used.

OSI Layer 6 - Presentation Layer

The presentation layer is responsible for the delivery and formatting of information to the application layer for further processing or display. It relieves the application layer of concern regarding syntactical differences in data representation within the end-user systems. An example of a presentation service would be the conversion of an EBCDIC-coded text computer file to an ASCII-coded file. The presentation layer is the lowest layer at which application programmers consider data structure and presentation, instead of simply sending data in the form of datagrams or packets between hosts. This layer deals with issues of string representation - whether they use the Pascal method (an integer length field followed by the specified amount of bytes) or the C/C++ method (null-terminated strings, e.g. "thisisastring\0"). The idea is that the application layer should be able to point at the data to be moved, and the presentation layer will deal with the rest. Serialization of complex data structures into flat byte-strings (using mechanisms such as TLV or XML) can be thought of as the key functionality of the presentation layer. Encryption is typically done at this level too, although it can be done on the application, session, transport, or network layers, each having its own advantages and disadvantages. Decryption is also handled at the presentation layer. For example, when logging on to bank account sites the presentation layer will decrypt the data as it is received.[1] Another example is representing structure, which is normally standardized at this level, often by using XML. As well as simple pieces of data, like strings, more complicated things are standardized in this layer. Two common examples are 'objects' in object-oriented programming, and the exact way that streaming video is transmitted. In many widely used applications and protocols, no distinction is made between the presentation and application layers. For example, HyperText Transfer Protocol (HTTP), generally regarded as an application-layer protocol, has presentation-layer aspects such as the ability to identify character encoding for proper conversion, which is then done in the application layer. Within the service layering semantics of the OSI network architecture, the presentation layer responds to service requests from the application layer and issues service requests to the session layer. In the OSI model: the presentation layer ensures the information that the application layer of one system sends out is readable by the application layer of another system. For example, a PC program communicates with another computer, one using extended binary coded decimal interchange code (EBCDIC) and the other using ASCII to represent the same characters. If necessary, the presentation layer might be able to translate between multiple data formats by using a common format. Wikipedia
  • Data conversion
  • Character code translation
  • Compression
  • Encryption and Decryption

The Presentation OSI Layer is usually composed of 2 sublayers that are:

CASE common application service element

ACSEAssociation Control Service Element
ROSERemote Operation Service Element
CCRCommitment Concurrency and Recovery
RTSEReliable Transfer Service Element

SASE specific application service element

FTAMFile Transfer, Access and Manager
VTVirtual Terminal
MOTISMessage Oriented Text Interchange Standard
CMIPCommon Management Information Protocol
JTMJob Transfer and Manipulation
MMSManufacturing Messaging Service
RDARemote Database Access
DTPDistributed Transaction Processing

Layer 7   Application Layer

Layer 6   presentation layer, layer 5   session layer, layer 4   transport layer, layer 3   network layer, layer 2   data link layer, layer 1   physical layer.

  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture

What is OSI Model? – Layers of OSI Model

OSI stands for Open Systems Interconnection , where open stands to say non-proprietary. It is a 7-layer architecture with each layer having specific functionality to perform. All these 7 layers work collaboratively to transmit the data from one person to another across the globe. The OSI reference model was developed by ISO – ‘International Organization for Standardization ‘, in the year 1984.

The OSI model provides a theoretical foundation for understanding network communication . However, it is usually not directly implemented in its entirety in real-world networking hardware or software . Instead, specific protocols and technologies are often designed based on the principles outlined in the OSI model to facilitate efficient data transmission and networking operations

What is OSI Model?

  • What are the 7 layers of the OSI Model?

Physical Layer – Layer 1

Data link layer (dll) – layer 2, network layer – layer 3, transport layer – layer 4, session layer – layer 5, presentation layer – layer 6, application layer – layer 7.

  • What is the Flow of Data in OSI Model?

Advantages of OSI Model

  • OSI Model in a Nutshell

OSI vs TCP/IP Model

The OSI model, created in 1984 by ISO , is a reference framework that explains the process of transmitting data between computers. It is divided into seven layers that work together to carry out specialised network functions , allowing for a more systematic approach to networking.

OSI-Model

For those preparing for competitive exams like GATE, a strong understanding of networking concepts, including the OSI model, is crucial. To deepen your knowledge in this area and other key computer science topics, consider enrolling in the GATE CS Self-Paced course . This course offers comprehensive coverage of the syllabus, helping you build a solid foundation for your exam preparation.

Data Flow In OSI Model

When we transfer information from one device to another, it travels through 7 layers of OSI model. First data travels down through 7 layers from the sender’s end and then climbs back 7 layers on the receiver’s end.

Data flows through the OSI model in a step-by-step process:

  • Application Layer: Applications create the data.
  • Presentation Layer: Data is formatted and encrypted.
  • Session Layer: Connections are established and managed.
  • Transport Layer: Data is broken into segments for reliable delivery.
  • Network Layer : Segments are packaged into packets and routed.
  • Data Link Layer: Packets are framed and sent to the next device.
  • Physical Layer: Frames are converted into bits and transmitted physically.

Each layer adds specific information to ensure the data reaches its destination correctly, and these steps are reversed upon arrival.

Data Flow in OSI model

Let’s look at it with an Example:

Luffy sends an e-mail to his friend Zoro.

Step 1: Luffy interacts with e-mail application like Gmail , outlook , etc. Writes his email to send. (This happens in Layer 7: Application layer )

Step 2: Mail application prepares for data transmission like encrypting data and formatting it for transmission. (This happens in Layer 6: Presentation Layer )

Step 3: There is a connection established between the sender and receiver on the internet. (This happens in Layer 5: Session Layer )

Step 4: Email data is broken into smaller segments. It adds sequence number and error-checking information to maintain the reliability of the information. (This happens in Layer 4: Transport Layer )

Step 5: Addressing of packets is done in order to find the best route for transfer. (This happens in Layer 3: Network Layer )

Step 6: Data packets are encapsulated into frames, then MAC address is added for local devices and then it checks for error using error detection. (This happens in Layer 2: Data Link Layer )

Step 7: Lastly Frames are transmitted in the form of electrical/ optical signals over a physical network medium like ethernet cable or WiFi.

After the email reaches the receiver i.e. Zoro, the process will reverse and decrypt the e-mail content. At last, the email will be shown on Zoro’s email client.

What Are The 7 Layers of The OSI Model?

The OSI model consists of seven abstraction layers arranged in a top-down order:

  • Physical Layer
  • Data Link Layer
  • Network Layer
  • Transport Layer
  • Session Layer
  • Presentation Layer
  • Application Layer

The lowest layer of the OSI reference model is the physical layer. It is responsible for the actual physical connection between the devices. The physical layer contains information in the form of bits. It is responsible for transmitting individual bits from one node to the next. When receiving data, this layer will get the signal received and convert it into 0s and 1s and send them to the Data Link layer, which will put the frame back together.

Data Bits in the Physical Layer

Functions of the Physical Layer

  • Bit Synchronization: The physical layer provides the synchronization of the bits by providing a clock. This clock controls both sender and receiver thus providing synchronization at the bit level.
  • Bit Rate Control: The Physical layer also defines the transmission rate i.e. the number of bits sent per second.
  • Physical Topologies: Physical layer specifies how the different, devices/nodes are arranged in a network i.e. bus, star, or mesh topology.
  • Transmission Mode: Physical layer also defines how the data flows between the two connected devices. The various transmission modes possible are Simplex, half-duplex and full-duplex.
Note: Hub, Repeater, Modem, and Cables are Physical Layer devices. Network Layer, Data Link Layer, and Physical Layer are also known as Lower Layers or Hardware Layers .

The data link layer is responsible for the node-to-node delivery of the message. The main function of this layer is to make sure data transfer is error-free from one node to another, over the physical layer. When a packet arrives in a network, it is the responsibility of the DLL to transmit it to the Host using its MAC address . The Data Link Layer is divided into two sublayers:

  • Logical Link Control (LLC)
  • Media Access Control (MAC)

The packet received from the Network layer is further divided into frames depending on the frame size of the NIC(Network Interface Card). DLL also encapsulates Sender and Receiver’s MAC address in the header.

The Receiver’s MAC address is obtained by placing an ARP(Address Resolution Protocol) request onto the wire asking “Who has that IP address?” and the destination host will reply with its MAC address.

Functions of the Data Link Layer

  • Framing: Framing is a function of the data link layer. It provides a way for a sender to transmit a set of bits that are meaningful to the receiver. This can be accomplished by attaching special bit patterns to the beginning and end of the frame.
  • Physical Addressing: After creating frames, the Data link layer adds physical addresses ( MAC addresses ) of the sender and/or receiver in the header of each frame.
  • Error Control: The data link layer provides the mechanism of error control in which it detects and retransmits damaged or lost frames.
  • Flow Control: The data rate must be constant on both sides else the data may get corrupted thus, flow control coordinates the amount of data that can be sent before receiving an acknowledgment.
  • Access Control: When a single communication channel is shared by multiple devices, the MAC sub-layer of the data link layer helps to determine which device has control over the channel at a given time.

Function of DLL

Note: Packet in the Data Link layer is referred to as Frame. Data Link layer is handled by the NIC (Network Interface Card) and device drivers of host machines. Switch & Bridge are Data Link Layer devices.

The network layer works for the transmission of data from one host to the other located in different networks. It also takes care of packet routing i.e. selection of the shortest path to transmit the packet, from the number of routes available. The sender & receiver’s IP address es are placed in the header by the network layer.

Functions of the Network Layer

  • Routing: The network layer protocols determine which route is suitable from source to destination. This function of the network layer is known as routing.
  • Logical Addressing: To identify each device inter-network uniquely, the network layer defines an addressing scheme. The sender & receiver’s IP addresses are placed in the header by the network layer. Such an address distinguishes each device uniquely and universally.
Note: Segment in the Network layer is referred to as Packet . Network layer is implemented by networking devices such as routers and switches.

The transport layer provides services to the application layer and takes services from the network layer. The data in the transport layer is referred to as Segments . It is responsible for the end-to-end delivery of the complete message. The transport layer also provides the acknowledgment of the successful data transmission and re-transmits the data if an error is found.

At the sender’s side: The transport layer receives the formatted data from the upper layers, performs Segmentation , and also implements Flow and error control to ensure proper data transmission. It also adds Source and Destination port number s in its header and forwards the segmented data to the Network Layer.

Note: The sender needs to know the port number associated with the receiver’s application. Generally, this destination port number is configured, either by default or manually. For example, when a web application requests a web server, it typically uses port number 80, because this is the default port assigned to web applications. Many applications have default ports assigned.

At the receiver’s side: Transport Layer reads the port number from its header and forwards the Data which it has received to the respective application. It also performs sequencing and reassembling of the segmented data.

Functions of the Transport Layer

  • Segmentation and Reassembly: This layer accepts the message from the (session) layer, and breaks the message into smaller units. Each of the segments produced has a header associated with it. The transport layer at the destination station reassembles the message.
  • Service Point Addressing: To deliver the message to the correct process, the transport layer header includes a type of address called service point address or port address. Thus by specifying this address, the transport layer makes sure that the message is delivered to the correct process.

Services Provided by Transport Layer

  • Connection-Oriented Service
  • Connectionless Service

1. Connection-Oriented Service: It is a three-phase process that includes:

  • Connection Establishment
  • Data Transfer
  • Termination/disconnection

In this type of transmission, the receiving device sends an acknowledgment, back to the source after a packet or group of packets is received. This type of transmission is reliable and secure.

2. Connectionless service: It is a one-phase process and includes Data Transfer. In this type of transmission, the receiver does not acknowledge receipt of a packet. This approach allows for much faster communication between devices. Connection-oriented service is more reliable than connectionless Service.

Note: Data in the Transport Layer is called Segments . Transport layer is operated by the Operating System. It is a part of the OS and communicates with the Application Layer by making system calls. The transport layer is called as Heart of the OSI model. Device or Protocol Use : TCP, UDP  NetBIOS, PPTP

This layer is responsible for the establishment of connection, maintenance of sessions, and authentication, and also ensures security.

Functions of the Session Layer

  • Session Establishment, Maintenance, and Termination: The layer allows the two processes to establish, use, and terminate a connection.
  • Synchronization: This layer allows a process to add checkpoints that are considered synchronization points in the data. These synchronization points help to identify the error so that the data is re-synchronized properly, and ends of the messages are not cut prematurely and data loss is avoided.
  • Dialog Controller: The session layer allows two systems to start communication with each other in half-duplex or full-duplex.
Note: All the below 3 layers(including Session Layer) are integrated as a single layer in the TCP/IP model as the “Application Layer”. Implementation of these 3 layers is done by the network application itself. These are also known as Upper Layers or Software Layers. Device or Protocol Use : NetBIOS, PPTP.

Let us consider a scenario where a user wants to send a message through some Messenger application running in their browser. The “ Messenger ” here acts as the application layer which provides the user with an interface to create the data. This message or so-called Data is compressed, optionally encrypted (if the data is sensitive), and converted into bits (0’s and 1’s) so that it can be transmitted.

Communication in Session Layer

Communication in Session Layer

The presentation layer is also called the Translation layer . The data from the application layer is extracted here and manipulated as per the required format to transmit over the network.

Functions of the Presentation Layer

  • Translation: For example, ASCII to EBCDIC .
  • Encryption/ Decryption: Data encryption translates the data into another form or code. The encrypted data is known as the ciphertext and the decrypted data is known as plain text. A key value is used for encrypting as well as decrypting data.
  • Compression: Reduces the number of bits that need to be transmitted on the network.

Note: Device or Protocol Use: JPEG, MPEG, GIF.

At the very top of the OSI Reference Model stack of layers, we find the Application layer which is implemented by the network applications. These applications produce the data to be transferred over the network. This layer also serves as a window for the application services to access the network and for displaying the received information to the user.

Example : Application – Browsers, Skype Messenger, etc.

Note: The application Layer is also called Desktop Layer. Device or Protocol Use : SMTP .

Functions of the Application Layer

The main functions of the application layer are given below.

  • Network Virtual Terminal(NVT): It allows a user to log on to a remote host.
  • File Transfer Access and Management(FTAM): This application allows a user to access files in a remote host, retrieve files in a remote host, and manage or control files from a remote computer.
  • Mail Services: Provide email service.
  • Directory Services: This application provides distributed database sources and access for global information about various objects and services.
Note: The OSI model acts as a reference model and is not implemented on the Internet because of its late invention. The current model being used is the TCP/IP model.

OSI Model – Layer Architecture

7 Helps in identifying the client and synchronizing communication. Message
6 Data from the application layer is extracted and manipulated in the required format for transmission. Message , ,
5 Establishes Connection, Maintenance, Ensures Authentication and Ensures security. Message (or encrypted message)
4 Take Service from Network Layer and provide it to the Application Layer. Segment
3 Transmission of data from one host to another, located in different networks. Packet
2 Node to Node Delivery of Message. Frame ,
1 Establishing Physical Connections between Devices. Bits , , , Cables

TCP/IP protocol ( Transfer Control Protocol/Internet Protocol ) was created by U.S. Department of Defense’s Advanced Research Projects Agency (ARPA) in 1970s.

Some key differences between the OSI model and the TCP/IP Model are:

  • TCP/IP model consists of 4 layers but OSI model has 7 layers. Layers 5,6,7 of the OSI model are combined into the Application Layer of TCP/IP model and OSI layers 1 and 2 are combined into Network Access Layers of TCP/IP protocol.
  • The TCP/IP model is older than the OSI model, hence it is a foundational protocol that defines how should data be transferred online.
  • Compared to the OSI model, the TCP/IP model has less strict layer boundaries.
  • All layers of the TCP/IP model are needed for data transmission but in the OSI model, some applications can skip certain layers. Only layers 1,2 and 3 of the OSI model are necessary for data transmission.

OSI-vs-TCP/IP

OSI vs TCP/IP

Why Does The OSI Model Matter?

Even though the modern Internet doesn’t strictly use the OSI Model (it uses a simpler Internet protocol suite), the OSI Model is still very helpful for solving network problems. Whether it’s one person having trouble getting their laptop online, or a website being down for thousands of users, the OSI Model helps to identify the problem. If you can narrow down the issue to one specific layer of the model, you can avoid a lot of unnecessary work.

Imperva Application Security

Imperva security solutions protect your applications at different levels of the OSI model. They use DDoS mitigation to secure the network layer and provide web application firewall (WAF), bot management, and API security to protect the application layer.

To secure applications and networks across the OSI stack, Imperva offers multi-layered protection to ensure websites and applications are always available, accessible, and safe. The Imperva application security solution includes:

  • DDoS Mitigation: Protects the network layer from Distributed Denial of Service attacks.
  • Web Application Firewall (WAF) : Shields the application layer from threats.
  • Bot Management: Prevents malicious bots from affecting the application.
  • API Security: Secures APIs from various vulnerabilities and attacks.

The OSI Model defines the communication of a computing system into 7 different layers. Its advantages include:

  • It divides network communication into 7 layers which makes it easier to understand and troubleshoot.
  • It standardizes network communications, as each layer has fixed functions and protocols.
  • Diagnosing network problems is easier with the OSI model .
  • It is easier to improve with advancements as each layer can get updates separately.

Disadvantages of OSI Model

  • Complexity: The OSI Model has seven layers, which can be complicated and hard to understand for beginners.
  • Not Practical: In real-life networking, most systems use a simpler model called the Internet protocol suite (TCP/IP), so the OSI Model isn’t always directly applicable.
  • Slow Adoption: When it was introduced, the OSI Model was not quickly adopted by the industry, which preferred the simpler and already-established TCP/IP model.
  • Overhead: Each layer in the OSI Model adds its own set of rules and operations, which can make the process more time-consuming and less efficient.
  • Theoretical: The OSI Model is more of a theoretical framework, meaning it’s great for understanding concepts but not always practical for implementation.

In conclusion, the OSI (Open Systems Interconnection) model is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven distinct layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application. Each layer has specific responsibilities and interacts with the layers directly above and below it, ensuring seamless communication and data exchange across diverse network environments. Understanding the OSI model helps in troubleshooting network issues, designing robust network architectures, and facilitating interoperability between different networking products and technologies.

Frequently Asked Questions on OSI Model – FAQs

Is osi layer still used.

Yes, the OSI model is still used by networking professionals to understand data abstraction paths and processes better.

What is the highest layer of the OSI model?

Layer 7 or Application layer is highest layer of OSI model.

What is layer 8?

Layer 8 doesn’t actually exist in the OSI model but is often jokingly used to refer to the end user. For example: a layer 8 error would be a user error.

Please Login to comment...

Similar reads.

  • California Lawmakers Pass Bill to Limit AI Replicas
  • Best 10 IPTV Service Providers in Germany
  • Python 3.13 Releases | Enhanced REPL for Developers
  • IPTV Anbieter in Deutschland - Top IPTV Anbieter Abonnements
  • Content Improvement League 2024: From Good To A Great Article

Improve your Coding Skills with Practice

 alt=

What kind of Experience do you want to share?

Software Testing Help

7 Layers of The OSI Model (A Complete Guide)

presentation layer in osi model diagram

What is OSI Model: A Complete Guide to The 7 Layers of the OSI Model

In this Free Networking Training Series , we explored all about Computer Networking Basics in detail.

OSI Reference Model stands for Open system interconnection reference model which is used for communication in various networks.

The ISO (International organization for standardization) has developed this reference model for communication to be followed worldwide on a given set of a platform.

7 Layers of OSI Model

Table of Contents:

Architecture Of The OSI Reference Model

Relationship between each layer, roles & protocols used at each layer, features of the osi model, #1) layer 1 – physical layer, #2) layer 2 – data-link layer, #3) layer 3 – network layer, #4) layer 4 – transport layer, #5) layer 5 – session layer, #6) layer 6 – presentation layer, #7) top layer – application layer, was this helpful, recommended reading, what is osi model.

Open system interconnection (OSI) reference model consists of seven layers or seven steps which concludes the overall communication system.

In this tutorial, we will take an in-depth look at the functionality of each layer.

As a software tester, it is important to understand this OSI model as each of the software applications works based on one of the layers in this model. As we dive deep in this tutorial, we will explore which layer it is.

seven layers of OSI Reference Model

Let’s see how each layer in the OSI reference model communicates with one another with the help of the below diagram.

Relationsip between the layers of osi reference model

Enlisted below is the expansion of each Protocol unit exchanged between the layers:

  • APDU – Application protocol data unit.
  • PPDU – Presentation protocol data unit.
  • SPDU – Session protocol data unit.
  • TPDU – Transport protocol data unit (Segment).
  • Packet – Network layer host-router protocol.
  • Frame – Data-link layer host-router protocol.
  • Bits – Physical layer host-router protocol.

7 layers

The various features of the OSI Model are enlisted below:

  • Easy to understand the communication over wide networks through the OSI Reference Model architecture.
  • Helps to know the details, so that we can get a better understanding of the software and hardware working together.
  • Troubleshooting of faults is easier as the network is distributed in seven layers. Each layer has its own functionality, hence the diagnosis of the issue is easy and less time is taken.
  • Understanding new technologies generation by generation becomes easier and adaptable with the help of the OSI Model.

7 Layers Of The OSI Model

Before exploring the details about the functions of all 7 layers, the problem generally faced by first-timers is, How to memorize the hierarchy of the seven OSI Reference layers in sequence?

Here is the solution which I personally use to memorize it.

Try to remember it as A- PSTN- DP .

Starting from top to bottom A-PSTN-DP stands for Application-Presentation-Session-Transport-Network-Data-link-Physical.

Here are the 7 Layers of the OSI Model:

  • The physical layer is the first and bottom-most layer of the OSI Reference Model. It mainly provides the bitstream transmission.
  • It also characterizes the media type, connector type and signal type to be used for communication. Basically, the raw data in the form of bits i.e. 0’s & 1’s are converted into signals and exchanged over this layer. Data encapsulation is also done at this layer. The sender end and the receiving end should be in synchronization and the transmission rate in the form of bits per second is also decided at this layer.
  • It provides a transmission interface between the devices and the transmission media and the type of topology to be used for networking along with the type of transmission mode required for transmission is also defined at this level.
  • Usually, star, bus or ring topologies are used for networking and the modes used are half-duplex, full-duplex or simplex.
  • Examples of layer 1 devices include hubs, repeaters & Ethernet cable connectors. These are the basic devices that are used at the physical layer to transmit data through a given physical medium which is suitable as per the network need.

Physical layer

  • Data-link layer is the second layer from the bottom of the OSI Reference Model. The main function of the data-link layer is to perform error detection and combine the data bits into frames. It combines the raw data into bytes and bytes to frames and transmits the data packet to the network layer of the desired destination host. At the destination end, the data-link layer receives the signal, decodes it into frames and delivers it to the hardware.

Data-link Layer

  • MAC Address: Data-link layer supervises the physical addressing system called the MAC address for the networks and handles the access of the assorted network components to the physical medium.
  • A media access control address is a unique device address and each device or component in a network has a MAC address on the basis of which we can uniquely identify a device of the network. It is a 12 digit unique address.
  • Example of MAC address is 3C-95-09-9C-21-G1 (having 6 octets, where the first 3 represent the OUI, the next three represent the NIC). It can also be known as the physical address. The structure of a MAC address is decided by the IEEE organization as it is globally accepted by all firms.

The structure of MAC address representing the various fields and bit length can be seen below.

Variable length

  • Error Detection: Only error detection is done at this layer, not error correction. Error correction is done at the Transport layer.
  • Sometimes data signals encounter some unwanted signals known as error bits. In order to conquer with the errors, this layer performs error detection. Cyclic Redundancy check (CRC) and checksum are few efficient methods of error checking. We will discuss these in the transport layer functions.
  • Flow control & Multiple Access: Data which is sent in the form of a frame between the sender and a receiver over a transmission media at this layer, should transmit and receive at the same pace. When a frame is sent over a medium at a faster speed than the receiver’s working speed, then the data to be received at receiving node will be lost due to a mismatch in speed.
  • In order to overcome these type of issues, the layer performs flow control mechanism.

There are two types of flow control process:

Stop and Wait for flow control: In this mechanism, it pushes the sender after the data is transmitted to stop and wait from the receiver’s end to get the acknowledgment of the frame received at the receiver end. The second data frame is sent over the medium, only after the first acknowledgment is received, and the process will go on .

Sliding window: In this process, both the sender and the receiver will decide the number of frames after which the acknowledgment should be exchanged. This process is time-saving as fewer resources are used in the flow control process.

  • This layer also provisions to provide access to multiple devices to transmit through the same media without collision by using CSMA/CD (carrier sense multiple access/collision detection) protocols.
  • Synchronization: Both the devices between which data sharing is taking place should be in synchronization with each other at both the ends so that data transfer can take place smoothly.
  • Layer-2 Switches: Layer-2 switches are the devices which forward the data to the next layer on the basis of the physical address (MAC address) of the machine. Firstly it gathers the MAC address of the device on the port on which the frame is to be received and later learns the destination of the MAC address from the address table and forwards the frame to the destination of the next layer. If the destination host address is not specified then it simply broadcasts the data frame to all the ports except the one from which it learned the address of the source.
  • Bridges: Bridges is the two port device which works on the data link layer and is used to connect two LAN networks. In addition to this, it behaves like a repeater with an additional function of filtering the unwanted data by learning the MAC address and forwards it further to the destination node. It is used for the connectivity of networks working on the same protocol.

The network layer is the third layer from the bottom. This layer has the accountability to accomplish the routing of data packets from the source to destination host between the inter and intra networks operating on the same or different protocols.

Apart from the technicalities, if we try to understand what it really does?

The answer is very simple that it finds out the easy, shortest, and time-efficient way out between the sender and the receiver to exchange data using routing protocols, switching, error detection and addressing techniques.

  • It performs the above task by using a logical network addressing and subnetting designs of the network. Irrespective of the two different networks working on the same or different protocol or different topologies the function of this layer is to route the packets from the source to destination by using the logical IP addressing and routers for communication.

Network Layer

  • IP Addressing: The IP address is a logical network address and is a 32-bit number which is globally unique for each network host. It principally consists of two parts i.e. network address & host address. It is generally denoted in a dotted-decimal format with four numbers split by dots. For Example, the dotted-decimal representation of the IP address is 192.168.1.1 which in binary will be 11000000.10101000.00000001.00000001, and is very hard to remember. Thus usually the first one is used. These eight bits sector are known as octets.
  • Routers work at this layer and are used for communication for inter and intra network-wide area networks (WAN’s). Routers who transmit the data packets between the networks do not know the exact destination address of the destination host for which the packet is routed, rather they only know the location of the network to which they belong to and use the information that is stored in the routing table to establish the path along which the packet is to be delivered to the destination. After the packet is delivered to the destination network, it then is delivered to the desired host of that particular network.
  • Example: For the IP address 192.168.1.1. The network address will be 192.168.1.0 and the host address will be 0.0.0.1.

Subnet Mask: The network address and the host address defined in the IP address is not solely efficient to determine that the destination host is of the same sub-network or remote network. The subnet mask is a 32-bit logical address that is used along with the IP address by the routers to determine the location of the destination host to route the packet data.

Example for combined usage of IP address & subnet mask is shown below:

Subnet mask

For the above Example, by using a subnet mask 255.255.255.0, we get to know that the network ID is 192.168.1.0 and the host address is 0.0.0.64. When a packet arrives from 192.168.1.0 subnet and has a destination address as 192.168.1.64, then the PC will receive it from the network and process it further to the next level.

Thus by using subnetting, the layer-3 will provide an inter-networking between the two different subnets as well.

The IP addressing is a connectionless service, thus the layer -3 provides a connectionless service. The data packets are sent over the medium without waiting for the recipient to send the acknowledgment. If the data packets which are big in size are received from the lower level to transmit, then it splits it into small packets and forwards it.

At the receiving end, it again reassembles them to the original size, thus becoming space efficient as a medium less load.

transport layer

The fourth layer from the bottom is called the transport layer of the OSI Reference model.

(i)  This layer guarantees an end to end error-free connection between the two different hosts or devices of networks. This is the first one which takes the data from the upper layer i.e. the application layer, and then splits it into smaller packets called the segments and dispenses it to the network layer for further delivery to the destination host.

It ensures that the data received at host end will be in the same order in which it was transmitted. It provides an end to end supply of the data segments of both inter and intra sub-networks. For an end to end communication over the networks, all devices are equipped with a Transport service access point (TSAP) and are also branded as port numbers.

A host will recognize its peer host at the remote network by its port number.

(ii) The two transport layer protocols include:

  • Transmission control protocol (TCP)
  • User Datagram Protocol (UDP)

TCP is a connection-oriented and reliable protocol. In this protocol, firstly the connection is established between the two hosts of the remote end, only then the data is sent over the network for communication. The receiver always sends an acknowledgment of the data received or not received by the sender once the first data packet is transmitted.

After receiving the acknowledgment from the receiver, the second data packet is sent over the medium. It also checks the order in which the data is to be received otherwise data is re-transmitted. This layer provides an error correction mechanism and flow control. It also supports client/server model for communication.

UDP is a connectionless and unreliable protocol. Once data is transmitted between two hosts, the receiver host doesn’t send any acknowledgment of receiving the data packets. Thus the sender will keep on sending data without waiting for an acknowledgment.

This makes it very easy to process any network requirement as no time is wasted in waiting for acknowledgment. The end host will be any machine like a computer, phone or tablet.

This type of protocol is widely used in video streaming, online games, video calls, voice over IP where when some data packets of video are lost then it doesn’t have much significance, and can be ignored as it doesn’t make much impact on the information it carries and doesn’t have much relevance.

(iii) Error Detection & Control : Error checking is provided in this layer because of the following two reasons:

Even if no errors are introduced when a segment is moving over a link, it can be possible for errors to be introduced when a segment is stored in the router’s memory (for queuing). The data link layer is not able to detect an error in this scenario.

There is no assurance that all the links between the source and destination will provide error scrutiny. One of the links may be using a link layer protocol which doesn’t offer the desired outcomes.

The methods used for error check and control are CRC (cyclic redundancy check) and checksum.

CRC : The concept of CRC (Cyclic Redundancy Check) grounds on the binary division of the data component, as the remainder of which (CRC) is appended to the data component and sent to the receiver. The recipient divides data component by an identical divisor.

If the remainder comes up to zero then the data component is allowed to pass to forward the protocol, else, it is assumed that the data unit has been distorted in transmission and the packet is discarded.

Checksum Generator & checker :  In this method, the sender uses the checksum generator mechanism in which initially the data component is split into equal segments of n bits. Then, all the segments are added together by employing 1’s complement.

Later, it complements once again, and now it turns into checksum and then is sent along with the data component.

Example: If 16 bits is to be sent to the receiver and bits are 10000010 00101011, then the checksum that will be transmitted to the receiver will be 10000010 00101011 01010000.

Upon receiving the data unit, the receiver divides it into n equal size segments. All the segments are added using 1’s complement. The result is complemented once more and If the result is zero, the data is accepted, else discarded.

This error detection & control method permits a receiver to rebuild the original data whenever it is found corrupted in transit.

This layer permits the users of different platforms to set up an active communication session between themselves.

The main function of this layer is to provide sync in the dialogue between the two distinctive applications. The synchronization is necessary for efficient delivery of data without any loss at the receiver end.

Let’s understand this with the help of an Example.

Assume that a sender is sending a big data file of more than 2000 pages. This layer will add some checkpoints while sending the big data file. After sending a small sequence of 40 pages, it ensures the sequence & successful acknowledgment of data.

If verification is OK, it will keep repeating it further till the end otherwise it will re-synchronize and re-transmit.

This will help in keeping the data safe and the whole data host will never completely get lost if some crash happens. Also, token management, will not allow two networks of heavy data and of the same type to transmit at the same time.

Session layer

As suggested by the name itself, the presentation layer will present the data to its end users in the form in which it can easily be understood. Hence, this layer takes care of the syntax, as the mode of communication used by the sender and receiver may be different.

It plays the role of a translator so that the two systems come on the same platform for communication and will easily understand each other.

The data which is in the form of characters and numbers are split into bits before transmission by the layer. It translates the data for networks in the form in which they require it and for devices like phones, PC, etc in the format they require it.

The layer also performs data encryption at the sender’s end and data decryption at the receiver’s end.

It also performs data compression for multimedia data before transmitting, as the length of multimedia data is very big and much bandwidth will be required to transmit it over media, this data is compressed into small packets and at the receiver’s end, it will be decompressed to get the original length of data in its own format.

This is the topmost and seventh layer of the OSI reference model. This layer will communicate with the end users & user applications.

This layer grants a direct interface and access to the users with the network. The users can directly access the network at this layer. Few Examples of services provided by this layer include e-mail, sharing data files, FTP GUI based software like Netnumen, Filezilla (used for file sharing), telnet network devices etc.

There is vagueness in this layer as is not all user-based information and the software can be planted into this layer.

For Example , any designing software can’t be put directly at this layer while on the other hand when we access any application through a web browser, it can be planted at this layer as a web browser is using HTTP (hypertext transfer protocol) which is an application layer protocol.

Therefore irrespective of the software used, it is the protocol used by the software that is considered at this layer.

Software testing programs will work on this layer as the application layer provides an interface to its end users to test the services and their uses. The HTTP protocol is mostly used for testing at this layer but FTP, DNS, TELNET can also be used as per the requirement of the system and network in which they are operating.

From this tutorial, we learned about the functionalities, roles, inter-connection, and relationship between each layer of the OSI reference model.

The bottom four layers (from physical to transport) are used for data transmission between the networks and the top three layers (session, presentation & application) are for data transmission between hosts.

  • What is Wide Area Network (WAN): Live WAN Network Examples
  • TCP/IP Model With Different Layers
  • A Complete Guide to Firewall: How to Build A Secure Networking System
  • All About Routers: Types of Routers, Routing Table and IP Routing
  • All About Layer 2 and Layer 3 Switches in Networking System
  • Guide to Subnet Mask (Subnetting) & IP Subnet Calculator
  • LAN Vs WAN Vs MAN: Exact Difference Between Types Of Network
  • Computer Networking Tutorial: The Ultimate Guide

1 thought on “7 Layers of The OSI Model (A Complete Guide)”

Leave a comment cancel reply.

What is the OSI Model? 7 layers explained in detail

Become a Software Engineer in Months, Not Years

From your first line of code, to your first day on the job — Educative has you covered. Join 2M+ developers learning in-demand programming skills.

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:

What is the OSI Model?

  • Layer 1: Physical
  • Layer 2: Data Link
  • Layer 3: Network
  • Layer 4: Transport
  • Layer 5: Session
  • Layer 6: Presentation
  • Layer 7: Application

Data flow example

What to learn next, 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. grokking computer networking for software engineers.

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.

Why should you learn this?

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.

Layer 1: Physical Layer

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.

Layer 2: Data Link Layer

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

  • Media Access Control (MAC): The MAC address layer is responsible for flow control and multiplexing devices transmissions over the network.
  • Logical link control (LLC): The LLC layer provides error control and flow control over the physical medium and identifies line protocols.

Keep the learning going.

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.

Grokking Computer Networking for Software Engineers.

Layer 3: Network Layer

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:

  • Routing: The network layer protocols determine which routes from source to destination.
  • Logical Addressing: The network layer defines an addressing scheme to uniquely identify devices. The network layer places the IP addresses from the sender and receiver in the header.

Layer 4: Transport Layer

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.

Layer 5: Session Layer

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.

Layer 6: Presentation Layer

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 .

Layer 7: Application 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:

  • POP3 or SMTP for emails
  • FTP for emails
  • Telnet for controlling remote devices
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:

  • Access networks
  • Socket programming

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.

Happy learning!

Continue reading about networking

  • Behind the Screens: What happens when you type a URL in a browser
  • Computer Networking 101: Terms, Tools, and Getting Started
  • Kerberos in 5 Minutes: Introducing network authentication

Learn in-demand tech skills in half the time

Mock Interview

Skill Paths

Assessments

Learn to Code

Tech Interview Prep

Generative AI

Data Science

Machine Learning

GitHub Students Scholarship

Early Access Courses

For Individuals

Try for Free

Gift a Subscription

Become an Author

Become an Affiliate

Earn Referral Credits

Cheatsheets

Frequently Asked Questions

Privacy Policy

Cookie Policy

Terms of Service

Business Terms of Service

Data Processing Agreement

Copyright © 2024 Educative, Inc. All rights reserved.

OSI Seven Layers Model Explained with Examples

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

seven layers of OSI model

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.

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

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.

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

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.

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.

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.

By ComputerNetworkingNotes Updated on 2024-06-09

ComputerNetworkingNotes CCNA Study Guide OSI Seven Layers Model Explained with Examples

  • EtherChannel Load Distribution Explained
  • Link Aggregation Control Protocol (LACP) Explained
  • Port Aggregation Protocol (PAgP) Explained
  • EtherChannel Manual Configuration
  • EtherChannel Basic Concepts Explained
  • STP, RSTP, PVST, RPVST, and MSTP
  • Similarities and Differences between STP and RSTP
  • RSTP / RPVST Explained with Examples
  • PVST/RPVST and EtherChannel Explained
  • STP/RSTP Timers Explained

We do not accept any kind of Guest Post. Except Guest post submission, for any other query (such as adverting opportunity, product advertisement, feedback, suggestion, error reporting and technical issue) or simply just say to hello mail us [email protected]

The OSI Model

What is the osi model.

How a single bit travels from one computer to the next is a complex concept. In 1984, the open systems interconnection (OSI) model was published as a framework for network communication. The model breaks down computer network communication into seven layers. All of the layers work together to create a digital message. The message is built as it moves down the protocol stack. However, it is not sent to another network until it reaches the physical layer.

The model helps IT, computer science, and cybersecurity professionals understand how a single bit travels from one computer to the next by breaking the system into these layers.

From physical devices to user interfaces (UI), this model explains the communication role of each layer in overall computer networking. This article will start by introducing the Physical Layer (Layer 1).

Layer 1: the physical layer

The physical layer is where data moves across network interfaces as digital signals. Additionally, this is where the transmitting and receiving of network communication occurs. Starting with the Application Layer the message moves down the OSI model, and it eventually reaches the Physical Layer for transmission. When the message is received by the physical layer, the message will then move up the OSI layers until it reaches the final application layer.

Layer 2: data-link layer

Electrical signals received (or transmitted) to the physical layer are linked and translated to digital logic in the data-Link layer . Computer devices may be networked at the Data-Link layer, but only as a Local Area Network (LAN). Connecting a LAN to another LAN occurs at Layer 3.

Within Layer 2, the Protocol Data Unit (PDU) known as a frame consists of a header, footer, and data. Understanding how a frame is structured is important for network traffic analysis.

Additionally, within Layer 2, physical addresses are assigned and are also known as MAC addresses and/or hardware addresses in networking. MAC addresses are unique to each device on a local network. They are 48-bits in length and are assigned in hexadecimal characters.

Some other things to note about Layer 2 is that there are a few protocols that reside in it that we should know about:

  • Ethernet : The most common type of LAN, Ethernet is the standard used to connect computing devices, routers, and switches in a wired network.
  • IEEE 802.11 : “Wi-Fi” or “Wireless LAN.”
  • Fiber Distributed Data Interface (FDDI) : Network standard for fiber optic LAN connections.
  • Link Layer Discovery Protocol (LLDP) : A Link Layer protocol used for advertising neighbors, identity, and capabilities on a LAN.
  • Address Resolution Protocol (ARP) : Converts and links Internet Protocol (IP) addresses to MAC addresses on a LAN.
  • Cisco Discovery Protocol (CDP) : Similar to LLDP, but Cisco proprietary. The protocol collects neighbor information of directly connected LAN devices.

Additionally, Layer 2 is split into two sublayers:

  • Logical Link Control (LLC) : Responsible for establishing the logical link between devices on a local network.
  • Media Access Control (MAC) : Responsible for the procedures used by devices across a network medium.

Layer 3: network layer

When we think of the internet, we are thinking of interconnected networks. Interconnecting networks refer to a Local Area Network (LAN) connection to neighboring or remote networks. Layer 3 of the OSI model, the network layer , is where internetworking takes place and is where logical addresses are assigned to networked devices. A primary function of this layer is to route network packets from one LAN to another. Routing requires IP addresses and logical mapping of other networks across the internet to properly deliver messages. Another important function of Layer 3 is its ability to fragment and reassemble large communication. When Layer 3 passes a message down to Layer 2 for transmission, message length limits may be encountered in some cases.

Additionally, Layer 3 is the layer where the protocols used to route communication between networks reside. A few common network protocols are:

  • Internet Protocol (IP) : IPv4 and IPv6 are two versions of IP, and IPv4 is the most common protocol of the Internet .
  • Internet Protocol Secure (IPSec) : A more secure version of IP which leverages cryptography.
  • Routing Information Protocol (RIP) : Distance-vector routing protocol that uses hop count as a metric of routing.
  • Enhanced Interior Gateway Routing Protocol (EiGRP) : Cisco proprietary. A distance-vectoring protocol used for automating network configurations and routing decisions.
  • Internet Control Message Protocol (ICMP) : Network protocol used for error reporting of network issues.
  • Border Gateway Protocol (BGP) : A routing protocol designed to exchange routing information automatically on the internet.

Within Layer 3, the Protocol Data Unit (PDU) is the packet . Packets encapsulate data intended for transmission with header and footer data.

The IPv4 protocol encapsulates data with IPv4 header information necessary for delivery. For example, the 32-bit packet format contains the source address, the destination address, protocol, time-to-live (TTL), etc. in the IPv4 header data.

Layer 4: transport layer

The transport layer , Layer 4, is responsible for being the go-between the abstract layers of the OSI model (Layers 7-5) and the concrete communication layers (Layers 3-1).

Depending on the type of application, the transportation of that application’s communication will need to be handled in a specific way. For example, basic web browsing communication uses Hypertext Transfer Protocol (HTTP) . HTTP communicates via a specific connection service type and port. The transport layer is responsible for delivering/receiving the HTTP communication and maintaining the connection throughout the HTTP communication.

The Protocol Data Unit (PDU) at Layer 4 is known as a data segment . Segmentation is the process of dividing raw data into smaller pieces. Once the raw data is packaged from the higher application layers it is segmented at the transport layer before being passed to the Network Layer.

The transport layer protocols are divided into two categories depending on their connection service type:

Connection-oriented services

This connection type establishes a logical connection between two devices prior to beginning communication across a network. Connection-oriented protocols typically maintain service connection by following a set of rules that initiate, negotiate, manage, and terminate the communication. The Transport Layer protocols will also retransmit any data that is received without acknowledgment. The most common Connection-Oriented protocol is the Transmission Control Protocol (TCP) and its process to manage a connection between two devices is called the Three-Way Handshake . In TCP communication, the communicating devices typically share a client/server relationship where a client initiates communication with a service. The handshake involves the process of sending special TCP messages to synchronize a state of negotiated connection in communication.

Connectionless services

In connectionless communication, the protocol does not establish a connection between client and server. Instead, once a request is made to the server, the server sends all data without initiation, negotiation, or management of connection. Connectionless protocols also do not attempt to correct any interruptions in data transmission. Once the server sends the data, the server is not concerned if the client receives it.

When TCP or UDP are used to establish communication, the communication is assigned a port as the Layer 4 address. A port is a logical assignment given to processes and their respective application protocols on a computing system. A few important facts to memorize about ports are:

  • There are 65,535 valid port numbers available to assign to a communication process.
  • Ports 0 - 1023 are Well-Known Ports : Assigned to universal TCP/IP application protocols. These protocols are the most common such as HTTPS, SSH, FTP, DNS, and the list goes on. They are registered to these protocols by a global
  • Ports 1024 - 49,151 are Registered Ports : Reserved for application protocols that are not specified as universal TCP/IP application protocols.
  • Ports 49,152 - 65,535 are Private/Dynamic Ports : These ports may be used for any process without the need to register the port with the global assigning authority.
  • When TCP and IP are used together, a Layer 4 port and a Layer 3 IP address are assigned to the connection. This is called a socket. For example, 8.8.8.8:443 is a socket indicating that communication to IP address 8.8.8.8 is to connect to port 443 on the server.

Layer 5: session layer

The session layer starts, manages, and terminates sessions between end-user application processes. Sessions are considered the persistent connection between devices. A session is application-focused; sessions are not concerned with layers 1-4. Instead, the session layer controls dialog between two networked devices. It is considered to facilitate host-to-host communication. Sessions dialog may be controlled through synchronization checkpoints, and through management of communication modes. There are two modes of communication permitted at Layer 5:

  • Half-Duplex : Communication travels in both directions between sender and receiver, but only one device may transmit a message at a time.
  • Full-Duplex : Communication travels in both directions between sender and receiver, and messages may be sent simultaneously in either direction.

The session layer resembles a phone conversation. For example, when a person picks up a phone and calls someone else a session is created. Once the communication on the call is completed, the session is terminated by hanging up the phone. In computing, software applications are making the phone call and establishing a session.

Two common Layer 5 protocols still used today are:

  • Remote Procedure Call (RPC)

Layer 6: presentation layer

The presentation layer is primarily responsible for presenting data so that the recipient will understand the data. Data formatting and encoding protocols apply at Layer 6 to ensure data is legible and presented properly in the application receiving it. Data compression is also a function of Layer 6. If necessary, data may be compressed to improve data throughput over network communication.

Some common Layer 6 protocols are ASCII , JPEG , GIF , MPEG , and PNG .

Another main function of the presentation layer is the encryption and decryption of data sent across a network. Most encryption communication protocols straddle multiple layers of the OSI model, but the actual encryption function is Layer 6.

Two of the most common secure communication protocols are:

Transport Layer Security (TLS)

  • Secure Socket Layer (SSL)

Layer 7: application layer

The topmost layer of the OSI model is the application layer . On computer systems, applications display information to the user via the UI.

Note : Software applications running on a computer are NOT considered to reside in the application layer. Instead, they leverage application layer services and protocols that enable network communication.

For example, the user can craft messages and access the network from the application layer. A web browser application allows a user to access a web page. The user may input information and receive information through the web browser. However, the application layer protocol HTTP performs the network communication function. The web browser and HTTP work closely together, and the distinction between the two may be subtle. Yet, HTTP is the web browsing protocol for all web browser applications. In contrast, no single web browser software exclusively utilizes HTTP.

HTTP is one of many common application layer protocols. Below are a few additional protocols to know. It is also good practice to memorize the associated port assigned to the protocols:

Protocol Port Number(s) Description
(DNS) 53 Translates internet names to their globally registered IP addresses. For example, “google.com” is registered in global DNS as IP address 8.8.8.8.
(HTTPS) 443 Sends data to and from web browsers and web servers, but securely with the Secure Socket Layer (SSL) protocol.
FTP 20, 21 Transfers files from a client to a server and vice versa.
(SSH) 22 Connects to computers remotely and in a secure, encrypted way.
(SMTP) 25 Sends and receives email.
(DHCP) 67 Automatically assigns IP addresses to devices on a network.
(IRC) 194 Used in a client/server method. IRC clients communicate through an IRC server.
(POP3) 110 (unsecured), 995 (secured) Used for email where the client receives mail by downloading it locally to a computer from a server mailbox.

The OSI model breaks down computer network communication into seven layers. All of the layers work together to create a digital message. Understanding the OSI model will help you communicate with other network technologists. Computer networking may seem complex, but, with a bit of study, you can gain this knowledge to become an effective Cybersecurity Analyst.

The Codecademy Team, composed of experienced educators and tech experts, is dedicated to making tech skills accessible to all. We empower learners worldwide with expert-reviewed content that develops and enhances the technical skills needed to advance and succeed in their careers.

Related articles

What is a web app, learn more on codecademy, cybersecurity analyst interview prep, code foundations.

The OSI Model’s 7 Layers, Explained

The seven layers in the Open Systems Interconnection (OSI) model each serve a specific function and work together to create an efficient network communication system.

Andrei Neacsu

The Open Systems Interconnection (OSI) model is a framework in network communication that simplifies complex network interactions into a structured format. 

What Is the OSI Model?

The Open Systems Interconnection model is a framework in network communication designed to simplify complex network interactions into a structured format. This architecture has seven layers, each of which serves a specific function. All seven layers work together to create a robust and efficient network communication system.

Each of its seven layers has a distinct role, ensuring efficient data transfer from one device to another . The OSI model is essential for understanding how data is transmitted in a network and is also a practical guide for network protocol design and problem solving.

learn more about cybersecurity An Introduction to Microsegmentation in Network Security

The OSI model, developed by the International Organization for Standardization , outlines the essential functions of networking and telecommunications systems for practical application. It plays a crucial role in telecommunications, where vendors use it to define the features and capabilities of their products and services.

This approach allows for a detailed explanation of different aspects of network communication, including transport protocols, addressing schemes and data packaging methods. As a result, the OSI model resolves the complexities of network communication and fosters a more integrated and coherent digital world .

The 7 Layers of the OSI Model

Each layer of the OSI model serves a specific function, yet they work in harmony to create a robust and efficient network communication system. Understanding these layers provides valuable insights into the complexities of network design and operation, showcasing the intricate nature of modern digital communication.  

Layer 7: Application Layer

Functionality: The Application Layer is the closest to the end user. It facilitates user interaction with networked systems, providing interfaces and protocols for web browsers, email clients and other applications.

Key protocols: Protocols like HTTP, FTP and SMTP operate at this layer, enabling services such as web browsing, file transfers and email communications.

Layer 6: Presentation Layer

Role: The Presentation Layer acts as a translator, converting data formats from the application layer into a network-compatible format and vice versa. It ensures that data sent from one system is readable by another.

Data formatting: This layer is responsible for data encryption and compression, playing a significant role in maintaining data privacy and efficient transmission.

Layer 5: Session Layer

Managing sessions: It establishes, manages and terminates sessions between applications. This layer ensures that sessions are maintained for the duration of the communication.

Coordination: The Session Layer coordinates communication between systems, managing dialogues and synchronizing data exchange.

Layer 4: Transport Layer

Data segmentation and control: The Transport Layer is crucial for segmenting data into smaller packets. It ensures end-to-end data integrity and delivery, managing flow control, error correction and sequencing.

Protocols: TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are key protocols in this layer, differing in their approach to data transmission.

Layer 3: Network Layer

Routing and addressing: This layer is responsible for logical addressing and routing data packets across different networks. It determines the best path for data to travel from source to destination.

Internet protocol: The Internet Protocol (IP), fundamental for internet data exchange, operates at this layer.

Layer 2: Data Link Layer

Framing and MAC addressing: The Data Link Layer frames data into packets. It handles physical addressing through MAC addresses, ensuring that data is directed to the correct hardware.

Error detection: This layer is also involved in error detection and handling, improving overall data transmission reliability.

Layer 1: Physical Layer

Physical transmission: The Physical Layer deals with the physical aspects of data transmission, including cable types, electrical signals and data rates.

Hardware components: It involves hardware components like cables, switches and network interface cards, forming the foundation of network communication.

How Data Flows in the OSI Model

Understanding this data flow process is crucial for professionals, as it aids in diagnosing and troubleshooting network issues, designing efficient network solutions and ensuring robust data security and management.

Encapsulation Process

When data is sent, it begins at the Application Layer and moves down through the layers. At each stage, it is encapsulated with the necessary headers, trailers, and other control information relevant to that layer. For instance, at the Transport Layer, data is segmented and encapsulated with port numbers, while at the Network Layer, IP addresses are added.

Each layer plays a role in preparing the data for transmission. The Presentation Layer may encrypt the data for security, while the Data Link Layer ensures it is formatted into frames suitable for physical transmission.

Data Transmission Across the Network

The Physical Layer transmits the raw bits over a physical medium, such as a cable or wireless network. This transmission is the actual movement of data across the network. In cases where data must move across different networks, the Network Layer’s routing functionalities become crucial. It ensures that data packets find the most efficient path to their destination.

Decapsulation Process

Upon reaching the destination, the data moves up the OSI model, with each layer removing its respective encapsulation. The Data Link Layer, for instance, removes framing, and the Transport Layer checks for transmission errors and reassembles the data segments. Once the data reaches the Application Layer, it is in its original format and ready to be used by the receiving application, whether it’s an email client, a web browser or any other networked software.

Seamless Data Flow

The OSI model ensures that each layer only communicates with its immediate upper and lower layers, creating a seamless flow. This layered approach means changes in one layer’s protocols or functionalities can occur without disrupting the entire network.

OSI Model Advantages

The OSI model is a cornerstone in network architecture for several reasons:

Simplification of network design

The OSI model’s layered approach breaks down complex network processes, making design and operation more manageable. Each layer focuses on a specific aspect of communication, allowing for independent development and easier troubleshooting.

Standardization and interoperability

It establishes universal standards for network communication, enabling different technologies to interact seamlessly. This interoperability is crucial for the efficient functioning of diverse network devices and applications.

Flexibility and Scalability

Adaptable to technological advancements, the OSI model allows individual layers to evolve without overhauling the entire system. This scalability makes it suitable for various network sizes and types.

Enhanced Security

Security measures are integrated at multiple layers, providing a robust defense against threats. Each layer can address specific security concerns, leading to comprehensive network protection.

Real-World Applications of the OSI Model

The OSI model’s influence extends well beyond theoretical concepts, playing a crucial role in various practical aspects of networking:

Network Design and Protocol Development

Network professionals use the OSI model as a blueprint for structuring and developing robust networks. It guides the creation of new protocols, ensuring seamless integration and functionality across different network layers.

Efficient Troubleshooting and Management

In troubleshooting, the OSI model provides a systematic approach for identifying issues, from physical connectivity to application-level errors. It also aids in network maintenance and performance optimization, addressing each layer to enhance overall efficiency.

Cybersecurity Strategy

The model is foundational in crafting layered security strategies . By implementing security measures at different layers, it offers comprehensive protection against various cyber threats. Understanding the OSI layers is key in detecting and mitigating attacks targeting specific network segments.

Educational and Training Tool

It serves as an essential framework in networking education, helping students and professionals alike understand complex network operations. The OSI model is a cornerstone in training programs , emphasizing the intricacies of network architecture and security.

safety first When and How to Run a Phishing Simulation

OSI Model vs. TCP/IP Model

While the OSI model offers a detailed conceptual framework, the TCP/IP model is recognized for its practical application in today’s internet-driven world.

Structural Differences

OSI model : Introduced as a comprehensive, protocol-independent framework, the OSI model details seven distinct layers, offering a more granular approach to network communication.

TCP/IP model : Developed earlier by the U.S. Department of Defense, the TCP/IP model consists of four layers (Application, Transport, Internet and Network Access), combining certain OSI layers.

Theoretical vs. Practical Approach

OSI model : Developed as a theoretical and universal networking model, it’s used more for educational purposes to explain how networks operate.

TCP/IP model : This model is designed around specific standard protocols, focusing on solving practical communication issues. It leaves sequencing and acknowledgment functions to the transport layer, differing from the OSI approach.

Adoption and Use

OSI model: While not widely implemented in its entirety, the OSI model’s clear layer separation is influential in protocol design and network education; simpler applications in the OSI framework may not utilize all seven layers, with only the first three layers (Physical, Data Link, and Network) being mandatory for basic data communication.

TCP/IP model : The dominant model used in most network architectures today, especially in internet-related communications. In TCP/IP, most applications engage all layers for communication.

Frequently Asked Questions

Why is the osi model important.

The OSI model is crucial for standardizing network communication and ensuring interoperability between various devices and systems. It simplifies network design and troubleshooting and serves as a fundamental educational tool in networking.

What are the 7 layers of the OSI model?

Layer 1: Physical Layer — Transmits raw data.

Layer 2: Data Link Layer — Manages direct links and framing.

Layer 3: Network Layer — Handles addressing and routing.

Layer 4: Transport Layer — Ensures reliable data transfer.

Layer 5: Session Layer — Manages connections.

Layer 6: Presentation Layer — Translates data formats.

Layer 7: Application Layer — Interfaces with applications.

Recent Software Engineering Articles

37 Top Engineering Companies to Know

  • Artificial Intelligence
  • Generative AI
  • Cloud Computing
  • CPUs and Processors
  • Data Center
  • Edge Computing
  • Enterprise Storage
  • Virtualization
  • Enterprise Buyer’s Guides
  • Internet of Things
  • Network Management Software
  • Network Security
  • United States
  • Newsletters
  • Foundry Careers
  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Copyright Notice
  • Member Preferences
  • About AdChoices
  • E-commerce Links
  • Your California Privacy Rights

Our Network

  • Computerworld

keith_shaw

What is the OSI model? How to explain and remember its 7 layers

A tutorial on the open systems interconnection (osi) networking reference model plus tips on how to memorize the seven layers..

AI image 7 layers of OSI model telecommunications network

The Open Systems Interconnect (OSI) model is a conceptual framework that describes networking or telecommunications systems as seven layers, each with its own function.

The layers help network pros visualize what is going on within their networks and can help network managers narrow down problems (is it a physical issue or something with the application?), as well as computer programmers (when developing an application, which other layers does it need to work with?). Tech vendors selling new products will often refer to the OSI model to help customers understand which layer their products work with or whether it works “across the stack”.

The 7 layers of the OSI model

The layers (from bottom to top) are: Physical, Data Link, Network, Transport, Session, Presentation, and Application.

OSI model table

It wasn’t always this way. Conceived in the 1970s when computer networking was taking off, two separate models were merged in 1983 and published in 1984 to create the OSI model that most people are familiar with today. Most descriptions of the OSI model go from top to bottom, with the numbers going from Layer 7 down to Layer 1.

The layers, and what they represent, are as follows:

Layer 7: Application

The Application Layer in the OSI model is the layer that is the “closest to the end user”. It receives information directly from users and displays incoming data to the user. Oddly enough, applications themselves do not reside at the application layer. Instead the layer facilitates communication through lower layers in order to establish connections with applications at the other end. Web browsers (Google Chrome, Firefox, Safari, etc.) TelNet, and FTP, are examples of communications that rely on Layer 7.

Layer 6: Presentation

The Presentation Layer represents the area that is independent of data representation at the application layer. In general, it represents the preparation or translation of application format to network format, or from network formatting to application format. In other words, the layer “presents” data for the application or the network. A good example of this is encryption and decryption of data for secure transmission; this happens at Layer 6.

Layer 5: Session

When two computers or other networked devices need to speak with one another, a session needs to be created, and this is done at the Session Layer . Functions at this layer involve setup, coordination (how long should a system wait for a response, for example) and termination between the applications at each end of the session.

Layer 4: Transport

The Transport Layer deals with the coordination of the data transfer between end systems and hosts. How much data to send, at what rate, where it goes, etc. The best known example of the Transport Layer is the Transmission Control Protocol (TCP), which is built on top of the Internet Protocol (IP), commonly known as TCP/IP. TCP and UDP port numbers work at Layer 4, while IP addresses work at Layer 3, the Network Layer.

Layer 3: Network

Here at the Network Layer is where you’ll find most of the router functionality that most networking professionals care about and love. In its most basic sense, this layer is responsible for packet forwarding, including routing through different routers . You might know that your Boston computer wants to connect to a server in California, but there are millions of different paths to take. Routers at this layer help do this efficiently.

Layer 2: Data Link

The Data Link Layer provides node-to-node data transfer (between two directly connected nodes), and also handles error correction from the physical layer. Two sublayers exist here as well–the Media Access Control (MAC) layer and the Logical Link Control (LLC) layer. In the networking world, most switches operate at Layer 2. But it’s not that simple. Some switches also operate at Layer 3 in order to support virtual LANs that may span more than one switch subnet, which requires routing capabilities.

Layer 1: Physical

At the bottom of our OSI model we have the Physical Layer, which represents the electrical and physical representation of the system. This can include everything from the cable type, radio frequency link (as in a Wi-Fi network), as well as the layout of pins, voltages, and other physical requirements. When a networking problem occurs, many networking pros go right to the physical layer to check that all of the cables are properly connected and that the power plug hasn’t been pulled from the router, switch or computer, for example.

Why you need to know the 7 OSI layers

Most people in IT will likely need to know about the different layers when they’re going for their certifications, much like a civics student needs to learn about the three branches of the US government. After that, you hear about the OSI model when vendors are making pitches about which layers their products work with.

In a Quora post  asking about the purpose of the OSI model, Vikram Kumar answered this way: “The purpose of the OSI reference model is to guide vendors and developers so the digital communication products and software programs they create will interoperate, and to facilitate clear comparisons among communications tools.”

While some people may argue that the OSI model is obsolete (due to its conceptual nature) and less important than the four layers of the TCP/IP model, Kumar says that “it is difficult to read about networking technology today without seeing references to the OSI model and its layers, because the model’s structure helps to frame discussions of protocols and contrast various technologies.”

If you can understand the OSI model and its layers, you can also then understand which protocols and devices can interoperate with each other when new technologies are developed and explained.

The OSI model remains relevant

In a post on GeeksforGeeks, contributor Vabhav Bilotia argues several reasons why the OSI model remains relevant, especially when it comes to security and determining where technical risks and vulnerabilities may exist.

For example, by understanding the different layers, enterprise security teams can identify and classify physical access, where the data is sitting, and provide an inventory of the applications that employees use to access data and resources.

“Knowing where the majority of your company’s data is held, whether on-premises or in cloud services, will help define your information security policy,” writes Bilotia. “You can invest in the correct solutions that provide you data visibility within the proper OSI layers once you have this knowledge.”

In addition, the OSI model can be used to understand cloud infrastructure migrations, particularly when it comes to securing data within the cloud.

And because the model has been around for so long and understood by so many, the uniform vocabulary and terms helps networking professionals understand quickly about the components of the networking system “While this paradigm is not directly implemented in today’s TCP/IP networks, it is a useful conceptual model for relating multiple technologies to one another and implementing the appropriate technology in the appropriate way,” Bilotia writes. We couldn’t agree more.

How to remember the OSI Model 7 layers: 8 mnemonic tricks

If you need to memorize the layers for a college or certification test, here are a few sentences to help remember them in order. The first letter of each word is the same as the first letter an OSI layer.

From Application to Physical (Layer 7 to Layer 1): 

  • All People Seem To Need Data Processing
  • All Pros Search Top Notch Donut Places
  • A Penguin Said That Nobody Drinks Pepsi
  • A Priest Saw Two Nuns Doing Pushups

From Physical to Application (Layer 1 to Layer 7):

  • Please Do Not Throw Sausage Pizza Away
  • Pew! Dead Ninja Turtles Smell Particularly Awful
  • People Don’t Need To See Paula Abdul
  • Pete Doesn’t Need To Sell Pickles Anymore

Related content

Cisco’s acquisition history has shaped its evolution, 2024 global network outage report and internet health check, network jobs watch: hiring, skills and certification trends, top network and data center events 2024, newsletter promo module test.

keith_shaw

The first gadget Keith Shaw ever wanted was the Merlin, a red plastic toy that beeped and played Tic-Tac-Toe and various other games. A child of the '70s and teenager of the '80s, Shaw has been a fan of computers, technology and video games right from the start. He won an award in 8th grade for programming a game on the school's only computer, and saved his allowance to buy an Atari 2600.

Shaw has a bachelor's degree in newspaper journalism from Syracuse University and has worked at a variety of newspapers in New York, Florida and Massachusetts, as well as Computerworld and Network World. He won an award from the American Society of Business Publication Editors for a 2003 article on anti-spam testing, and a Gold Award in their 2010 Digital Awards Competition for the "ABCs of IT" video series.

Shaw is also the co-creator of taquitos.net , the crunchiest site on the InterWeb, which has taste-tested and reviewed more than 4,000 varieties of snack foods.

More from this author

What is a network router how ai networking driving its evolution, bgp: what is border gateway protocol, and how does it work, what is a virtual machine, and why are they so useful, what is a network switch and how does it work, what is zero trust network access, what is sd-wan, and what does it mean for networking, security, cloud, what is beamforming and how does it make wireless better, colleges expand vpn capacity, conferencing to answer covid-19, show me more, cisco ties appdynamics to microsoft azure for cloud app management.

Image

VMware Explore 2024: Latest news and insights

Image

Broadcom’s vision for VMware highlights private clouds, private AI

Image

Has the hype around ‘Internet of Things’ paid off? | Ep. 145

Image

Episode 1: Understanding Cisco’s Converged SDN Transport

Image

Episode 2: Pluggable Optics and the Internet for the Future

Image

How to use the Grep command

Image

How to see how many days passed since the beginning of the Linux epoch

Image

How to use the pv command

Image

How-To Geek

The 7 osi networking layers explained.

4

Your changes have been saved

Email is sent

Email has already been sent

Please verify your email address.

You’ve reached your account maximum for followed topics.

The Best Excel Keyboard Shortcuts I Use as a Power User

You can now get a plush android from google, why don't phones have volume wheels, quick links.

  • Physical Layer
  • Data Link Layer
  • Network Layer
  • Transport Layer
  • Session Layer
  • Presentation Layer
  • Application Layer

The Open Systems Interconnection (OSI) networking model defines a conceptual framework for communications between computer systems. The model is an ISO standard which identifies seven fundamental networking layers, from the physical hardware up to high-level software applications.

Each layer in the model handles a specific networking function. The standard helps administrators to visualize networks, isolate problems, and understand the use cases for new technologies. Many network equipment vendors advertise the OSI layer that their products are designed to slot into.

OSI was adopted as an international standard in 1984. It remains relevant today despite the changes to network implementation that have occurred since first publication. Cloud, edge, and IoT can all be accommodated within the model.

Diagram showing the 7 OSI networking layers

In this article, we'll explain each of the seven OSI layers in turn. We'll start from the lowest level, labelled as Layer 1.

1. Physical Layer

All networking begins with physical equipment. This layer encapsulates the hardware involved in the communications, such as switches and cables. Data is transferred as a stream of binary digits - 0 or 1 - that the hardware prepares from input it's been fed. The physical layer specifies the electrical signals that are used to encode the data over the wire, such as a 5-volt pulse to indicate a binary "1."

Errors in the physical layer tend to result in data not being transferred at all. There could be a break in the connection due to a missing plug or incorrect power supply. Problems can also arise when two components disagree on the physical encoding of data values. In the case of wireless connections, a weak signal can lead to bit loss during transmission.

2. Data Link Layer

The model's second layer concerns communication between two devices that are directly connected to each other in the same network. It's responsible for establishing a link that allows data to be exchanged using an agreed protocol. Many network switches operate at Layer 2.

The data link layer will eventually pass bits to the physical layer. As it sits above the hardware, the data link layer can perform basic error detection and correction in response to physical transfer issues. There are two sub-layers that define these responsibilities: Logical Link Control (LLC) that handles frame synchronization and error detection, and Media Access Control (MAC) which uses MAC addresses to constrain how devices acquire permission to transfer data.

3. Network Layer

The network layer is the first level to support data transfer between two separately maintained networks. It's redundant in situations where all your devices exist on the same network.

Data that comes to the network layer from higher levels is first broken up into packets suitable for transmission. Packets received from the remote network in response are reassembled into usable data.

The network layer is where several important protocols are first encountered. These include IP (for determining the path to a destination), ICMP, routing, and virtual LAN. Together these mechanisms facilitate inter-network communications with a familiar degree of usability. However operations at this level aren't necessarily reliable: messages aren't required to succeed and may not necessarily be retried.

4. Transport Layer

The transport layer provides higher-level abstractions for coordinating data transfers between devices. Transport controllers determine where data will be sent and the rate it should be transferred at.

Layer 4 is where TCP and UDP are implemented, providing the port numbers that allow devices to expose multiple communication channels. Load balancing is often situated at Layer 4 as a result, allowing traffic to be routed between ports on a target device.

Transport mechanisms are expected to guarantee successful communication. Stringent error controls are applied to recover from packet loss and retry failed transfers. Flow control is enforced so the sender doesn't overwhelm the remote device by sending data more quickly than the available bandwidth permits.

5. Session Layer

Layer 5 creates ongoing communication sessions between two devices. Sessions are used to negotiate new connections, agree on their duration, and gracefully close down the connection once the data exchange is complete. This layer ensures that sessions remain open long enough to transfer all the data that's being sent.

Checkpoint control is another responsibility that's held by Layer 5. Sessions can define checkpoints to facilitate progress updates and resumable transmissions. A new checkpoint could be set every few megabytes for a file upload, allowing the sender to continue from a particular point if the transfer gets interrupted.

Many significant protocols operate at Layer 5 including authentication and logon technologies such as LDAP and NetBIOS. These establish semi-permanent communication channels for managing an end user session on a specific device.

6. Presentation Layer

The presentation layer handles preparation of data for the application layer that comes next in the model. After data has made it up from the hardware, through the data link, and across the transport, it's almost ready to be consumed by high-level components. The presentation layer completes the process by performing any formatting tasks that may be required.

Decryption, decoding, and decompression are three common operations found at this level. The presentation layer processes received data into formats that can be eventually utilized by a client application. Similarly, outward-bound data is reformatted into compressed and encrypted structures that are suitable for network transmission.

TLS is one major technology that's part of the presentation layer. Certificate verification and data decryption is handled before requests reach the network client, allowing information to be consumed with confidence that it's authentic.

7. Application Layer

The application layer is the top of the stack. It represents the functionality that's perceived by network end users. Applications in the OSI model provide a convenient end-to-end interface to facilitate complete data transfers, without making you think about hardware, data links, sessions, and compression.

Despite its name, this layer doesn't relate to client-side software such as your web browser or email client. An application in OSI terms is a protocol that caters for the complete communication of complex data through layers 1-6.

HTTP, FTP, DHCP, DNS, and SSH all exist at the application layer. These are high-level mechanisms which permit direct transfers of user data between an origin device and a remote server. You only need minimal knowledge of the workings of the other layers.

The seven OSI layers describe the transfer of data through computer networks. Understanding the functions and responsibilities of each layer can help you identify the source of problems and assess the intended use case for new components.

OSI is an abstract model that doesn't directly map to the specific networking implementations commonly used today. As an example, the TCP/IP protocol works on its own simpler system of four layers: Network Access, Internet, Transport, and Application. These abstract and absorb the equivalent OSI layers: the application layer spans OSI L5 to L7, while L1 and L2 are combined in TCP/IP's concept of Network Access.

OSI remains applicable despite its lack of direct real-world application. It's been around so long that it's widely understood among administrators from all backgrounds. Its relatively high level of abstraction has also ensured it's remained relevant in the face of new networking paradigms, many of which have targeted Layer 3 and above. An awareness of the seven layers and their responsibilities can still help you appreciate the flow of data through a network while uncovering integration opportunities for new components.

  • Shop Now: Amazon Labor Day Tech Sale
  • Get These 12 Student Discounts!

The Layers of the OSI Model Illustrated

Each layer explained

  • Massachusetts Institute of Technology
  • University of Illinois

presentation layer in osi model diagram

  • The Wireless Connection
  • Routers & Firewalls
  • Network Hubs
  • Installing & Upgrading
  • Wi-Fi & Wireless

The Open Systems Interconnection (OSI) model defines a networking framework to implement protocols in layers, with control passed from one layer to the next. It is primarily used today as a teaching tool. It conceptually divides computer network architecture into 7 layers in a logical progression.

The lower layers deal with electrical signals, chunks of binary data , and routing of these data across networks. Higher levels cover network requests and responses, representation of data, and network protocols, as seen from a user's point of view. 

The OSI model was originally conceived as a standard architecture for building network systems, and many popular network technologies today reflect the layered design of OSI.

Physical Layer

At Layer 1, the Physical layer of the OSI model is responsible for the ultimate transmission of digital data bits from the Physical layer of the sending (source) device over network communications media to the Physical layer of the receiving (destination) device.

Examples of layer 1 technologies include  Ethernet cables  and  hubs . Also, hubs and other repeaters  are standard network devices that function at the Physical layer, as are cable connectors.

At the Physical layer, data is transmitted using the type of signaling supported by the physical medium: electric voltages, radio frequencies, or pulses of infrared or ordinary light.

Data Link Layer

When obtaining data from the Physical layer, the Data Link layer checks for physical transmission errors and packages bits into data frames. The Data Link layer also manages physical addressing schemes such as MAC addresses for Ethernet networks, controlling access of network devices to the physical medium.

Because the Data Link layer is the most complex layer in the OSI model, it is often divided into two parts: the Media Access Control sub-layer and the Logical Link Control sub-layer.

Network Layer

The Network layer adds the concept of routing above the Data Link layer. When data arrives at the Network layer, the source and destination addresses contained inside each frame are examined to determine if the data has reached its final destination. If the data has reached the final destination, layer 3 formats the data into packets delivered to the Transport layer. Otherwise, the Network layer updates the destination address and pushes the frame down to the lower layers.

To support routing, the Network layer maintains logical addresses such as IP addresses  for devices on the network. The Network layer also manages the mapping between these logical addresses and physical addresses. In IPv4 networking, this mapping is accomplished through the Address Resolution Protocol (ARP); IPv6 uses Neighbor Discovery Protocol (NDP).

Transport Layer

The Transport Layer delivers data across network connections. TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are the most common examples of Transport Layer 4 network protocols.  Different transport protocols may support a range of optional capabilities, including error recovery, flow control, and support for re-transmission.

Session Layer

The Session Layer manages the sequence and flow of events that initiate and tear down network connections. At layer 5, it is built to support multiple types of connections that can be created dynamically and run over individual networks.

Presentation Layer

The Presentation layer has the simplest function of any piece of the OSI model. At layer 6, it handles syntax processing of message data such as format conversions and encryption/decryption needed to support the Application layer above it.

Application Layer

The Application layer supplies network services to end-user applications. Network services are protocols that work with the user's data. For example, in a web browser application, the Application layer protocol HTTP packages the data needed to send and receive web page content. This layer 7 provides data to (and obtains data from) the Presentation layer.

Get the Latest Tech News Delivered Every Day

  • OSI Model Reference Guide
  • MAC Addresses With Formatting Examples
  • Here's Why Your Network Might Need a Layer 3 Switch
  • Learn the Meaning of a Network Gateway
  • Use a Bridge to Expand Your Local Network
  • NetBIOS: What It Is and How It Works
  • What Is a Virtual LAN (VLAN)?
  • What Is a Switch?
  • What Is a Router and How Does It Work?
  • List of TCP Ports and UDP Ports (Well-Known)
  • How Do I Connect My Wireless Printer After Changing the Router?
  • How to Set Up a VPN on Mac
  • Introduction to Client Server Networks
  • The Most Popular TCP and UDP Port Numbers
  • What Is the 127.0.0.1 IP Address?
  • Guide to a Network Lag Switch

What is the OSI Model?

The OSI Model Defined, Explained, and Explored

osi_model.jpg

The OSI Model Defined

The OSI Model (Open Systems Interconnection Model) is a conceptual framework used to describe the functions of a networking system. The OSI model characterizes computing functions into a universal set of rules and requirements in order to support interoperability between different products and software. In the OSI reference model, the communications between a computing system are split into seven different abstraction layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application.

Created at a time when network computing was in its infancy, the OSI was published in 1984 by the International Organization for Standardization (ISO). Though it does not always map directly to specific systems, the OSI Model is still used today as a means to describe Network Architecture.

The 7 Layers of the OSI Model

Physical layer.

The lowest layer of the OSI Model is concerned with electrically or optically transmitting raw unstructured data bits across the network from the physical layer of the sending device to the physical layer of the receiving device. It can include specifications such as voltages, pin layout, cabling, and radio frequencies. At the physical layer, one might find “physical” resources such as network hubs, cabling, repeaters, network adapters or modems.

Data Link Layer

At the data link layer, directly connected nodes are used to perform node-to-node data transfer where data is packaged into frames. The data link layer also corrects errors that may have occurred at the physical layer.

The data link layer encompasses two sub-layers of its own. The first, media access control (MAC), provides flow control and multiplexing for device transmissions over a network. The second, the logical link control (LLC), provides flow and error control over the physical medium as well as identifies line protocols.

Network Layer

The network layer is responsible for receiving frames from the data link layer, and delivering them to their intended destinations among based on the addresses contained inside the frame. The network layer finds the destination by using logical addresses, such as IP (internet protocol). At this layer, routers are a crucial component used to quite literally route information where it needs to go between networks.

Transport Layer

The transport layer manages the delivery and error checking of data packets. It regulates the size, sequencing, and ultimately the transfer of data between systems and hosts. One of the most common examples of the transport layer is TCP or the Transmission Control Protocol.

Session Layer

The session layer controls the conversations between different computers. A session or connection between machines is set up, managed, and termined at layer 5. Session layer services also include authentication and reconnections.

Presentation Layer

The presentation layer formats or translates data for the application layer based on the syntax or semantics that the application accepts. Because of this, it at times also called the syntax layer. This layer can also handle the encryption and decryption required by the application layer.

Application Layer

At this layer, both the end user and the application layer interact directly with the software application. This layer sees network services provided to end-user applications such as a web browser or Office 365. The application layer identifies communication partners, resource availability, and synchronizes communication.

Four Steps to Future-Ready Network Security

Forcepoint next generation firewall (ngfw) datasheet, securing the edge in higher education: a fireside chat with suny plattsburgh.

Guru99

OSI Model Layers and Protocols in Computer Network

Bryce Leo

What is OSI Model?

The OSI Model is a logical and conceptual model that defines network communication used by systems open to interconnection and communication with other systems. The Open System Interconnection (OSI Model) also defines a logical network and effectively describes computer packet transfer by using various layers of protocols.

Characteristics of OSI Model

Here are some important characteristics of the OSI model:

  • A layer should only be created where the definite levels of abstraction are needed.
  • The function of each layer should be selected as per the internationally standardized protocols.
  • The number of layers should be large so that separate functions should not be put in the same layer. At the same time, it should be small enough so that architecture doesn’t become very complicated.
  • In the OSI model, each layer relies on the next lower layer to perform primitive functions. Every level should able to provide services to the next higher layer
  • Changes made in one layer should not need changes in other lavers.

Why of OSI Model?

  • Helps you to understand communication over a network
  • Troubleshooting is easier by separating functions into different network layers.
  • Helps you to understand new technologies as they are developed.
  • Allows you to compare primary functional relationships on various network layers.

History of OSI Model

Here are essential landmarks from the history of OSI model:

  • In the late 1970s, the ISO conducted a program to develop general standards and methods of networking.
  • In 1973, an Experimental Packet Switched System in the UK identified the requirement for defining the higher-level protocols.
  • In the year 1983, OSI model was initially intended to be a detailed specification of actual interfaces.
  • In 1984, the OSI architecture was formally adopted by ISO as an international standard

7 Layers of the OSI Model

OSI model is a layered server architecture system in which each layer is defined according to a specific function to perform. All these seven layers work collaboratively to transmit the data from one layer to another.

  • The Upper Layers : It deals with application issues and mostly implemented only in software. The highest is closest to the end system user. In this layer, communication from one end-user to another begins by using the interaction between the application layer. It will process all the way to end-user.
  • The Lower Layers : These layers handle activities related to data transport. The physical layer and datalink layers also implemented in software and hardware.

Upper and Lower layers further divide network architecture into seven different layers as below

  • Application
  • Presentation
  • Network, Data-link
  • Physical layers

7 Layers of the OSI Model

Let’s Study each layer in detail:

Physical Layer

The physical layer helps you to define the electrical and physical specifications of the data connection. This level establishes the relationship between a device and a physical transmission medium. The physical layer is not concerned with protocols or other such higher-layer items. One example of a technology that operates at the physical layer in telecommunications is PRI (Primary Rate Interface). To learn more about PRI and how it works , you can visit this informative article.

Examples of hardware in the physical layer are network adapters, ethernet, repeaters, networking hubs, etc.

  • IoT Tutorial: Introduction to Internet of Things (IoT Basics)
  • 11 Best Nagios Alternatives (2024)
  • Analog vs Digital Signal – Difference Between Them

Data Link Layer

Data link layer corrects errors which can occur at the physical layer. The layer allows you to define the protocol to establish and terminates a connection between two connected network devices.

It is IP address understandable layer, which helps you to define logical addressing so that any endpoint should be identified.

The layer also helps you implement routing of packets through a network. It helps you to define the best path, which allows you to take data from the source to the destination.

The data link layer is subdivided into two types of sublayers:

  • Media Access Control (MAC) layer- It is responsible for controlling how device in a network gain access to medium and permits to transmit data.
  • Logical link control layer- This layer is responsible for identity and encapsulating network-layer protocols and allows you to find the error.

Important Functions of Datalink Layer

  • Framing which divides the data from Network layer into frames.
  • Allows you to add header to the frame to define the physical address of the source and the destination machine
  • Adds Logical addresses of the sender and receivers
  • It is also responsible for the sourcing process to the destination process delivery of the entire message.
  • It also offers a system for error control in which it detects retransmits damage or lost frames.
  • Datalink layer also provides a mechanism to transmit data over independent networks which are linked together.

Transport Layer

The transport layer builds on the network layer to provide data transport from a process on a source machine to a process on a destination machine. It is hosted using single or multiple networks, and also maintains the quality of service functions.

It determines how much data should be sent where and at what rate. This layer builds on the message which are received from the application layer. It helps ensure that data units are delivered error-free and in sequence.

Transport layer helps you to control the reliability of a link through flow control, error control, and segmentation or desegmentation.

The transport layer also offers an acknowledgment of the successful data transmission and sends the next data in case no errors occurred. TCP is the best-known example of the transport layer.

Important functions of Transport Layers

  • It divides the message received from the session layer into segments and numbers them to make a sequence.
  • Transport layer makes sure that the message is delivered to the correct process on the destination machine.
  • It also makes sure that the entire message arrives without any error else it should be retransmitted.

Network Layer

The network layer provides the functional and procedural means of transferring variable length data sequences from one node to another connected in “different networks”.

Message delivery at the network layer does not give any guaranteed to be reliable network layer protocol.

Layer-management protocols that belong to the network layer are:

  • routing protocols
  • multicast group management
  • network-layer address assignment.

Session Layer

Session Layer controls the dialogues between computers. It helps you to establish starting and terminating the connections between the local and remote application.

This layer request for a logical connection which should be established on end user’s requirement. This layer handles all the important log-on or password validation.

Session layer offers services like dialog discipline, which can be duplex or half-duplex. It is mostly implemented in application environments that use remote procedure calls.

Important function of Session Layer

  • It establishes, maintains, and ends a session.
  • Session layer enables two systems to enter into a dialog
  • It also allows a process to add a checkpoint to steam of data.

Presentation Layer

Presentation layer allows you to define the form in which the data is to exchange between the two communicating entities. It also helps you to handles data compression and data encryption.

This layer transforms data into the form which is accepted by the application. It also formats and encrypts data which should be sent across all the networks. This layer is also known as a syntax layer .

The function of Presentation Layers

  • Character code translation from ASCII to EBCDIC.
  • Data compression: Allows to reduce the number of bits that needs to be transmitted on the network.
  • Data encryption: Helps you to encrypt data for security purposes — for example, password encryption.
  • It provides a user interface and support for services like email and file transfer.

Application Layer

Application layer interacts with an application program, which is the highest level of OSI model. The application layer is the OSI layer, which is closest to the end-user. It means OSI application layer allows users to interact with other software application.

Application layer interacts with software applications to implement a communicating component. The interpretation of data by the application program is always outside the scope of the OSI model.

Example of the application layer is an application such as file transfer, email, remote login, etc.

The function of the Application Layers are

  • Application-layer helps you to identify communication partners, determining resource availability, and synchronizing communication.
  • It allows users to log on to a remote host
  • This layer provides various e-mail services
  • This application offers distributed database sources and access for global information about various objects and services.

Interaction Between OSI Model Layers

Information sent from a one computer application to another needs to pass through each of the OSI layers.

This is explained in the below-given example:

  • Every layer within an OSI model communicates with the other two layers which are below it and its peer layer in some another networked computing system.
  • In the below-given diagram, you can see that the data link layer of the first system communicates with two layers, the network layer and the physical layer of the system. It also helps you to communicate with the data link layer of, the second system.

Interaction Between OSI Model Layers

Protocols supported at various levels

Layer Name Protocols
Layer 7 Application SMTP, HTTP, FTP, POP3, SNMP
Layer 6 Presentation MPEG, ASCH, SSL, TLS
Layer 5 Session NetBIOS, SAP
Layer 4 Transport TCP, UDP
Layer 3 Network IPV5, IPV6, ICMP, IPSEC, ARP, MPLS.
Layer 2 Data Link RAPA, PPP, Frame Relay, ATM, Fiber Cable, etc.
Layer 1 Physical RS232, 100BaseTX, ISDN, 11.

Differences between OSI & TCP/IP

Differences between OSI & TCP/IP

Here, are some important differences between the OSI & TCP/IP model:

OSI Model TCP/IP model
OSI model provides a clear distinction between interfaces, services, and protocols. TCP/IP doesn’t offer any clear distinguishing points between services, interfaces, and protocols.
OSI uses the network layer to define routing standards and protocols. TCP/IP uses only the Internet layer.
OSI model use two separate layers physical and data link to define the functionality of the bottom layers TCP/IP uses only one layer (link).
OSI model, the transport layer is only connection-oriented. A layer of the is both connection-oriented and connectionless.
In OSI model, data link layer and physical are separate layers. In TCP data link layer and physical layer are combined as a single host-to-network layer.
The minimum size of the OSI header is 5 bytes. Minimum header size is 20 bytes.

Advantages of the OSI Model

Here, are major benefits/pros of using the OSI model :

  • It helps you to standardize router, switch, motherboard, and other hardware
  • Reduces complexity and standardizes interfaces
  • Facilitates modular engineering
  • Helps you to ensure interoperable technology
  • Helps you to accelerate the evolution
  • Protocols can be replaced by new protocols when technology changes.
  • Provide support for connection-oriented services as well as connectionless service.
  • It is a standard model in computer networking.
  • Supports connectionless and connection-oriented services.
  • Offers flexibility to adapt to various types of protocols

Disadvantages of the OSI Model

Here are some cons/ drawbacks of using OSI Model:

  • Fitting of protocols is a tedious task.
  • You can only use it as a reference model.
  • Doesn’t define any specific protocol.
  • In the OSI network layer model, some services are duplicated in many layers such as the transport and data link layers
  • Layers can’t work in parallel as each layer need to wait to obtain data from the previous layer.
  • The OSI Model is a logical and conceptual model that defines network communication which is used by systems open to interconnection and communication with other systems
  • In OSI model, layer should only be created where the definite levels of abstraction are needed.
  • OSI layer helps you to understand communication over a network
Layer Name Function Protocols
Layer 7 Application To allow access to network resources. SMTP, HTTP, FTP, POP3, SNMP
Layer 6 Presentation To translate, encrypt and compress data. MPEG, ASCH, SSL, TLS
Layer 5 Session To establish, manage, and terminate the session NetBIOS, SAP
Layer 4 Transport The transport layer builds on the network layer to provide data transport from a process on a source machine to a process on a destination machine. TCP, UDP
Layer 3 Network To provide internetworking. To move packets from source to destination IPV5, IPV6, ICMP, IPSEC, ARP, MPLS.
Layer 2 Data Link To organize bits into frames. To provide hop-to-hop delivery RAPA, PPP, Frame Relay, ATM, Fiber Cable, etc.
Layer 1 Physical To transmit bits over a medium. To provide mechanical and electrical specifications RS232, 100BaseTX, ISDN, 11.

You Might Like:

introduction-ccna

  • Network infrastructure

OSI model (Open Systems Interconnection)

  • Andrew Froehlich, West Gate Networks
  • Linda Rosencrance
  • Kara Gattine, Director of Editorial Operations

What is OSI model (Open Systems Interconnection)?

OSI (Open Systems Interconnection) is a reference model for how applications communicate over a network. This model focuses on providing a visual design of how each communications layer is built on top of the other, starting with the physical cabling, all the way to the application that's trying to communicate with other devices on a network.

A reference model is a conceptual framework for understanding relationships. The purpose of the OSI reference model is to guide technology vendors and developers so the digital communications products and software programs they create can interoperate and to promote a clear framework that describes the functions of a networking or telecommunications system that's in use.

Most vendors involved in telecommunications try to describe their products and services in relation to the OSI model. This helps them differentiate among the various transport protocols, addressing schemes and communications packaging methods. And, although it's useful for guiding discussion and evaluation, the OSI model is theoretical in nature and should be used only as a general guide. That's because few network products or standard tools keep related functions together in well-defined layers, as is the case in the OSI model. The Transmission Control Protocol/Internet Protocol ( TCP/IP ) suite, for example, is the most widely used network protocol, but even it doesn't map cleanly to the OSI model.

History of the OSI model

In the 1970s, technology researchers began examining how computer systems could best communicate with each other. Over the next few years, several competing models were created and published to the community. However, it wasn't until 1984 when the International Organization for Standardization (ISO) took the best parts of competing networking reference models to propose OSI as a way to finally create a framework that technology companies around the world could use as the basis of their networking technologies .

From ISO's perspective, the easiest way to create a conceptual model was to organize the models into different abstraction layers required to organize and send data between computing systems. Looking inside each abstracted layer to see the details shows one part of this network communication process. Each layer can be thought of as a separate communication module or piece of the puzzle. But, to actually accomplish the goal of sending data from one device to another, each module must work together.

How the OSI model works

Information technology (IT) networking professionals use OSI to model or conceptualize how data is sent or received over a network. Understanding this is a foundational part of most IT networking certifications, including the Cisco Certified Network Associate (CCNA) and CompTIA Network+ certification programs. As mentioned, the model is designed to break down data transmission standards, processes and protocols over a series of seven layers, each of which is responsible for performing specific tasks concerning sending and receiving data.

The main concept of OSI is that the process of communication between two endpoints in a network can be divided into seven distinct groups of related functions, or layers. Each communicating user or program is on a device that can provide those seven layers of function.

In this architecture, each layer serves the layer above it and, in turn, is served by the layer below it. So, in a given message between users, there will be a flow of data down through the layers in the source computer, across the network and then up through the layers in the receiving computer. Only the application layer at the top of the stack doesn't provide services to a higher-level layer.

The seven layers of function are provided by a combination of applications, operating systems (OSes), network card device drivers, networking hardware and protocols that enable a system to transmit a signal over a network through various physical mediums, including twisted-pair copper, fiber optics, Wi-Fi or Long-Term Evolution (LTE) with 5G .

7 layers of the OSI model

What is the function of each layer of the OSI model? The seven Open Systems Interconnection layers are the following.

Layer 7. The application layer

The application layer enables the user -- human or software -- to interact with the application or network whenever the user elects to read messages, transfer files or perform other network-related tasks. Web browsers and other internet-connected apps, such as Outlook and Skype, use Layer 7 application protocols.

Layer 6. The presentation layer

The presentation layer translates or formats data for the application layer based on the semantics or syntax the application accepts. This layer also handles the encryption and decryption that the application layer requires.

Layer 5. The session layer

The session layer sets up, coordinates and terminates conversations between applications. Its services include authentication and reconnection after an interruption. This layer determines how long a system will wait for another application to respond. Examples of session layer protocols include X.225 and Zone Information Protocol (ZIP).

Layer 4. The transport layer

The transport layer is responsible for transferring data across a network and provides error-checking mechanisms and data flow controls. It determines how much data to send, where it gets sent and at what rate. TCP within the TCP/IP suite is the best-known example of the transport layer. This is where the communications select TCP port numbers to categorize and organize data transmissions across a network.

Layer 3. The network layer

The primary function of the network layer is to move data into and through other networks. Network layer protocols accomplish this by packaging data with correct network address information, selecting the appropriate network routes and forwarding the packaged data up the stack to the transport layer. From a TCP/IP perspective, this is where IP addresses are applied for routing purposes.

Layer 2. The data-link layer

The data-link , or protocol layer, in a program handles moving data into and out of a physical link in a network. This layer handles problems that occur as a result of bit transmission errors. It ensures that the pace of the data flow doesn't overwhelm the sending and receiving devices. This layer also permits the transmission of data to Layer 3, the network layer, where it's addressed and routed.

The data-link layer can be further divided into two sublayers. The higher layer, which is called logical link control (LLC), is responsible for multiplexing, flow control, acknowledgement and notifying upper layers if transmit/receive (TX/RX) errors occur.

The media access control sublayer is responsible for tracking data frames using MAC addresses of the sending and receiving hardware. It's also responsible for organizing each frame, marking the starting and ending bits and organizing timing regarding when each frame can be sent along the physical layer medium.

Layer 1. The physical layer

The physical layer transports data using electrical, mechanical or procedural interfaces. This layer is responsible for sending computer bits from one device to another along the network. It determines how physical connections to the network are set up and how bits are represented into predictable signals as they're transmitted either electrically, optically or via radio waves.

Layers 1 through 7 of the OSI model

Cross-layer functions

Cross-layer functions, or services that may affect more than one layer, include the following:

  • security service telecommunication as defined by the International Telecommunication Union Standardization Sector (ITU-T) X.800 recommendation;
  • management functions that enable the configuration, instantiation, monitoring and terminating of the communications of two or more entities;
  • Multiprotocol Label Switching ( MPLS ), which operates at an OSI model layer that lies between the Layer 2 data-link layer and the Layer 3 network layer -- MPLS can carry a variety of traffic, including Ethernet frames and IP packets;
  • Address Resolution Protocol (ARP) translates IPv4 addresses (OSI Layer 3) into Ethernet MAC addresses (OSI Layer 2); and
  • domain name system (DNS), which is an application layer service that's used to look up the IP address of a domain name.

Pros and cons of the OSI model

The OSI model has a number of advantages, including the following:

  • It's considered a standard model in computer networking.
  • The model supports connectionless , as well as connection-oriented, services. Users can take advantage of connectionless services when they need faster data transmissions over the internet and the connection-oriented model when they're looking for reliability.
  • It has the flexibility to adapt to many protocols.
  • The model is more adaptable and secure than having all services bundled in one layer.

The disadvantages of the OSI model include the following:

  • It doesn't define any particular protocol.
  • The session layer, which is used for session management, and the presentation layer, which deals with user interaction, aren't as useful as other layers in the OSI model.
  • Some services are duplicated at various layers, such as the transport and data-link layers.
  • Layers can't work in parallel; each layer must wait to receive data from the previous layer.

OSI model vs. TCP/IP model

The OSI reference model describes the functions of a telecommunication or networking system, while TCP/IP is a suite of communication protocols used to interconnect network devices on the internet. TCP/IP and OSI are the most broadly used networking models for communication.

The OSI and TCP/IP models have similarities and differences. The main similarity is in their construction, as both use layers, although the OSI model consists of seven layers, while TCP/IP consists of just four layers.

Another similarity is that the upper layer for each model is the application layer, which performs the same tasks in each model but may vary according to the information each receives.

The functions performed in each model are also similar because each uses a network and transport layer to operate. The OSI and TCP/IP model are mostly used to transmit data packets, although they each use different means and paths to reach their destinations.

Additional similarities between the OSI and TCP/IP models include the following:

  • Both are logical models.
  • Both define standards for networking.
  • They each divide the network communication process in layers.
  • Both provide frameworks for creating and implementing networking standards and devices.
  • They enable one manufacturer to make devices and network components that can coexist and work with the devices and components made by other manufacturers.
  • Both divide complex functions into simpler components.

Differences between the OSI and TCP/IP models include the following:

  • OSI uses three layers -- application, presentation and session -- to define the functionality of upper layers, while TCP/IP uses only the application layer.
  • OSI uses two separate layers -- physical and data-link -- to define the functionality of the bottom layers, while TCP/IP uses only the link layer.
  • OSI uses the network layer to define the routing standards and protocols, while TCP/IP uses the internet layer.

Next: Explore 12 common network protocols all network engineers should know here .

Continue Reading About OSI model (Open Systems Interconnection)

  • What is the difference between TCP/IP model vs. OSI model?
  • Future of networking technology relies on 5G, edge computing
  • 7 TCP/IP vulnerabilities and how to prevent them
  • Edge computing and 5G bring the edge to remote workers
  • SANs Institute OSI model overview

Related Terms

Dig deeper on network infrastructure.

presentation layer in osi model diagram

An explanation of TCP/IP

SamanthaPoutre

Transmission Control Protocol (TCP)

KinzaYasar

encapsulation (object-orientated programming)

RobertSheldon

Microsoft 365 Copilot, an AI assistant, offers several promising features. Find out how to configure Copilot with Teams workflows...

With its AI capabilities, Microsoft Copilot provides several enhancements to Microsoft Teams functionality, including meeting ...

Organizations have ramped up their use of communications platform as a service and APIs to expand communication channels between ...

To keep corporate and user data safe, IT must continuously ensure mobile app security. Mobile application security audits are a ...

Dell continues to cut its workforce to become 'leaner,' as it repositions for changes in the enterprise PC market that are ...

Tap to Pay makes it possible to accept customer payments from an iPhone with no additional hardware. Find out the best use cases ...

The Broadcom CEO said public cloud migration trauma can be cured by private cloud services like those from VMware, but VMware ...

New capabilities for VMware VCF can import and manage existing VMware services through a single console interface for a private ...

Due to rapid AI hardware advancement, companies are releasing advanced products yearly to keep up with the competition. The new ...

Popular pricing models for managed service providers include monitoring only, per device, per user, all-you-can-eat or ...

Global IT consultancies take a multilayered approach to GenAI training by developing in-house programs, partnering with tech ...

IT service providers are upskilling a large portion of their workforces on the emerging technology. The campaign seeks to boost ...

Javatpoint Logo

Computer Network

  • Operating Systems
  • Computer Fundamentals
  • Interview Q

Physical Layer

Data link layer, network layer, routing algorithm, transport layer, application layer, application protocols, network security.

Interview Questions

JavaTpoint

is a reference model that describes how information from a application in one moves through a physical medium to the software application in another computer.

There are the seven OSI layers. Each layer has different functions. A list of seven layers are given below:

It defines the way how two or more devices can be connected physically. : It defines the transmission mode whether it is simplex, half-duplex or full-duplex mode between the two devices on the network. : It defines the way how network devices are arranged. It determines the type of the signal used for transmitting the information. The data link layer translates the physical's raw bit stream into packets known as Frames. The Data link layer adds the header and trailer to the frame. The header which is added to the frame contains the hardware destination and source address. The Data link layer adds a header to the frame that contains a destination address. The frame is transmitted to the destination address mentioned in the header. Flow control is the main functionality of the Data-link layer. It is the technique through which the constant data rate is maintained on both the sides so that no data get corrupted. It ensures that the transmitting station such as a server with higher processing speed does not exceed the receiving station, with lower processing speed. Error control is achieved by adding a calculated value CRC (Cyclic Redundancy Check) that is placed to the Data link layer's trailer which is added to the message frame before it is sent to the physical layer. If any error seems to occurr, then the receiver sends the acknowledgment for the retransmission of the corrupted frames. When two or more devices are connected to the same communication channel, then the data link layer protocols are used to determine which device has control over the link at a given time. An internetworking is the main responsibility of the network layer. It provides a logical connection between different devices. : A Network layer adds the source and destination address to the header of the frame. Addressing is used to identify the device on the internet. : Routing is the major component of the network layer, and it determines the best optimal path out of the multiple paths from source to the destination. A Network Layer receives the packets from the upper layer and converts them into packets. This process is known as Packetizing. It is achieved by internet protocol (IP).

Computers run several programs simultaneously due to this reason, the transmission of data from source to the destination not only from one computer to another computer but also from one process to another process. The transport layer adds the header that contains the address known as a service-point address or port address. The responsibility of the network layer is to transmit the data from one computer to another computer and the responsibility of the transport layer is to transmit the message to the correct process. When the transport layer receives the message from the upper layer, it divides the message into multiple segments, and each segment is assigned with a sequence number that uniquely identifies each segment. When the message has arrived at the destination, then the transport layer reassembles the message based on their sequence numbers. Transport layer provides two services Connection-oriented service and connectionless service. A connectionless service treats each segment as an individual packet, and they all travel in different routes to reach the destination. A connection-oriented service makes a connection with the transport layer at the destination machine before delivering the packets. In connection-oriented service, all the packets travel in the single route. The transport layer also responsible for flow control but it is performed end-to-end rather than across a single link. The transport layer is also responsible for Error control. Error control is performed end-to-end rather than across the single link. The sender transport layer ensures that message reach at the destination without any error. Session layer acts as a dialog controller that creates a dialog between two processes or we can say that it allows the communication between two processes which can be either half-duplex or full-duplex. Session layer adds some checkpoints when transmitting the data in a sequence. If some error occurs in the middle of the transmission of data, then the transmission will take place again from the checkpoint. This process is known as Synchronization and recovery. The processes in two systems exchange the information in the form of character strings, numbers and so on. Different computers use different encoding methods, the presentation layer handles the interoperability between the different encoding methods. It converts the data from sender-dependent format into a common format and changes the common format into receiver-dependent format at the receiving end. Encryption is needed to maintain privacy. Encryption is a process of converting the sender-transmitted information into another form and sends the resulting message over the network. Data compression is a process of compressing the data, i.e., it reduces the number of bits to be transmitted. Data compression is very important in multimedia such as text, audio, video. An application layer allows a user to access the files in a remote computer, to retrieve the files from a computer and to manage the files in a remote computer. An application layer provides the facility for email forwarding and storage.



Youtube

  • Send your Feedback to [email protected]

Help Others, Please Share

facebook

Learn Latest Tutorials

Splunk tutorial

Transact-SQL

Tumblr tutorial

Reinforcement Learning

R Programming tutorial

R Programming

RxJS tutorial

React Native

Python Design Patterns

Python Design Patterns

Python Pillow tutorial

Python Pillow

Python Turtle tutorial

Python Turtle

Keras tutorial

Preparation

Aptitude

Verbal Ability

Interview Questions

Company Questions

Trending Technologies

Artificial Intelligence

Artificial Intelligence

AWS Tutorial

Cloud Computing

Hadoop tutorial

Data Science

Angular 7 Tutorial

Machine Learning

DevOps Tutorial

B.Tech / MCA

DBMS tutorial

Data Structures

DAA tutorial

Operating System

Computer Network tutorial

Compiler Design

Computer Organization and Architecture

Computer Organization

Discrete Mathematics Tutorial

Discrete Mathematics

Ethical Hacking

Ethical Hacking

Computer Graphics Tutorial

Computer Graphics

Software Engineering

Software Engineering

html tutorial

Web Technology

Cyber Security tutorial

Cyber Security

Automata Tutorial

C Programming

C++ tutorial

Control System

Data Mining Tutorial

Data Mining

Data Warehouse Tutorial

Data Warehouse

RSS Feed

The All-In-One OSI Model Cheat Sheet 2024

OSI Model Cheat Sheet

If you want to understand the Open Systems Interconnection (OSI) reference model or need to brush up on what OSI means, we’ve prepared this OSI model cheat sheet for you. It briefly overviews the seven layers in the OSI reference model, expands on each layer, and compares the OSI model against the TCP/IP reference model.

Once you’ve finished reading this comprehensive OSI reference model cheat sheet and know what it entails, you can apply it properly when challenged, such as in IT and cyber security troubleshooting.

Get a copy of this OSI model pdf here . When you’re ready, let’s go.

What is the OSI Reference Model?

The Open Systems Interconnection (OSI) model is a way to represent how devices communicate with one another. It consists of seven layers:

  • Presentation
  • Application

You receive data from layers 1 through 7 and transmit data in the opposite direction. That’s because every layer of the OSI Model handles a specific job and passes data to and from the layers above and below itself.

Although building computing devices doesn’t require the OSI model, it’s proven helpful in troubleshooting computer networking problems. That’s because the OSI model gives technicians an in-depth method to dissect the network problem to find its root cause. The solution often becomes clear by narrowing it down to a specific model layer.

The infographic below summarizes the seven layers of the OSI reference model. If you need a quick refresher, this is the image to download .

The 7-Layer OSI Model

The given examples of protocols are for your reference only. For a complete list, check out our Ports and Protocols Cheat Sheet .

What Does Each Layer Do

Let’s consider the scenario of receiving an email on your smartphone. How did the email arrive? What has been going on right up to the moment you got the “New Email” notification?

According to the OSI reference model, the following events have transpired:

Layer 1: The Physical Layer

The virtual world is fascinating, but the matrix requires a physical component. The physical layer of the OSI model is a tangible or intangible medium through which our devices send and receive electronic signals.

Wired Ethernet cables are a well-worn example of the physical layer. Still, given the ubiquity of smart devices, we want our illustration in this article to be relevant to the times.

Suppose you’ve connected your phone to a Wi-Fi access point (AP) . The AP receives electromagnetic signals of ones and zeros called bits all day, some of which correspond to the email message we’ve mentioned.

The physical layer takes out the portions corresponding to the preamble , start frame delimiter (SFD) , and the frame check sequence (FCS) . It then passes the rest to the data link layer as a frame.

Definitions:

  • Ethernet: the traditional cabling technology for connecting telecommunication devices in a wired network
  • AP: (wireless) access point; a networking hardware device that allows other Wi-Fi devices to connect to a wired network
  • Preamble: an indicator of the end of header information used to synchronize a data transmission
  • SFD: start frame delimiter; a data field in the header of a transmission frame that marks the start of data
  • FCS: frame check sequence; an error-detecting code added to a frame in a communication protocol

Physical

Layer 2: The Data Link Layer

The data link layer is usually a network interface card (NIC) in a switch or a bridge. Your smartphone contains networking and routing components, so it has no separate NIC. The NIC or networking circuitry reads the source and destination MAC addresses , which it expects to map to devices on the local area network (LAN) , itself included.

Next, it compares the destination MAC address against the MAC address burned into it. If they match, this layer sends the frame to the network layer as an IP packet. Otherwise, they’re undeliverable and discarded because MAC addresses only make sense within a LAN.

As for the source MAC address, the data link layer keeps it in its memory in case the network layer requires it in a return route. In that scenario, this layer attaches the source MAC address to the data frame as the new destination MAC address.

  • NIC: network interface card; for connecting a computer to a computer network
  • MAC address: media access control address; a unique identifier assigned to a NIC for use as a network address in communications within a network segment
  • LAN: local area network; a series of computers connected as a network in a circumscribed location
  • IP: Internet Protocol; for logical addressing across computer networks

Data Link

Layer 3: The Network Layer

You can no longer rely on MAC addresses to send data packets across distributed networks larger than a LAN, such as in the broader Internet. The network layer is where we use logical addressing, such as IP addresses, to identify different nodes in large networks.

The network layer, usually a router, picks up an IP packet from the previous layer. Using network layer protocols such as Address Resolution Protocol (ARP) and Network Address Translation (NAT) , it reads the source and destination IP addresses, saves the source IP address for sending responses, and checks if the destination IP address is your device’s.

If yes, it strips both IP addresses of the packet, and the remainder, which is often a TCP segment or a UDP datagram, moves upward to the transport layer. If not, the IP packet is lost because the network layer has discarded it.

Your phone is also a router, so it does the above automatically. As an aside, this is also why you can use your phone as a Wi-Fi hotspot.

  • ARP: Address Resolution Protocol; for uncovering the MAC address associated with an IP address
  • NAT: Network Address Translation; the process of mapping an IP address to another by changing the header of IP packets while in transit via a router
  • TCP: Transmission Control Protocol; a connection-oriented protocol that helps establish and maintain connections until the applications on both ends have completed data exchange.
  • UDP: User Datagram Protocol; a connectionless protocol that enables data transfer before reaching an agreement with the receiving party.

Network

Layer 4: The Transport Layer

The transport layer is for processing chunks of data called TCP segments and UDP datagrams. The purpose of this layer is to assemble and disassemble these different pieces of incoming data.

The size of a data link frame has an upper limit, such as 1500 bytes for an Ethernet frame, so the payload of a segment/datagram may be a portion of a larger set of data. The transport layer rearranges these portions as appropriate and either joins them to recover the entire body of data received or splits them up before transmission.

In the case of the email reaching your phone, the transport layer pieces together the TCP segments corresponding to various components of your message—sender, recipient, timestamp, subject line, content, attachments—and passes the data on to the session layer.

Transport

Layer 5: The Session Layer

The session layer makes and maintains connections between your local host and remote hosts. Data can travel between your phone’s mail client and the email server if they share an established connection via TCP or UDP.

The data containing your email has reached the session layer, which saves the source and destination port information. It uses the source port number to send data back, such as an acknowledgment receipt or an error message, such as a nonexistent addressee or a full mailbox unable to receive new mail.

Now that the session layer has received the reassembled email data and your mailbox has space, this layer pushes the data forward to the port number of your phone’s email client.

Session

Layer 6: The Presentation Layer

The conventional function of the presentation layer is to ensure the correct application receives the data from the previous layer for processing and that the data is in a valid format for viewing. Data encryption and decryption happen at this layer.

Most email services support the POP3S and IMAPS protocols for receiving emails. The TLS/SSL portion of these protocols belongs to the presentation layer. Or, if you use end-to-end encrypted email services such as Protonmail or Tutanota , this is the layer where your emails stay encrypted until you click each subject line.

Some instructors deem the presentation layer disposable because computer applications have become robust enough to read almost all data types or return relevant error messages. In other words, all data is now machine-readable, even if it outputs gibberish.

Presentation

Layer 7: The Application Layer

Your phone buzzes. A new notification appears. You’ve got mail. Your email app is working as expected. Is that all to the application layer? For receiving emails, this is it. But for sending emails, no.

This layer is responsible for the features built into the application that make them aware of networks, such as an Application Programming Interface (API). Taking emails as an example, email APIs, such as Mailchimp or Constant Contact , are for sending automated emails, such as payment receipts, password resets, and newsletters.

Application

The TCP/IP Reference Model

The TCP/IP model is a model of digital communications which laid the foundation for the modern Internet and most Internet protocols we use today. Since it’s older than the OSI model, it’s more accurate to say the OSI model is an alternative to the TCP/IP model rather than the other way around.

Therefore, a major point of criticism raised against the OSI model was that it emerged too late in the history of the Internet to be a game-changer. Here’s a graphic comparing both models:

OSI Model vs. TCPIP Model

Wherever you are in your IT learning journey, we hope this OSI model cheat sheet helps you understand the OSI reference model. Check out our other networking articles and related courses for more resources. Last but not least, if you’re studying the OSI model for an upcoming exam, we wish you all the best.

Frequently Asked Questions

How do i remember the osi reference model.

The following acronym maps to the seven layers of the OSI model, from Layer 1 (Physical) to Layer 7 (Application):  Please Do Not Throw Sausage Pizza Away. See more of our favorite acronyms here .

What is more relevant, the OSI model or TCP/IP model?

It depends on your goal. The TCP/IP model forms the basis for the modern Internet, so it’s more appropriate for engineering projects. Still, the OSI reference model has shown itself more useful in describing network operations and troubleshooting network issues.

What do they mean when they say “Layer 3 Switch”?

Layer 3 is the Network layer in the OSI model, which involves IP addressing, while layer 2 is the Data Link layer, where switches pass around Ethernet frames. Therefore, a Layer 3 switch is an Ethernet switch that can pass on IP packets. This extra feature helps subnets communicate on huge local area networks, such as campus or corporate networks.

Do I need to know the OSI Reference Model for the Network+ exam?

Yes, absolutely. If you haven’t yet, check out our  Network+ cheat sheet  and brush up on your exam preparation. Note that the OSI reference model is in the  CCNA  and  Juniper Networks Certifications  syllabi.

Level Up in Cyber Security: Join Our Membership Today!

vip cta image

Cassandra is a writer, artist, musician, and technologist who makes connections across disciplines: cyber security, writing/journalism, art/design, music, mathematics, technology, education, psychology, and more. She's been a vocal advocate for girls and women in STEM since the 2010s, having written for Huffington Post, International Mathematical Olympiad 2016, and Ada Lovelace Day, and she's honored to join StationX. You can find Cassandra on LinkedIn and Linktree .

Related Articles

CompTIA Security+ Cheat Sheet

 CompTIA Security+ Cheat Sheet (SY0-601)

You've made a great choice pursuing the CompTIA Security+ certification

Read More »

WPA2 vs WPA3

WPA2 vs WPA3 (Full 2024 Comparison & Differences)

If you want to know the difference between WPA2 and

Common Ports Cheat Sheet

Common Ports Cheat Sheet: The Ultimate List

Perhaps you’re angsty that you’ve forgotten what a certain port

Session expired

Please log in again. The login page will open in a new tab. After logging in you can close it and return to this page.

StationX Accelerator Pro

Enter your name and email below, and we’ll swiftly get you all the exciting details about our exclusive StationX Accelerator Pro Program. Stay tuned for more!

StationX Accelerator Premium

Enter your name and email below, and we’ll swiftly get you all the exciting details about our exclusive StationX Accelerator Premium Program. Stay tuned for more!

StationX Master's Program

Enter your name and email below, and we’ll swiftly get you all the exciting details about our exclusive StationX Master’s Program. Stay tuned for more!

  • Bahasa Indonesia
  • Sign out of AWS Builder ID
  • AWS Management Console
  • Account Settings
  • Billing & Cost Management
  • Security Credentials
  • AWS Personal Health Dashboard
  • Support Center
  • Expert Help
  • Knowledge Center
  • AWS Support Overview
  • AWS re:Post
  • What is Cloud Computing?
  • Cloud Computing Concepts Hub
  • Networking & Content Delivery

What is OSI Model?

What is the OSI Model?

The Open Systems Interconnection (OSI) model is a conceptual framework that divides network communications functions into seven layers. Sending data over a network is complex because various hardware and software technologies must work cohesively across geographical and political boundaries. The OSI data model provides a universal language for computer networking, so diverse technologies can communicate using standard protocols or rules of communication. Every technology in a specific layer must provide certain capabilities and perform specific functions to be useful in networking. Technologies in the higher layers benefit from abstraction as they can use lower-level technologies without having to worry about underlying implementation details.

Why is the OSI model important?

The layers of the Open Systems Interconnection (OSI) model encapsulate every type of network communication across both software and hardware components. The model was designed to allow two standalone systems to communicate via standardised interfaces or protocols based on the current layer of operation.

The benefits of the OSI model are given next.

Shared understanding of complex systems

Engineers can use the OSI model to organize and model complex networked system architectures. They can separate the operating layer of each system component according to its main functionality. The ability to decompose a system into smaller, manageable parts via abstraction makes it easier for people to conceptualize it as a whole.

Faster research and development

With the OSI reference model, engineers can understand their work better. They know which technological layer (or layers) they’re developing for when they create new, networked systems that need to communicate with each other. Engineers can develop networked systems and take advantage of a series of repeatable processes and protocols. 

Flexible standardization

The OSI model does not specify the protocols to use between levels, but rather the tasks that protocols perform. It standardizes network communication development so people can rapidly understand, build, and decompose highly complex systems—all  without prior knowledge of the system. It also abstracts details, so engineers don’t require the understanding of every aspect of the model. In modern applications, the lower levels of networking and protocols are abstracted away to simplify system design and development. The following image shows how the OSI model is used in modern application development.

presentation layer in osi model diagram

What are the seven layers of the OSI model?

The Open Systems Interconnection (OSI) model was developed by the International Organization for Standardization and others in the late 1970s. It was published in its first form in 1984 as ISO 7498, with the current version being ISO/IEC 7498-1:1994. The seven layers of the model are given next.

Physical layer

The physical layer refers to the physical communication medium and the technologies to transmit data across that medium. At its core, data communication is the transfer of digital and electronic signals through various physical channels like fiber-optic cables, copper cabling, and air. The physical layer includes standards for technologies and metrics closely related with the channels, such as Bluetooth, NFC, and data transmission speeds.

Data link layer

The data link layer refers to the technologies used to connect two machines across a network where the physical layer already exists. It manages data frames, which are digital signals encapsulated into data packets. Flow control and error control of data are often key focuses of the data link layer. Ethernet is an example of a standard at this level. The data link layer is often split into two sub-layers: the Media Access Control (MAC) layer and Logical Link Control (LLC) layer. 

Network layer

The network layer is concerned with concepts such as routing, forwarding, and addressing across a dispersed network or multiple connected networks of nodes or machines. The network layer may also manage flow control. Across the internet, the Internet Protocol v4 (IPv4) and IPv6 are used as the main network layer protocols.

Transport layer

The primary focus of the transport layer is to ensure that data packets arrive in the right order, without losses or errors, or can be seamlessly recovered if required. Flow control, along with error control, is often a focus at the transport layer. At this layer, commonly used protocols include the Transmission Control Protocol (TCP), a near-lossless connection-based protocol, and the User Datagram Protocol (UDP), a lossy connectionless protocol. TCP is commonly used where all data must be intact (e.g. file share), whereas UDP is used when retaining all packets is less critical (e.g. video streaming).

Session layer

The session layer is responsible for network coordination between two separate applications in a session. A session manages the beginning and ending of a one-to-one application connection and synchronization conflicts. Network File System (NFS) and Server Message Block (SMB) are commonly used protocols at the session layer.

Presentation layer

The presentation layer is primarily concerned with the syntax of the data itself for applications to send and consume. For example, Hypertext Markup Language (HTML) , JavaScipt Object Notation (JSON) , and Comma Separated Values (CSV) are all modeling languages to describe the structure of data at the presentation layer. 

Application layer

The application layer is concerned with the specific type of application itself and its standardized communication methods. For example, browsers can communicate using HyperText Transfer Protocol Secure (HTTPS), and HTTP and email clients can communicate using POP3 (Post Office Protocol version 3) and SMTP (Simple Mail Transfer Protocol).

Not all systems that use the OSI model implement every layer.

How does communication happen in the OSI model?

The layers in the Open Systems Interconnection (OSI) model are designed so that an application can communicate over a network with another application on a different device, no matter the complexity of the application and underlying systems. To do this, various standards and protocols are used to communicate with the layer above or below. Each of the layers is independent and only aware of the interfaces to communicate with the layer above and below it. 

By chaining together all these layers and protocols, complex data communications can be sent from one high-level application to another. The process works as follows:

  • The sender’s application layer passes data communication down to the next lower layer.
  • Each layer adds its own headers and addressing to the data before passing it on. 
  • Data communication moves down the layers until it is eventually transmitted through the physical medium.
  • At the other end of the medium, each layer processes the data according to the relevant headers at that level. 
  • At the receiver end, data moves up the layer and is gradually unpacked until the application at the other end receives it.

What are alternatives to the OSI model?

Various networking models were used in the past, such as Sequenced Packet Exchange/Internet Packet Exchange (SPX/IPX) and Network Basic Input Output System (NetBIOS). Today, the main alternative to the Open Systems Interconnection (OSI) model is the TCP/IP model.

The TCP/IP model

The TCP/IP model is comprised of five different layers:

  • The physical layer
  • The data link layer
  • The network layer
  • The transport layer
  • They application layer

While layers like the physical layer, network layer, and application layer appear to map directly to the OSI model, this isn’t quite the case. Instead, the TCP/IP model most accurately maps to the structure and protocols of the internet.

The OSI model remains a popular networking model to describe how networking operates from a holistic perspective for educational purposes. However, the TCP/IP model is now more commonly used in practice.

A note on proprietary protocols and models

It’s important to note that not all internet-based systems and applications follow the TCP/IP model or the OSI model. Similarly, not all offline-based networked systems and applications use the OSI model or any other model.

Both the OSI and TCP/IP models are open standards. They’re designed so that anyone can use them, or further build them out to meet specific requirements.

Organizations also design their own internal, proprietary standards, including protocols and models, that are closed-source and only for use within their systems. Sometimes, they may subsequently release them to the public for interoperability and further community development. An example is s2n-tls, a TLS protocol that was originally a proprietary Amazon Web Services (AWS) protocol but is now open source.

How can AWS meet your computer networking requirements?

AWS helps organizations design, deploy, and scale networked systems and applications with less friction. 

We have a robust suite of AWS Networking and Content Delivery offerings. They’re designed to complement and integrate with your internal applications and services, across all levels of network operations. Here are some examples:

  • AWS App Mesh provides secure, application-level networking for all your services, with built-in communications monitoring and control
  • Amazon CloudFront is a content delivery network (CDN) service built for high performance, security, and developer convenience
  • AWS Direct Connect offers a direct connection, which doesn’t touch the internet, from your organization to your AWS resources
  • Elastic Load Balancing (ELB)  distributes incoming network traffic across AWS targets to improve application scalability

Get started with networked systems and applications on AWS by creating an account today.

Next Steps on AWS

presentation layer in osi model diagram

Ending Support for Internet Explorer

IMAGES

  1. Presentation Layer OSI Model

    presentation layer in osi model diagram

  2. Presentation Layer of OSI Model (Layer-6)

    presentation layer in osi model diagram

  3. Presentation Layer

    presentation layer in osi model diagram

  4. What is the OSI Model?

    presentation layer in osi model diagram

  5. Presentation Layer in OSI Model

    presentation layer in osi model diagram

  6. OSI Model Diagrams

    presentation layer in osi model diagram

VIDEO

  1. The Open Systems Interconnection (OSI) model

  2. Decoding the OSI Model A Deep Dive into , What is OSI Model?

  3. OSI Model

  4. Lec- 7 Application Layer

  5. OSI model

  6. Data-Link Layer in OSI Reference Model in Tamil

COMMENTS

  1. Presentation Layer in OSI model

    Presentation layer in the OSI model, as a translator, converts the data sent by the application layer of the transmitting node into an acceptable and compatible data format based on the applicable network protocol and architecture. Upon arrival at the receiving computer, the presentation layer translates data into an acceptable format usable by the application layer. Basically, in other words ...

  2. The OSI Model

    This article explains the Open Systems Interconnection (OSI) model and the 7 layers of networking, in plain English.

  3. Presentation Layer

    OSI Layer 6 - Presentation Layer. The presentation layer is responsible for the delivery and formatting of information to the application layer for further processing or display. It relieves the application layer of concern regarding syntactical differences in data representation within the end-user systems. An example of a presentation service ...

  4. What is OSI Model?

    In conclusion, the OSI (Open Systems Interconnection) model is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven distinct layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application.

  5. 7 Layers of The OSI Model (A Complete Guide)

    A Complete Guide to Open Systems Interconnection model (OSI model). 7 layers of the OSI Model are explained with functionalities and roles of each layer.

  6. Presentation layer

    In the seven-layer OSI model of computer networking, the presentation layer is layer 6 and serves as the data translator for the network. [ 2][ 3][ 4] It is sometimes called the syntax layer.

  7. What is the OSI Model? 7 layers explained in detail

    7 Layers of the OSI Model. 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.

  8. OSI Seven Layers Model Explained with Examples

    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.

  9. The OSI Model

    Starting with the Application Layer the message moves down the OSI model, and it eventually reaches the Physical Layer for transmission. When the message is received by the physical layer, the message will then move up the OSI layers until it reaches the final application layer.

  10. The OSI Model's 7 Layers Explained

    This article explains the seven layers in the OSI model, a network communication framework that simplifies complex network interactions into a structured format.

  11. OSI model

    1. Physical layer. The Open Systems Interconnection (OSI) model is a reference model from the International Organization for Standardization (ISO) that "provides a common basis for the coordination of standards development for the purpose of systems interconnection." [2] In the OSI reference model, the communications between systems are split ...

  12. What is the OSI model? How to explain and remember its 7 layers

    A tutorial on the Open Systems Interconnection (OSI) networking reference model plus tips on how to memorize the seven layers.

  13. Presentation Layer in OSI Model

    The presentation layer is the 6 th layer from the bottom in the OSI model. This layer presents the incoming data from the application layer of the sender machine to the receiver machine. It converts one format of data to another format of data if both sender and receiver understand different formats; hence this layer is also called the ...

  14. The 7 OSI Networking Layers Explained

    The Open Systems Interconnection (OSI) networking model defines a conceptual framework for communications between computer systems. The model is an ISO standard which identifies seven fundamental networking layers, from the physical hardware up to high-level software applications.

  15. The OSI Model Layers from Physical to Application

    The Presentation layer has the simplest function of any piece of the OSI model. At layer 6, it handles syntax processing of message data such as format conversions and encryption/decryption needed to support the Application layer above it.

  16. The OSI Model & The 7 Layers Explained

    In the OSI reference model, the communications between a computing system are split into seven different abstraction layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application. Created at a time when network computing was in its infancy, the OSI was published in 1984 by the International Organization for ...

  17. PDF The OSI Model: Understanding the Seven Layers of Computer Networks

    Introduction The Open Systems Interconnection (OSI) model is a reference tool for understanding data communications between any two networked systems. It divides the communications processes into seven layers. Each layer both performs specific functions to support the layers above it and offers services to the layers below it.The three lowest layers focus on passing traffic through the network ...

  18. OSI Model Layers and Protocols in Computer Network

    OSI model tutorial covers the topics like OSI model definition, characteristics, history, physical, data link, transport, network, and session layer with examples.

  19. What is the OSI model? The 7 layers of OSI explained

    What is OSI model (Open Systems Interconnection)? OSI (Open Systems Interconnection) is a reference model for how applications communicate over a network. This model focuses on providing a visual design of how each communications layer is built on top of the other, starting with the physical cabling, all the way to the application that's trying to communicate with other devices on a network.

  20. OSI Model: 7 Layers Explained in Computer Network

    OSI Model OSI stands for Open System Interconnection is a reference model that describes how information from a software application in one computer moves through a physical medium to the software application in another computer. OSI consists of seven layers, and each layer performs a particular network function.

  21. The All-In-One OSI Model Cheat Sheet 2024

    Stressed trying to remember the seven layers of the OSI model in networking? Get this cheat sheet written for you and master the OSI model in no time.

  22. What is the OSI Model?

    What is the OSI Model? The Open Systems Interconnection (OSI) model is a conceptual framework that divides network communications functions into seven layers. Sending data over a network is complex because various hardware and software technologies must work cohesively across geographical and political boundaries. The OSI data model provides a universal language for computer networking, so ...