Presentation layer and Session layer of the OSI model

There are two popular networking models: the OSI layers model and the TCP/IP layers model. The presentation layer and session layer exist only in the OSI layers models. The TCP/IP layers model merges them into the application layer.

The Presentation Layer

The presentation layer is the sixth layer of the OSI Reference model. It defines how data and information is transmitted and presented to the user. It translates data and format code in such a way that it is correctly used by the application layer.

It identifies the syntaxes that different applications use and formats data using those syntaxes. For example, a web browser receives a web page from a web server in the HTML language. HTML language includes many tags and markup that have no meaning for the end user but they have special meaning for the web browser. the web browser uses the presentation layer's logic to read those syntaxes and format data in such a way the web server wants it to be present to the user.

presentation layer

On the sender device, it encapsulates and compresses data before sending it to the network to increase the speed and security of the network. On the receiver device, it de-encapsulates and decompresses data before presenting it to the user.

Examples of the presentation layer

Example standards for representing graphical information: JPEG, GIF, JPEG, and TIFF.

Example standards for representing audio information: WAV, MIDI, MP3.

Example standards for representing video information: WMV, MOV, MP4, MPEG.

Example standards for representing text information: doc, xls, txt, pdf.

Functions of the presentation layer

  • It formats and presents data and information.
  • It encrypts and compresses data before giving it to the session layer.
  • It de-encrypts and decompresses the encrypted and compressed data it receives from the session layer.

Session layer

The session layer is the fifth layer of the OSI layers model. It is responsible for initiating, establishing, managing, and terminating sessions between the local application and the remote applications.

It defines standards for three modes of communication: full duplex, half-duplex, and simplex.

duplex modes

In the full duplex mode, both devices can send and receive data simultaneously. The internet connection is an example of the full duplex mode.

In the half duplex mode, only one device can send data at a time. A telephone conversation is an example of the half-duplex mode.

In the simplex mode, only one device can send data. A radio broadcast is an example of the simplex mode.

Functions of the session layer

  • It is responsible for terminating sessions, creating checkpoints, and recovering data when sessions are interrupted.
  • It opens and maintains logical communication channels between network applications running on the local host and network applications running on the remote host.
  • If a network application uses an authentication mechanism before it opens a logical communication channel (session) with the remote host, it handles the authentication process.

Examples of the session layer

Structure Query Language (SQL), Remote Procedure Call (RPC), and Network File System (NFS) are examples of the session layer.

By ComputerNetworkingNotes Updated on 2023-04-25

ComputerNetworkingNotes CCNA Study Guide Presentation layer and Session layer of the OSI model

  • 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]

  • Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
  • Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand
  • OverflowAI GenAI features for Teams
  • OverflowAPI Train & fine-tune LLMs
  • Labs The future of collective knowledge sharing
  • About the company Visit the blog

Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Get early access and see previews of new features.

OSI model - What's the presentation and session layer for?

So I feel I pretty well understand the application layer, and everything below (and including) the transport layer.

The session and presentation layers, though, I don't fully understand. I've read the simplistic descriptions in Wikipedia, but it doesn't have an example of why separating out those layers is useful.

  • What is the session layer? What does it do, and under what circumstances is it better to have a session layer than simply talk to the transport with your app?
  • What is the presentation layer? (same questions as above)

Adam Davis's user avatar

7 Answers 7

The session layer is meant to store states between two connections, like what we use cookies for when working with web programming.

The presentation layer is meant to convert between different formats. This was simpler when the only format that was worried about was character encoding, ie ASCII and EBCDIC. When you consider all of the different formats that we have today(Quicktime, Flash, Pdf) centralizing this layer is out of the question.

TCP/IP doesn't make any allocation to these layers, since they are really out of the scope of a networking protocol. It's up to the applications that take advantage of the stack to implement these.

Antonio Haley's user avatar

The reasons there aren't any examples on wikipedia is that there aren't a whole lot of examples of the OSI network model, period.

OSI has once again created a standard nobody uses, so nobody really know how one should use it.

Rik's user avatar

Layers 5-6 are not commonly used in today's web applications, so you don't hear much about them. The TCP/IP stack is slightly different than a pure OSI Model.

Corey Goldberg's user avatar

One of the reasons TCP/IP is used today instead of OSI is it was too bloated and theoretical, the session and presentation layer aren't really needed as separate layers as it turned out.

Vasil's user avatar

I think that presentation layer protocols define the format of data. This means protocols like XML or ASN.1. You could argue that video/audio codecs are part of the presentation layer Although this is probably heading towards the application layer.

I can't help you with the session layer. That has always baffled me.

To be honest, there are very vague boundaries in everything above the transport layer. This is because it is usually handled by a single software application. Also, these layers are not directly associated with transporting data from A to B. Layers 4 and below each have a very specific purpose in moving the data e.g. switching, routing, ensuring data integrity etc. This makes it easier to distinguish between these layers.

David Turvey's user avatar

Presentation Layer 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.

Session Layer When two devices, computers or servers 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.

Himansh's user avatar

For the presentation layer :because most of communication done between heterogeneous systems (Operating Systems,programing langages,cpu architectures)we need to use a unified idepedent specification .like ANS1 ans BRE.

ibrahim 's user avatar

Your Answer

Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more

Sign up or log in

Post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .

Not the answer you're looking for? Browse other questions tagged networking model stack osi or ask your own question .

  • The Overflow Blog
  • One of the best ways to get value for AI coding tools: generating tests
  • The world’s largest open-source business has plans for enhancing LLMs
  • Featured on Meta
  • User activation: Learnings and opportunities
  • Site maintenance - Mon, Sept 16 2024, 21:00 UTC to Tue, Sept 17 2024, 2:00...
  • Staging Ground Reviewer Motivation
  • What does a new user need in a homepage experience on Stack Overflow?

Hot Network Questions

  • How can I stop the noise from updating its position when I adjust the spline?
  • Why would the GPL be viral, while EUPL isn't, according to the EUPL authors?
  • Time in Schwarzschild coordinates
  • How can I analyze the anatomy of a humanoid species to create sounds for their language?
  • How do you ensure that calendar invites won't be moved out of your inbox when your rules are executed?
  • If Act A repeals another Act B, and Act A is repealed, what happens to the Act B?
  • Remove all punctuation AND the values after it at end of string in R
  • "Tail -f" on symlink that points to a file on another drive has interval stops, but not when tailing the original file
  • How would platypus evolve some sort of digestive acid?
  • Numerical precision of keys in Merge function
  • How to prove that the Greek cross tiles the plane?
  • Example of two dinatural transformations between finite categories that do not compose
  • How can I support a closet rod where there's no shelf?
  • How many engineers/scientists believed that human flight was imminent as of the late 19th/early 20th century?
  • Help updating 34 year old document to run with modern LaTeX
  • Removing extra characters from code environment in beamer
  • Is it a correct rendering of Acts 1,24 when the New World Translation puts in „Jehovah“ instead of Lord?
  • To whom or what did Jesus address Ephphatha?
  • Subject verb agreement - I as well as he is/am the culprit
  • Movie where a young director's student film gets made (badly) by a major studio
  • cat file contents to clipboard over ssh and across different OS
  • Why my Gunnera Manicata older leaves die?
  • Why do I often see bunches of medical helicopters hovering in clusters in various locations
  • How is switching of measurement ranges in instruments, like oscilloscopes, realized nowadays?

what is presentation and session layer

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

freeCodeCamp

By 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:

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 .

Learn to code. Build projects. Earn certifications—All for free.

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

  • Cloud and data center networking

session layer

  • Gavin Wright
  • Andrew Froehlich, West Gate Networks

What is session layer?

The session layer is Layer 5 of the OSI communications model. It is the long-lived logical connection that persists between endpoints over time. A single session is all the back-and-forth communication between two endpoints. It helps a protocol to be more consistent and reliable. The TCP/IP protocol does not have a separate session layer, but it's functionality can be present in the TCP/IP application layer.

The session layer sits between the transport and the presentation layer in the OSI model. The transport layer consists of short-lived bursts of data, typically in packets . The transport layer isn't concerned if the computers are already in communication or not, it simply sends packets back and forth. The session layer organizes this start and stop traffic into an overall session between the two endpoints with a specific start and end point. The session layer then gives the coherent data it collected to the presentation layer.

Chart showing OSI model Layer 5

The session layer is important for the internet to function because it can save bandwidth and processing power. Encrypted communication between two endpoints typically takes a lot of processing power at startup to create and send the shared secrets. By maintaining the single session between endpoints the same secrets can be used for some time. If there was no long-lived session, they would need to do the same expensive start up process each time they wanted to send a packet of data, which would be slow and take a lot of processing power to do.

Authentication can happen at the start of a session. Then all communication within that session could be considered as coming from the same source, without needing to re-authenticate for every sent data packet.

The session layer can contain checkpoints in the data to be transmitted. If the sent data were to be lost or corrupted during transmission, only the newest data since the last checkpoint would need to be retransmitted. This saves on the total amount of data transmitted. It also insulates the higher-level systems from being aware of low-level data transmission problems.

To help understand the session layer, imagine two people at a party. They would typically say hello to each other at the start of the party, initiating a long session between the two of them. The length of the conversation between when they say hello and goodbye would be one session. The sentences they say back and forth would be the transport layer; they could even talk about different topics, similar to the application layer. A single session could even be momentarily interrupted; perhaps one person stops to talk to someone else, but then goes back to talking to the original person again and continues the conversation without another greeting. When they say goodbye, it would end the session. Maybe much later they bump into each other and then say hello again, starting a new session.

The session layer is important in media streams. IT can help to combine separate data streams, such as one for audio and one for video, into a single session. This can be controlled with high-level protocols, such as the Session Initiation Protocol ( SIP ).

Chart showing how Session Initiation Protocol (SIP) works

TCP/IP and the session layer

The OSI model is a theoretical construct of how communication between systems can be understood. It does not directly relate to any specific implementation. TCP/IP , on the other hand, is a practically implemented protocol that is used in modern computer networks and on the internet.

TCP/IP does not contain a specific session layer. Instead the functionality of the OSI session, presentation and application layers are all combined into the single TCP/IP application layer. So, any session functionality present on a TCP/IP network must be implemented on a higher-level protocol that lives on top of TCP/IP.

Session layer protocols

There are several different session layer protocols, including the following:

  • AppleTalk Data Stream Protocol (ADSP) and AppleTalk Session Protocol (ASP) (Deprecated).
  • Layer 2 Forwarding (L2F) and Layer 2 Tunneling Protocol ( L2TP ).
  • Network Basic Input/Output System ( NetBIOS ).
  • Point-to-Point Tunneling Protocol (PPTP).
  • Real-time Transport Control Protocol ( RTCP ).
  • Remote Procedure Call ( RPC ).
  • Session Control Protocol (SCP).
  • SOCKS Proxy .

Learn how to identify and prevent OSI model Layers 4 to 7 security risks .

Continue Reading About session layer

  • 12 common network protocols and their functions explained
  • Choosing between an SSL/TLS VPN vs. IPsec VPN
  • 9 most common network issues and how to solve them
  • Intro to encapsulation and decapsulation in networking
  • Prepare your answers for 15 server and networking interview questions

Related Terms

Dig deeper on cloud and data center networking.

what is presentation and session layer

An explanation of TCP/IP

SamanthaPoutre

Transmission Control Protocol (TCP)

KinzaYasar

network load balancing (NLB)

RahulAwati

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 ...

Auditing is a crucial part of mobile device security, but IT admins must ensure their approach is thorough and consistent. Learn ...

With the right software, almost any mobile device can be a payment terminal. Learn about the mobile point-of-sale options beyond ...

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

AT&T claims its negotiated contract with VMware pre-Broadcom acquisition is not being honored, casting light on recent product ...

Rocky Linux and AlmaLinux are new distributions created after Red Hat announced the discontinuation of CentOS. These ...

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

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 ...

  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.

Understanding the Purpose and Function of the Session Layer in the OSI Model

2022/08/18 ・ computer networking, 1. introduction.

In this article, we will discuss the purpose and function of the session layer, which is the fifth layer of the OSI model.

The purpose of the session layer is to establish, maintain, and terminate communication sessions between devices in a network. It synchronises communication between devices and manages data flow control, ensuring reliable communication between devices.

Some protocols used at the session layer include SCTP (Stream Control Transmission Protocol) and SPX (Sequenced Packet Exchange). These protocols enable the exchange of data and control information between devices at the session layer, allowing them to communicate effectively.

In real-life scenarios, the session layer is essential for enabling communication between devices in a network. For example, when a client device initiates a session with a server, the session layer establishes the communication session, manages the exchange of data between the two devices, and terminates the session when it is no longer needed.

Overall, the session layer plays a crucial role in enabling communication and data exchange between devices in a network, making it an essential part of the OSI networking model.

2. What is the Session Layer?

The session layer, the fifth level in the OSI reference model, manages the interactions between applications on various devices. Its primary function is establishing, controlling, and terminating communication sessions between applications on different machines. In addition, the session layer creates a way for applications to initiate, maintain and conclude conversations or “sessions” with each other.

Some of the primary responsibilities and functionalities of the session layer include the following:

  • Managing the initiation, maintenance, and termination of sessions between applications on different devices. This includes setting up communication channels and regulating data flow between the devices.
  • Synchronising communications between applications. This can be done by breaking down large quantities of data into smaller packets and reassembling them upon receipt.
  • Managing communication errors and ensuring that data is transmitted reliably. This can include resending lost or damaged data and confirming receipt of data to guarantee its correctness.
  • Handling security and access control for sessions. This can include methods such as encrypting data to prevent eavesdropping and confirming the identity of devices in the session to guarantee that only authorized devices can access it.

3. Functions of the Session Layer

It ensures that data is transmitted in an organized and secure manner by performing various functions such as:

  • Establishing communication sessions: It is responsible for setting up a communication channel between devices, allowing them to exchange information. This can include negotiations over the protocol and parameters of the session and allocating resources.
  • Maintaining communication sessions: Once the communication channel is established, the session layer maintains it by monitoring the data flow and ensuring that the session remains active. This can include detecting dropped connections and renegotiating sessions as needed.
  • Terminating communication sessions: The session layer also is responsible for completing communication sessions when they are no longer needed. This can include things such as releasing resources and shutting down communication channels.
  • Synchronizing communication: The session layer helps sync communication between devices by ensuring that data is sent and received at the correct time. It helps prevent data loss or corruption by providing a mechanism for agreeing upon and managing data flow.
  • Error checking and recovery: The session layer also checks errors to ensure data is transmitted reliably. In case of any errors occur, it takes the necessary steps to recover from them and ensure that information is not lost during transmission.
  • Managing data flow control: The session layer also contains data flow between devices, allowing them to communicate simultaneously. This can include implementing flow control mechanisms and buffering data to ensure that the receiving device can handle the data as it is transmitted.

It is important to note that these functions can vary depending on the system or network used, and not all systems adhere strictly to the OSI model. But the session layer remains crucial for secure and efficient data transfer in most scenarios.

4. Protocols Used at the Session Layer

The Session Layer of the OSI model uses various protocols to enable communication and data exchange between devices. Here are two examples of protocols that are commonly used at the session layer:

SCTP (Stream Control Transmission Protocol): SCTP is a transport-layer protocol that is designed to provide a reliable, message-oriented communication service similar to TCP but with additional features such as multihoming (support for multiple IP addresses on each end of the connection), support for message fragmentation, and improved error recovery. SCTP is often used for real-time applications such as voice-over IP and online gaming, as it provides a more efficient way of transmitting time-sensitive data.

SPX (Sequenced Packet Exchange): SPX is a transport-layer protocol used by the Novell NetWare operating system. It is similar to TCP in that it provides a reliable, connection-oriented communication service but also includes flow control and error recovery features. SPX is used primarily in local area networks (LANs) to exchange data between Novell NetWare servers and clients.

SCTP and SPX are transport layer protocols that can provide a reliable and efficient way of transmitting data between devices at the session layer. They both provide a way to establish and terminate communication sessions, synchronise communication between devices, manage errors and provide a secure communication path. SCTP also provides a multihoming feature, which means it can use multiple IP addresses on each end of the connection, providing higher availability and reliability. SPX, being a protocol for Novell Netware networks, offers specific features for such systems, such as flow control and error recovery, and it’s primarily used in local area networks.

5. Role of the Session Layer in Networking

The session layer enables communication and data exchange in various networking scenarios. It is responsible for creating and managing communication sessions, synchronising communication, handling errors and providing a secure communication path. Thus, it is crucial to secure the session layer to ensure that the data is transmitted safely and to avoid vulnerabilities, threats and attacks.

Online communication: The session layer is used to establish and maintain communication between devices such as computers, smartphones, and tablets to facilitate online communication, including instant messaging and voice and video calls.

Online gaming: The session layer establishes and maintains communication between gaming devices such as computers, consoles, and mobile phones to enable online gaming. It is also used to synchronise the communication between devices to ensure that the gaming experience is smooth and lag-free.

Remote access: The session layer establishes and maintains communication between a remote device and a host system. This allows users to remotely access the host system and its resources, such as files and applications, from virtually anywhere.

Industrial control systems: The session layer establishes and maintains communication between them and their monitoring and control systems. This allows industrial systems to exchange data and communicate in real time, enabling precise monitoring and control of industrial processes.

File transfers: The session layer establishes and maintains communication between devices to facilitate file transfers. It also manages data flow between devices, ensuring that files are transferred quickly and efficiently.

6. Threats, Vulnerability, and Attacks in the Session Layer

Here are some common vulnerabilities, threats, and attacks that target the session layer:

Session hijacking: An attack where an attacker intercepts a communication session and takes control of it without knowing the legitimate parties involved. This can be done through techniques such as IP spoofing and packet sniffing and can result in the attacker gaining unauthorised access to sensitive information.

Man-in-the-middle attacks involve an attacker intercepting and tampering with data transmitted between two devices by positioning themselves in the middle of the communication channel. This can include modifying data, injecting malicious code, and intercepting login credentials.

Denial of service attacks: These attacks aim to overwhelm a system’s resources and render it unavailable to legitimate users. In the case of the session layer, a Denial of Service (DoS) attack can be used to prevent devices from establishing or maintaining communication sessions, leading to a disruption of service.

Amplification attacks: These attacks take advantage of vulnerable systems, such as network devices, that can amplify the traffic directed at a target. Amplification attacks on the session layer can disrupt the normal flow of communication by overwhelming a device’s resources, causing it to fail.

Malicious Inputs: The session layer can also be susceptible to attacks through negative inputs, where the attacker attempts to inject invalid data into the system. This can cause a session to malfunction and may cause sensitive information to be compromised.

Session fixation: An attack where an attacker fixes a session ID with the victim. Thus, the victim would unknowingly communicate with the attacker using the attacker’s session ID.

These are just a few examples of vulnerabilities and attacks that can target the session layer. As with any security measure, it’s crucial to stay informed about the latest threats and to implement appropriate countermeasures, such as firewalls, intrusion detection systems, and encryption, to mitigate the risks. Moreover, regular security assessments and penetration testing can help identify vulnerabilities in the session layer and take appropriate action.

7. How to Secure the Session Layer

Securing the Session Layer is essential to network security as it plays a vital role in data transmission. The following are some of the ways that can be used to secure the session layer:

Implementing robust authentication methods: This can include multi-factor authentication, which uses a combination of different authentication mechanisms, such as passwords and biometrics, to ensure that only authorised users can access the system.

Encryption: Implementing encryption for session-layer communication can provide an added layer of security to protect data from unauthorised access. This can include things like using Secure Sockets Layer (SSL) or Transport Layer Security (TLS) for web communication or using Virtual Private Network (VPN) for remote access.

Firewalls: Firewalls act as a barrier between internal and external networks and can be configured to block unauthorised access and filter traffic. They can also help to prevent session hijacking and man-in-the-middle attacks.

Intrusion detection systems: monitor network traffic and identify any suspicious activity. An alert is generated if a potential attack is detected, allowing the system administrator to take action.

Network Segmentation: Segmenting the network into different parts can limit the scope of a compromise. For example, you can have a DMZ (Demilitarized Zone) for the public-facing systems and a separate VLAN for the internal systems.

Regular security assessments and penetration testing: Regular security assessments and penetration testing can help identify vulnerabilities in the session layer and help organizations take appropriate action to mitigate them.

Keeping software updated: Regularly updating software, especially security-related software, such as firewalls, intrusion detection systems, and encryption solutions, can help to ensure that any known vulnerabilities are patched and that the system is as secure as possible.

It’s essential to note that securing the session layer is an ongoing process, and security measures must be regularly reviewed and updated to keep up with new threats and changing technology. Moreover, an incident response plan will help handle unexpected security breaches.

A case study highlighting the importance of the session layer security, the attacks that target it and the ways to mitigate them was the 2011 Sony PlayStation Network hack. The personal information and credit card details of 77 million users were compromised due to a vulnerability in the session layer. In addition, the attack caused Sony to shut down the PlayStation Network and Qriocity services, resulting in a loss of credibility and financial loss for the company.

8. Conclusion

In this article, we have discussed the role and functions of the Session Layer in the OSI (Open Systems Interconnection) model. The session layer, also known as layer 5, is responsible for managing the interactions between various applications on different devices. It ensures that data is transmitted in an organised and secure manner by performing multiple functions such as establishing communication sessions, maintaining communication sessions, terminating communication sessions, synchronising communication, handling error checking and recovery and managing data flow control.

We also discussed the vulnerabilities, threats, and attacks that can target the session layer, such as session hijacking, man-in-the-middle attacks, denial of service attacks, amplification attacks and session fixation. Finally, we highlighted the importance of securing the session layer by implementing robust authentication methods, encryption, firewalls, intrusion detection systems, network segmentation, regular security assessments, penetration testing and keeping software updated.

In addition, we have also provided examples of session layer protocols, such as SCTP and SPX, which are used to enable communication and data exchange between devices at the session layer. Finally, we also gave examples of how the session layer is used in various networking scenarios, such as online communication, online gaming, remote access, industrial control systems and file transfers.

To summarise, the session layer is crucial in enabling communication and data exchange between devices in a network. It is responsible for creating, maintaining and terminating communication sessions, ensuring that data is transmitted in an organised and secure manner. Therefore, it is essential to be aware of the potential vulnerabilities and threats that can target the session layer and implement appropriate countermeasures to mitigate them.

For those interested in further reading on the topic, the ISO (International Organization for Standardization) provides a detailed description of the OSI model, including the session layer, on their website. Additionally, the SANS Institute offers a comprehensive guide for securing the session layer, including best practices and case studies.

9. Session Layer FAQs

  • How does the session layer ensure data is transmitted reliably?

The session layer ensures data is transmitted reliably by performing error checking, implementing flow control mechanisms, and ensuring that information is sent and received at the correct time. In case of errors, it takes steps to recover from them and to prevent data loss during transmission.

  • What is the difference between the session layer and the transport layer?

The Session Layer and Transport Layer are both parts of the OSI model. The Session Layer is responsible for managing the interactions between applications on different devices; it is responsible for creating and terminating communication sessions. The Transport Layer is responsible for providing end-to-end communication services for applications.

  • Can the session layer encrypt data to protect it from unauthorized access?

The Session Layer can’t encrypt data but can use protocols and mechanisms to provide encryption, such as SSL or TLS.

  • How does the session layer help in online gaming?

The session layer plays a vital role in online gaming by establishing and maintaining communication sessions between gaming devices, synchronizing communication, and managing errors to ensure a smooth and lag-free gaming experience. It also helps to ensure that data is transmitted reliably and securely between devices so that the game state is updated correctly and players can interact seamlessly.

  • How does the session layer play a role in industrial control systems?

In industrial control systems, the session layer is used to establish and maintain communication sessions between industrial control systems and their monitoring and control systems. It allows industrial systems to exchange data and communicate in real time, enabling precise monitoring and control of industrial processes.

  • Can session layer protocols help in preventing Denial of Service attacks?

Session layer protocols do not directly help in preventing Denial of Service attacks. Still, the security measures implemented at the session layer, such as firewalls and intrusion detection systems, can help to detect and mitigate DDoS attacks.

  • How does a session fixation attack take place?

A session fixation attack occurs when an attacker fixes a session ID for a victim. Thus the victim communicates with the attacker using the attacker’s session ID. This allows the attacker to intercept the communication and gain unauthorised access to sensitive information.

  • Is the session layer important for IoT devices?

Yes, the session layer is essential for IoT (Internet of Things) devices as it is critical in enabling communication and data exchange between them. IoT devices often rely on the session layer to establish and maintain communication sessions, synchronise communication, and ensure data is transmitted in an organised and secure manner. Ensuring that the session layer is safe is crucial for the security of IoT systems, as it helps to prevent unauthorised access to data and protect against various threats and vulnerabilities.

  • How do the session layer protocols ensure data privacy and security?

Session layer protocols ensure data privacy and security by providing a secure communication path between devices. They can use encryption to protect data from unauthorised access and implement various security measures to prevent attacks such as session hijacking and man-in-the-middle attacks. Additionally, session layer protocols can implement error checking and recovery mechanisms to ensure data is transmitted reliably and to prevent data loss during transmission. These measures help to ensure that information is transferred securely and confidentially between devices.

  • Generative AI
  • Office Suites
  • Collaboration Software
  • Productivity Software
  • Augmented Reality
  • Emerging Technology
  • Remote Work
  • Artificial Intelligence
  • Operating Systems
  • IT Leadership
  • IT Management
  • IT Operations
  • Cloud Computing
  • Computers and Peripherals
  • Data Center
  • Enterprise Applications
  • Vendors and Providers
  • Enterprise Buyer’s Guides
  • United States
  • Netherlands
  • United Kingdom
  • New Zealand
  • Newsletters
  • Foundry Careers
  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Copyright Notice
  • Member Preferences
  • About AdChoices
  • E-commerce Affiliate Relationships
  • Your California Privacy Rights

Our Network

  • Network World

The Session Layer: Understanding layer 5 of the OSI Model

According to the OSI Model, the session layer is where connections are established, managed, and torn down. For connection-oriented network protocols, understanding how the session layer works, and what symptoms would help you identify when it’s not working, is an important part of your job as a network administrator. However, because TCP doesn’t respect the OSI model, we have to sort of carve TCP/IP out of this conversation, which really limits its practical application in most environments.

When you think about session-oriented communications vs. connectionless conversations, you might compare them to a telephone conversation vs. using a walkie-talkie. With a telephone, you call the person who you want to talk to, establish a connection — or session — and then you hang up, severing the connection once the conversation is completed. With a walkie-talkie, you simply speak into the device and hope that the person on the other end is listening and that they respond in kind. There’s no session established.

Two session-oriented protocols that you are still likely to see on production networks are Netbios and RPC . These protocols are commonly used within Microsoft-based LAN environments. However, problems with these protocols are seldom seen and when they are, since they’re used on the LAN, it’s unlikely that the problem is network related. More likely, it’s an application problem.

Discussing the session layer can be a bit confusing as when most people think about sessions nowadays they’re thinking about TCP sessions. It’s important to understand that the TCP Reference Model doesn’t really concern itself with the OSI Model. With TCP traffic, the connections are established at the transport layer .

Of the seven layers of the OSI Model, layers 5 and 6, the session and presentation layers, are the two least relevant layers for network engineers. Disagree? Got a great example of how expert knowledge of these two layers came in handy for a network troubleshooting scenario? If so, please share it here as I’m always looking to learn something new.

Flame on…

Follow me on Twitter

  • The Transport Layer: Understanding layer 4 of the OSI Model
  • The Network Layer: Understanding layer 3 of the OSI Model
  • The Data Link Layer: Understanding one of my favorite layers of the OSI Model
  • The Physical Layer: Understanding the OSI Model
  • Understanding the OSI Model

Josh Stephens is Head Geek and VP of Technology at SolarWinds , an IT management software company based in Austin, Texas. He shares network management best practices on SolarWinds’ GeekSpeak and thwack . Follow Josh on Twitter @sw_headgeek and SolarWinds @solarwinds_inc .

Related content

Nerdio enables remote work across the canadian wilderness for the government of alberta, digital nomads just got huge screens and fast internet, mcdonald's serves up a master class in how not to explain a system outage, meta services begin recovering from major disruption, from our editors straight to your inbox, more from this author, back to basics: duplex and symmetry, is big data a big drain on your network, 5 tech team lessons from ‘the avengers,’ and a movie review, results from geek day 2012 in washington d.c., josh stephens, data center expertise: hard to come by, harder to validate, the softer side of network administration, tracking down problem devices on your network, show me more, decoding openai’s o1 family of large language models.

Image

What North Korea's infiltration into American IT says about hiring

Image

How to bring Google's Pixel 9 Pro Fold multitasking magic to any Android device

Image

Podcast: Reaction to the Apple iPhone 16 launch, Apple Intelligence eventually?

Image

Podcast: AI firms continue to raise money, expand despite disillusionment

Image

Podcast: How to pick the right LLM for your AI project

Image

Apple launches iPhone 16, but the AI comes later?

Image

Tech news roundup: AI companies continue to expand offerings, raise cash

Image

Why all large language models are not the same

Image

Sponsored Links

  • OpenText Financial Services Summit 2024 in New York City!
  • Visibility, monitoring, analytics. See Cisco SD-WAN in a live demo.
  • 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.

  • 105 Funny Things to Do to Make Someone Laugh
  • Best PS5 SSDs in 2024: Top Picks for Expanding Your Storage
  • Best Nintendo Switch Controllers in 2024
  • Xbox Game Pass Ultimate: Features, Benefits, and Pricing in 2024
  • #geekstreak2024 – 21 Days POTD Challenge Powered By Deutsche Bank

Improve your Coding Skills with Practice

 alt=

What kind of Experience do you want to share?

IncludeHelp_logo

  • Data Structure
  • Coding Problems
  • C Interview Programs
  • C++ Aptitude
  • Java Aptitude
  • C# Aptitude
  • PHP Aptitude
  • Linux Aptitude
  • DBMS Aptitude
  • Networking Aptitude
  • AI Aptitude
  • MIS Executive
  • Web Technologie MCQs
  • CS Subjects MCQs
  • Databases MCQs
  • Programming MCQs
  • Testing Software MCQs
  • Digital Mktg Subjects MCQs
  • Cloud Computing S/W MCQs
  • Engineering Subjects MCQs
  • Commerce MCQs
  • More MCQs...
  • Machine Learning/AI
  • Operating System
  • Computer Network
  • Software Engineering
  • Discrete Mathematics
  • Digital Electronics
  • Data Mining
  • Embedded Systems
  • Cryptography
  • CS Fundamental
  • More Tutorials...
  • Tech Articles
  • Code Examples
  • Programmer's Calculator
  • XML Sitemap Generator
  • Tools & Generators

IncludeHelp

Computer Network Tutorial

  • Computer Network - Home
  • Computer Network - Overview
  • Computer Network - Applications
  • Computer Network - TCP/IP
  • Computer Network - OSI Model
  • Computer Network - Transport, Network, & Application Layers
  • Computer Network - Network Protocols & Network Software
  • Computer Network - TopologiesTypes
  • Computer Network - Hub
  • Computer Network - Routing
  • Computer Network - Routers
  • Computer Network - Dynamic Routing Protocols
  • Computer Network - Router
  • Computer Network - Populating a Routing Table
  • Computer Network - Switches
  • Computer Network - Layer 2 Switching
  • Computer Network - Configure Cisco Switch
  • Computer Network - ICMP
  • Computer Network - ICMP Messages
  • Computer Network - Addressing
  • Computer Network - Classless Addressing
  • Computer Network - IPV4 Addressing
  • Computer Network - IPV6 Addressing
  • Computer Network - Logical Addressing, Notations
  • Computer Network - Classful & Classless Addressing
  • Computer Network - Subnetting & Supernetting
  • Computer Network - Network Address Translation
  • Computer Network - FLSM & VLSM
  • Computer Network - Line Configuration
  • Transmission Computer Network - Modes
  • Computer Network - Data Link Layer
  • Computer Network - Physical Layer
  • Computer Network - Network Layer
  • Computer Network - Session Layer
  • Computer Network - Transport Layer
  • Computer Network - Application Layer
  • Computer Network - Presentation Layer
  • Computer Network - Coaxial Cable
  • Computer Network - Optical Fiber
  • Computer Network - Unguided Transmission Media
  • Computer Network - Virtual LAN (VLAN)
  • Computer Network - VSAN
  • Computer Network - Multiple Access Protocol
  • Computer Network - Random Access methods
  • Computer Network - Aloha Network
  • Computer Network - CSMA
  • Computer Network - FDMA & TDMA
  • Computer Network - CDMA
  • Computer Network - Ethernet Technology
  • Computer Network - Types of Network Topology
  • Computer Network - Data Transmission
  • Computer Network - Switching Techniques
  • Computer Network - Transmission Impairment
  • Computer Network - Synchronous & Asynchronous Transmission
  • Computer Network - Intent-Based Networking
  • Computer Network - Software-Defined Networking
  • Computer Network - Wireless Personal Area Network
  • Computer Network - Wireless Wide Area Network
  • Computer Network - P2P File Sharing
  • Computer Network - Packet Switching
  • Computer Network - PGP - Authentication & Confidentiality
  • Computer Network - PGP - Encryption & Compression
  • Computer Network - Phishing Attacks
  • Computer Network - ICMP Ping
  • Computer Network - Pipelining in Packet Switching
  • Computer Network - Plaintext Vs. Cleartext Encryption
  • Computer Network - Platform as a Service (PaaS)
  • Computer Network - GPRS Architecture
  • Computer Network - Identify & Prevent Phishing & Pharming
  • Computer Network - Change MAC Address
  • Computer Network - Network Administrator Vs. Network Engineer

Difference B/W Articles

  • Computer Network - Phishing & Pharming
  • Computer Network - Ping Vs. Traceroute
  • Computer Network - Network Vs. System Administrator
  • Computer Network - Network & Application Layer Protocols
  • Computer Network - Network Security Vs. Network Administration
  • Computer Network - Network Vs. Internet
  • Computer Network - PDH Vs. SDH
  • Computer Network - PCI Vs. PCI express
  • Computer Network - PCI-E Vs. PCI-X
  • Computer Network - OT Vs. IT Networks

Computer Network Practice

  • Computer Network - MCQs
  • Computer Network - Aptitude Questions

Advertisement

Home » Computer Network

Session Layer: What It Is, Design Issues, Functionalities

Description and Functions of Session Layer in the OSI model: In this article, we are going to learn what the Session layer is and the Functions of Session Layer in the OSI model in Computer Networking. We will also discuss the Design issues with Session Layer and the working of Session Layer with the help of its diagram and an example. By Monika Jha Last updated : May 05, 2023

What is Session Layer?

The services provided by the first three layers are not enough for some processes. The session layer is also known as a network dialog controller, it creates, maintains, synchronizes the interaction between communicating applications.

  • The session layer tracks the dialogs between systems, which are also called sessions. This layer manages a session by initiating the opening and closing of sessions between end-user application processes.
  • It also controls single or multiple connections for each end-user application and directly communicates with both the presentation and the transport layers. The services provided by the session layer are generally implemented in the application environment using remote procedure calls (RPCs).
  • In the Session layer , streams of data are marked and are resynchronized properly, so that the ends of the messages are not cut prematurely and data loss is avoided.
  • A protocol such as Zone Information Protocol, AppleTalk Protocol, and Session Control Protocol are used to implement sessions on Web browsers.
  • Through checkpointing and recovery session management and restoration are possible using these protocols.
  • For example, in live television programs sessions are implemented, in which the audio and video streams emerging from two different sources are merged. This can be avoid overlapping and silent broadcast time.

This figure shows the relationship of the Session layer to the transport layer and presentation layer,

Session Layer

Session Layer

Design Issues with Session Layer

  • Management of dialog control.
  • It allows machines to make sessions between them seamlessly.
  • Token management and Synchronization, such services also provided by the session layer.
  • Provide quality and intensified services to the user.

Functionalities of the Session Layer

Specific functionalities of the Session Layer are as follows:

1. Dialog Control

  • The session layer behaves as a dialog controller.
  • It allows two communication machines to enter into a dialog.
  • It permits to communicate in either half-duplex (one way at a time) or full-duplex (two ways at a time) mode of communication.
  • For Example, A dialog between a terminal connected to the mainframe can be half-duplex.

2. Synchronization

  • This layer permitted a process to add checkpoints which are referred to as synchronization points into the stream of data.
  • Example: If a system is sending a file of 2500 pages, It is advisable to add checkpoints after every 100 to ensures that a 100-page unit is successfully received and acknowledged independently.
  • In this case, if a crash happens during transmission of page number 824; then retransmission begins on page 801. There is no need to retransmit pages 1 to 800 pages.

3. Token Management

This layer is also responsible for managing tokens. Through this, it prevents the two users to simultaneously attempt access of the same critical operation.

Related Tutorials

  • IPV4 Addressing | Classful and Classless Addressing
  • Subnetting and Supernetting in Computer Network
  • Network Address Translation (NAT) in Computer Network
  • Fixed Length and Variable Length Subnet Mask (FLSM & VLSM)
  • Line Configuration in Computer Network
  • Transmission Modes in Computer Network
  • Data Link Layer: What It Is, Sublayers, Design Issues, Functions
  • Physical Layer: What It Is, Design Issues, Functions
  • Application Layer: What It Is, Design Issues, Functionalities, and Example
  • Presentation Layer: What It Is, Design Issues, Functionalities
  • Coaxial Cable in Computer Network
  • Optical Fiber (Fiber Optics) in Computer Network
  • Unguided Transmission Media in Computer Network
  • Virtual LAN (VLAN) in Computer Network
  • Virtual Storage Area Networking (VSAN)

Comments and Discussions!

Load comments ↻

  • Marketing MCQs
  • Blockchain MCQs
  • Artificial Intelligence MCQs
  • Data Analytics & Visualization MCQs
  • Python MCQs
  • C++ Programs
  • Python Programs
  • Java Programs
  • D.S. Programs
  • Golang Programs
  • C# Programs
  • JavaScript Examples
  • jQuery Examples
  • CSS Examples
  • C++ Tutorial
  • Python Tutorial
  • ML/AI Tutorial
  • MIS Tutorial
  • Software Engineering Tutorial
  • Scala Tutorial
  • Privacy policy
  • Certificates
  • Content Writers of the Month

Copyright © 2024 www.includehelp.com. All rights reserved.

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

How do the Application, Presentation and Session layers of the OSI model map to TCP/IP's Application Layer and vice versa?

I need to map TCP/IP protocols to the OSI model for some university test revision I am doing.

I was wondering if it is generally acceptable to assume any OSI Level 7, 6 and 5 protocol will be transferred directly into TCP/IP's Layer 4 (Application Layer).

Obviously with TCP/IP to OSI mapping, you have to use more common sense, such as MMS from TCP/IP Application would go to Presenation Layer.

Michael Morgan's user avatar

  • 2 not really a network engineering question... since it is applied theory, stackoverflow is probably a better home for the question –  Mike Pennington Commented Jun 5, 2013 at 16:28
  • 2 I don't feel it is off topic, as the theory behind networking should not be strictly off topic. –  YLearn Commented Jun 5, 2013 at 16:40
  • 1 @YLearn, the about page mentions "real problems". This is hardly qualifies as a real problem from a network engineering perspective. However, we routinely answer questions like this on Stack Overflow –  Mike Pennington Commented Jun 5, 2013 at 16:47
  • @MikePennington I know there are questions like this on SO, but I don't think SO is the place for this question, as is is strictly confined to the subject of networking, not programming in anyway. –  Baldrick Commented Jun 5, 2013 at 21:09
  • @javano, officially computer science questions belong on Stack Overflow ... this is best-described as a computer science question –  Mike Pennington Commented Jun 5, 2013 at 21:45

2 Answers 2

Yes. Both of the OSI and TCP/IP models are pretty old at this stage, and the TCP/IP model was created more specifically to "operate" with the IP protocol suite (the TCP/IP model slightly predates the OSI model). The OSI model was created by the ISO (International organization) and TCP/IP model was created by the U.S. and is maintained by the IETF. Even if TCP/IP didn't turn out to be the predominant protocol suite used on the Internet as we know it, with things like Moore's law and increasingly complex applications/protocols that can span multiple layers, the OSI model is becoming somewhat obsolete.

The reason why layers 7, 6 and 5 are all crammed into the Application layer in the TCP/IP model is that the folks that created the TCP/IP model believed that those responsibilities should be handled by the application itself, rather than within neatly laid out abstraction layers (thus helping to ease potential confusion that your question calls out).

John Jensen's user avatar

  • All I learned in school (early 1990s) was the OSI layer... I wonder if people are still being taught this? –  Mike Pennington Commented Jun 5, 2013 at 16:57
  • It wouldn't surprise me. I think it's kind of a conundrum in the sense that the OSI model is a better teaching tool because it tries to fit things into distinct separate layers of responsibility, whereas (IMO) the TCP/IP model does a better job of reflecting reality, but it may be harder for folks that are just learning networking to conceptualize. I graduated in the early 2000's and the OSI model was also given much much more preferential treatment than the TCP/IP model. –  John Jensen Commented Jun 5, 2013 at 17:02
  • @JohnJensen, actually, as I recall, the TCP/IP model actually predates the OSI model. While they can both trace their origins back into the 1970's, the TCP/IP four layer model goes back further to the DoD/DARPA model. –  YLearn Commented Jun 5, 2013 at 20:37
  • Sure, but I never said or meant to imply that the TCP/IP model was "newer" than the OSI model, just that the OSI model is becoming obsolete, and has been for decades; even if you take Moore's law out of it - there's still TCP/IP itself. I think if things were different and IP never became as ubiquitous as it is today, the OSI model would be more relevant, but that's just not the way things turned out. :-) I still don't debate the usefulness of it as a teaching tool however. –  John Jensen Commented Jun 5, 2013 at 22:51
  • Edited my original answer to be more clear and to make sure I'm not spreading misinformation re: either model's 'seniority'. :-) –  John Jensen Commented Jun 5, 2013 at 23:02

The OSI and TCP/IP are different models and everything doesn't always line up perfectly in practice. In going from OSI to TCP/IP, everything above TCP (OSI Layers 5-7) is considered the Application layer (TCP/IP Layer 4). From TCP/IP to OSI there can be a lot of disagreement over what falls into each of layers 5-7.

To add to the complication there are protocols which span multiple layers, for example, Ethernet is both layer 1 AND 2 in the OSI model.

Here is a nice visual .

Mike Marotta's user avatar

  • Of course Ethernet itself itself has a layered design. You have the frame formats (common across all ethernet variants and in some cases some of which are shared with other parts of 802), then you have medium access control (speed dependent but common across physical layers for the same speed), then the line coding (sometimes shared between different physical mediums, sometimes not) and finally the electrical or optical interface. –  Peter Green Commented Jul 28, 2016 at 17:07

Your Answer

Sign up or log in, post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .

Not the answer you're looking for? Browse other questions tagged ipv4 tcp or ask your own question .

  • The Overflow Blog
  • One of the best ways to get value for AI coding tools: generating tests
  • The world’s largest open-source business has plans for enhancing LLMs
  • Featured on Meta
  • User activation: Learnings and opportunities
  • Site maintenance - Mon, Sept 16 2024, 21:00 UTC to Tue, Sept 17 2024, 2:00...

Hot Network Questions

  • Tire schrader core replacement without deflation
  • How to expand argument in the Expl3 command \str_if_eq?
  • What is the rationale behind 32333 "Technic Pin Connector Block 1 x 5 x 3"?
  • How can I stop the noise from updating its position when I adjust the spline?
  • To whom or what did Jesus address Ephphatha?
  • What is the shortest viable hmac for non-critical applications?
  • Doesn't nonlocality follow from nonrealism in the EPR thought experiment and Bell tests?
  • Can I repeat link labels several times on a web page without hurting SEO by using meta attributes?
  • Why would the GPL be viral, while EUPL isn't, according to the EUPL authors?
  • How to apply a squared operator to a function?
  • Why is resonance such a widespread phenomenon?
  • What prevents indoor climbing gyms from making a v18 boulder even if one hasn't been found outside?
  • Is it feasible to create an online platform to effectively teach college-level math (abstract algebra, real analysis, etc.)?
  • Were the PS5 disk version console just regular digital version consoles with a pre-installed disk module?
  • A journal has published an AI-generated article under my name. What to do?
  • Time in Schwarzschild coordinates
  • Should I write an email to a Latino teacher working in the US in English or Spanish?
  • If Act A repeals another Act B, and Act A is repealed, what happens to the Act B?
  • Is a thing just a class with only one member?
  • What is a natural-sounding verb form for the word dorveille?
  • "Tail -f" on symlink that points to a file on another drive has interval stops, but not when tailing the original file
  • Are data in the real world "sampled" in the statistical sense?
  • Movie where a young director's student film gets made (badly) by a major studio
  • Why did early ASCII have ← and ↑ but not ↓ or →?

what is presentation and session layer

Logo

CCNA 200-301 v1.1

  • CCNA 200-301 Labs
  • CCNP 350-401 ENCOR
  • CCNP 350-401 ENCOR Labs
  • CCNP 300-410 ENARSI
  • CCIE Enterprise Infrastructure
  • Cisco Packet Tracer Lab Course
  • NRS II IRP Course
  • NRS II MPLS Course
  • NRS II Service Architecture
  • Nokia Configuration Course
  • Nokia SRC Program
  • JNCIA Junos
  • HCIA (HCNA)
  • HCIA Configuration Course
  • What is Huawei R&S Certification?
  • Huawei ICT Certifications
  • Python Course
  • IPv6 Course
  • IP Multicast Course
  • NRS I Configuration Course
  • Cisco Packet Tracer How To Guide
  • Online Courses
  • Udemy Courses
  • CCNA Flashcard Questions
  • Protocol Cheat Sheets
  • Subnetting Cheat Sheet
  • Linux Cheat Sheet
  • Python Cheat Sheet
  • CLI Commands Cheat Sheets
  • Miscellaneous Cheat Sheets
  • Cisco Packet Tracer Labs
  • Cisco GNS3 Labs
  • Huawei eNSP Labs
  • Nokia GNS3 Labs
  • Short Config Videos
  • Network Tools
  • IPCisco on Social Media
  • Network Engineer Interview Questions
  • Personality Interview Training
  • Sign In/Up | Members
  • Lost password
  • Sign In/Sign Up
  • ENROLL HERE

Logo

  • OSI Referance Model

osi-model-headers

Table of Contents

OSI Model and TCP/IP Model

Computer network communication are a little complex. To understand this communication, experts divides computer network communication into different layers. To do this division, there are two standard models. These models are OSI Model and TCP/IP Model . Both of these models has different layers. OSI Model has 7 layers and TCP/IP model has 4 or 5 layers. Here, we will focus on OSI model layers. 

As a beginner in networking, OSI Model and TCP/IP Model are very important to understand the network world. These two common standards has also been a classical question of a network engineer technical interviews . These questions are like: What are the layers of OSI Model ? How many Layers does TCP/IP Model has? What is the role of Data Link Layer?, Which devices works on Network Layer? Which protocols are there in Transport layer?  etc…

Now, let’s start with the details of OSI Model Layers . In another lesson, we will talk about TCP/IP Model and its layers detailly.

osi-model-osi-reference-model-ipcisco.com

What is OSI Referance Model?

OSI is the abbreviation of Open Systems Interconnection. OSI (Open Systems Interconnection) Model  is the first term that a network engineer learn in networking. It is generally the first lesson of almost all the certification courses. It is also generally always encountered especially at the technical job interviews of junior network engineers. But OSI Model is only a visionary concept. In real network operations, you will not think about this standard and its layers.

So, what is this Referance Model? What are these OSI Layers ? Below, you can find these layers orderly from starting at the bottom, from Layer 1, to Layer 7, to the top.

osi-model

  • Physical Layer (Layer 1)
  • Data-link Layer (Layer 2) 
  • Network Layer (Layer 3)
  • Transport Layer (Layer 4)
  • Session Layer (Layer 5)
  • Presentation Layer (Layer 6)
  • Application Layer (Layer 7)

As you can see, there are 7 layers in OSI Reference Model. The first four layers are the Lower Layers and the last three layers are Upper Layers . If we compare OSI (Open Systems Interconnection) and TCP/IP (Transmission Control Protocol/Internet Protocol) Models, Lowers layers of these models has some differences, but the application layer of TCP/IP model is similar to the upper layers od OSI model.

So, whats are the roles of each OSI Model Layer ? Lets talk about them one by one detailly

OSI Physical Layer (Layer 1) is the actual connectivity between the source and the destination. It is the layer in which the physical characteristic of the network is defined and bit flow transfer is done. These bits are determined with signals . These signals can be both analog and digital. Electrical signals are used for fixed connections and radio signals are used for wireless connections.

In other words, bit flow is done in this level, in other words meaningful 0 and 1 bits are transferred here. Basically, it is the layer in which bit streams are transferred over different media types. Network cabling , different types of cables and network connectors are on physical layer in OSI Model .  

As a simple and old network equipment, simple hubs works in physical layer  (layer 1). Because, there are not smart devices and on layer 1, there is no need for a smart device.

Below, you can find operation examples in Layer 1. The upper two are a little complex but the lower two can be a good examples:)

osi-layers-physical-layer-cabling-ipcisco

  • Data-link Layer (Layer 2)

OSI Data-link Layer (Layer 2)  is the medium provision Layer. It defines how data is formatted for the transmission over physical medium. Layer 2 provides, node-to node connectivity. It is also the layer of physical MAC addresses .

The most important devices work on layer 2 of OSI Model is Layer 2 switches . As a network engineer, a network technician or a network admin, you will work on these data-link layer devices too much.

Data Link Layer encapsulates the data by adding a layer 2 header and layer 2 trailer . The data after adding Layer 2 Header and layer 2 trailer is called “ frame ”. Layer 2 header contains source and destination  MAC Addresses . So, it is responsible to find the next destination in the network. For decapsulation, it also removes these header and trailer and sends the data to the upper network layer.

Data Link Layer provides Error-free transfer of different categories of data frames. It detects physical layer errors and corrects them.

Different network protocols and standards are used in the different layers of OSI model. You can think them as the groups of rules. According to these protocols and standards, network technologies are used and device configurations are done.

Ethernet is one of the most popular protocol in data link layer. Ethernet is the general name of the standard which is used in our home or office networks. It defines a lot of things like cable types, data speed etc.

There are other protocols and standards in data link layers. Some of them are: PPP, HDLC, FDDI, ATM, Frame Relay.

Data-link Layer has two sub-layers . These layers are:

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

The  MAC Sub Layer  controls how a computer on the network gains access to the data and permission to transmit it. And it carries the physical address of each device on the network.

The  Logical Link Control (LLC) responsible for managing frames to upper and lower layers, Flow control mechanism and Error checking.

osi-model-layers-ipcisco-layer-2

OSI Model Network Layer  is the layer of logical addressing. This layer decides the logical address of the destination with IP addresses. By doing this, it connects different networks that use different medias each other. These addresses can be IPv4 address or IPv6 address .

Network layer is also responsible for routing . With routing, it decides the path of the packets through the network. In other words, it defines the routers that the data will go through. This is one of the popular areas for network engineers :) So, routing protocols works on layer 3 (network layer).

A  Layer 3 Header  (IP Header for IP) is added to the data in this layer. After this addition, frame is called as “ packet ”. In this header also the next level protocol is mentioned. It can be any  transport layer protocol like,  TCP , UDP and SCTP .

Frame fragmentation is also done in this Layer. If a frame is longer than  MTU   (Maximum Transmission Unit) , then it is fragmented (divided to the little packets).

There are different protocols used in network layer of OSI. Some of these protocols are IPv4, IPv6, ICMP, IPSec, OSPF, BGP etc.

osi-model-layers-ipcisco-layer-3-network-layer

Transport Layer (Layer 4)  establishes, maintains and manages end to end secure connection. This layer allows multiple transports on same physical connection.

Transport layer is responsible for end-to-end Error Recovery and Flow Control . Transport Layer is also the Layer that QoS facilities also performed.

Different transport layer protocols are used in this layer. According to used Layer 4 protocol, Layer 4 Header is added to the packet in this Layer. After this the packet called “ segment ”.

There are two common Transport Layer Protocols. These Protocols are  UDP (User Datagram Protocol) and  TCP (Transmission Control Protocol) . There are also other  Transport Layer Protocols  like SCTP,  RSVP etc. But in CCNA, we will focus on TCP and UDP. We will explain the details of these protocols in the following lessons.

Below, you can find some of TCP layer 4 operations and transport layer protocols comparison.

tcp-windowing

Session Layer (Layer 5)  is the OSI layer, that responsible for session jobs between the end points. It provides session establishment, maintenance and termination. Logging is also done in this layer. One of the other main roles of this session layer is multiplexing transport layer services.

Session layer is mainly used by applications themselves. So, network engineers do not work on this layer. This is the job of application developers.

Log in to a computer for file transfer can be an example of session layer job.

osi-model-layers-ipcisco-layer-5-session-layer

Presentation Layer (Layer 6)  is the  Translator  of the network. There are many data formats in any network. This layer provides translation between different formats.

For example, image formats like jpeg, gif, voice formats like mp3 and video format like mp4 are all need different behaviors. Presentation layer converts this different data into a readable format.

Encryption and compression of the data are also done in presentation layer (layer 6) of OSI Model.

osi-model-layers-ipcisco-layer-6-presentation-layer

Application Layer (Layer 7)  is the closest layer to user. It is the interface between applications and the underlying Layers. It provides the provision of the communication between Applications. Application Layer let programs to reach different network resources.

Some of the  protocols  used in Application Layer are  Telnet, FTP , SMTP, HTTPS, SSL  etc. Different services work with these protocols. For example, the browser that you use internet, works with HTTP.  By the way, the application itself is not belong to this layer.

osi-model-layers-ipcisco-layer-7-application-layer

  • Network Devices

As you know in a network there are some common network devices like Hubs, Repeaters, Bridges, Switches and Routers. These devices operates in different Layers of OSI model. Lets check this devices and the Layers they are used.

osi-and-network-devices

Everything begins with the data at the Application Layer. Then through out the destination, in each Lower Layer, an additional Header is added to these Data. And at the Physical Layer, all these are send via 1s and 0s as voltages over the cables.

What are these Headers of OSI Model Layers and how effects the data?

  • At Transport Layer , Layer 4 Header is added. Here the name of “Data and Layer 4 Header” is “ Segment ”.
  • At Network Layer , Layer 3 Header is added. Here the name of “Data and Layer 3 Header” is “ Packet ”.
  • At Data-Link Layer , Layer 2 Header is added. Here the name of “Data and Layer 2 Header” is “ Frame ”.
  • At Physical Layer , all of them is translate to 1s and 0s as voltages.And these values are sent and received over different media types(cables).

OSI Model FAQ: Interview Questions For Entry Level Network Engineer

How many layers are there in osi reference model.

There are seven layer in OSI Reference Model.

What are the layers of OSI?

7 layers of OSI are given below:

On which layer of OSI we do network cabling, bits and volts?

Physical layer is responsible with cabling, bits and volts.

On which OSI layer, TCP and UDP works?

TCP and UDP are OSI transport layer protocols. They work at layer 4 of OSI model.

In which layer of OSI, routers works?

Routers works on layer 3, OSI model network layer.

In which OSI Reference Model layer, does a simple switch work?

Simple switches are also called layer 2 switches. They work at layer 2, data link layer of OSI.

What are the lower OSI Model layers?

Physical layer, data-link layer, network layer and transport layer are the lower layers of OSI Model.

What are the upper OSI Model layers ?

Session layer, presentation layer and application layer are the lower layers of OSI Model.

In which layer of Open Systems Interconnection Model, does FTP, HTTP, DNS works?

FTP, HTTP and DNS are application layer protocols. They work at application layer, layer 7.

In which layer of OSI Reference Model, Routing protocols work?

Routing protocols like OSPF, EIGRP, BGP works on layer 3, network layer.

what is presentation and session layer

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Network Fundamentals

  • Collision Domain vs Broadcast Domain
  • Coaxial Cable Details
  • Types of Networks
  • Top Internet Access Technologies
  • WAN Topology Types
  • Network Topology Architectures
  • Power Over Ethernet (PoE)
  • Ethernet Collisions and Troubleshooting
  • Cisco NGFW and Cisco NGIPS
  • Networking Connectors
  • Ping Command
  • Basic Cisco Router Configuration on Packet Tracer
  • ICMP (Internet Control Message Protocol)
  • Address Resolution Protocol (ARP)
  • Network Cabling
  • TCP/IP Model

IPv4 Addressing

  • Verify IP Parameters for Client OS
  • Wildcard Mask
  • VLSM Subnetting
  • IPv4 vs IPv6 Comparison
  • Cisco IP Address Configuration
  • APIPA Address
  • Private IP Address Ranges
  • Subnetting Examples
  • IP Addressing (IPv4)
  • IP Subnetting and Subnetting Examples

IPv6 Addressing

  • IPv6 Unique Local Address
  • IPv6 Global Unicast Address

TCP and UDP

  • TCP Header : Sequence & Acknowledgement Number
  • TCP Handshake
  • TCP versus UDP
  • UDP (User Datagram Protocol)
  • TCP (Transmission Control Protocol)
  • TCP Header : TCP Options
  • TCP Header : TCP Window Size, Checksum & Urgent Pointer
  • TCP Header : TCP Flags
  • Voice VLAN Configuration
  • Packet Tracer VLAN Example 2
  • How to Configure Cisco VLANs
  • VTP Configuration with Packet Tracer
  • VTP (VLAN Trunking Protocol)
  • DTP and VLAN Frame Tagging protocols ISL, dot1.q
  • Cisco Packet Tracer VLAN Configuration Example
  • VLAN Port Assignment and VLAN Port Types
  • VLANs (Virtual Local Area Networks)

Switching and LANs

  • Ethernet Basics
  • Layer 2 vs Layer 3 Switch
  • Cisco Switch Configuration on Cisco Packet Tracer
  • MAC Address Lookup
  • What is a mac address
  • Local Area Networks
  • Network Topologies
  • Hubs, Switches and Routers

Spanning Tree Protocol

  • Loop Guard, Uplink Fast, Backbone Fast and UDLD
  • Unidirectional Link Detection (UDLD)
  • BPDU (Bridge Data Unit Protocol)
  • STP Loop Guard
  • STP BPDU Filter
  • STP BPDU Guard
  • STP Root Guard
  • Portfast, Root Guard, BPDU Filter and BPDU Guard
  • PVST+ and Rapid PVST+
  • STP (Spanning Tree Protocol) Example on Packet Tracer
  • RSTP Configuration on Packet Tracer
  • STP Portfast Configuration with Packet Tracer
  • Spanning Tree Protocol Operation
  • Rapid Spanning Tree Protocol (RSTP)
  • Spanning Tree Protocol (STP)

Neighbor Discovery

  • LLDP Configuration on Cisco IOS
  • Neighbour Discovery Protocols
  • CDP Configuration with Packet Tracer

EtherChannels

  • PAgP Configuration on Cisco Devices
  • LACP Configuration on Cisco Devices
  • Link Aggregation Control Protocol (LACP)

Routing Fundamentals

  • Route Summarization
  • Link State vs Distance Vector Protocols
  • Routing Path Determination
  • Routing Table
  • Static Routes
  • IPv4 Floating Static Routes
  • Inter VLAN Routing Configuration on Packet Tracer
  • Switch Virtual Interface Configuration on Packet Tracer
  • Switch Virtual Interfaces
  • Inter VLAN Routing with Router on Stick
  • IP and Layer 3 Overview
  • Static Route Configuration on Cisco Routers
  • Dynamic Routing Protocols
  • OSPF Cost and SPF Algorithm
  • OSPFv3 Configuration Example on Cisco IOS
  • OSPFv3 (Open Shortest Path First Version 3)
  • Cisco Single Area OSPF Configuration
  • Other OSPF Key Points
  • OSPF Network Types
  • OSPF Area Types
  • OSPF LSA Types
  • OSPF Packet Types
  • OSPF Adjacency
  • OSPF(Open Shortest Path First) Overview

WAN (Wide Area Networks)

  • MLPPP Configuration on Cisco Packet Tracer
  • What is MLPPP?
  • Metro Ethernet Technology
  • WAN and WAN Technologies

DHCP and DNS

  • DNS Configuration on Cisco Routers
  • Domain Name System Overview
  • Router DHCP Configuration with Packet Tracer
  • DHCP IP Allocation Operation
  • DHCP (Dynamic Host Configuration Protocol)
  • NAT (Network Address Translation)
  • PAT Configuration with Packet Tracer
  • Dynamic NAT Configuration with Packet Tracer
  • Static NAT Configuration with Packet Tracer

First Hop Redundancy

  • HSRP Configuration on Cisco IOS
  • HSRP (Hot Standby Router Protocol)
  • First Hop Redundancy Protocols (FHRPs)

Network Management

  • Syslog Overview
  • Configuration Register
  • TFTP, FTP, SFTP and SCP
  • SSH Configuration on Packet Tracer
  • Syslog Configuration Cisco
  • Cisco NTP Configuration
  • NTP (Network Time Protocol)
  • SNMP Overview
  • SNMP Configuration On Cisco IOS
  • Cisco Router Password Recovery
  • IPv6 Floating Static Routes
  • IPv6 Static and Default Route Configuration
  • Stateless Address Auto Configuration
  • IPv6 NDP (Neighbour Discovery Protocol)
  • IPv6 Configuration on Cisco Packet Tracer
  • What does IPv6 bring?
  • Subnetting in IPv6
  • IPv6 Address Types
  • IPv4 and IPv6 Headers
  • IPv6 and IPv6 Addresses

Quality of Service

  • Network Traffic Types
  • Policing and Shaping in QoS
  • Classification and Marking in QoS
  • Quality of Service Overview
  • Radius Configuration for Wireless Users
  • Cisco RADIUS Server Configuration on Packet Tracer
  • TACACS+ Overview
  • RADIUS Overview
  • AAA Protocols : RADIUS and TACACS+
  • Authentication, Authorization, Accounting (AAA)
  • WLAN Frequency Bands
  • Other Wireless Network Extention Types
  • Wireless Principles
  • WLAN Components
  • Wireless Network Design Models
  • WLC Management Access Connections
  • Wireless Access Point Modes
  • Wireless Security Protocols
  • WLAN Configuration on Packet Tracer

Security Fundamentals

  • DHCP Snooping Configuration on Packet Tracer
  • Cisco Banner Configuration on Packet Tracer
  • What is DHCP Snooping?
  • Access Control Lists
  • Multifactor Authentication (MFA)
  • Dynamic ARP Inspection
  • Cyber Attacks, Network Attacks, Threats and Mitigation
  • 802.1x (Port Based Network Access Control)
  • Switch Port Security Configuration on Cisco Packet Tracer
  • Switch Port Security
  • Extended Access List Configuration With Packet Tracer
  • Standard Access List Configuration With Packet Tracer
  • Basic Cisco Router Security Configuration

Automation and Programmability

  • Ansible vs Puppet vs Chef
  • Generative AI vs Predictive AI
  • Chef Overview
  • Puppet Overview
  • Ansible Overview
  • Network Automation Tools
  • Interpret JSON Encoded Data
  • Cisco DNA Center
  • Cisco SD-Access
  • Data Serialization Languages: JSON, YAML, XML
  • Traditional Network Management versus Cisco DNA Center
  • Cisco DNA and Intent-Based Networking (IBN)
  • How Network Automation Impacts Network Management

SDN (Software Defined Networking)

  • What is SDN ?
  • Traditional Network Drawbacks Versus SDN
  • What Will SDN Bring?
  • SDN Architecture Components
  • SDN Terminology
  • Virtualization
  • Virtual Network Structure

Latest Lessons

  • Link State vs Distance Vector Protocols Part of: CCNA 200-301 v1.1
  • Unidirectional Link Detection (UDLD) Part of: CCNA 200-301 v1.1
  • Layer 2 vs Layer 3 Switch Part of: CCNA 200-301 v1.1
  • BPDU (Bridge Data Unit Protocol) Part of: CCNA 200-301 v1.1
  • STP Loop Guard Part of: CCNA 200-301 v1.1
  • STP BPDU Filter Part of: CCNA 200-301 v1.1
  • STP BPDU Guard Part of: CCNA 200-301 v1.1
  • STP Root Guard Part of: CCNA 200-301 v1.1
  • Generative AI vs Predictive AI Part of: CCNA 200-301 v1.1
  • IPv6 Global Unicast Address Part of: CCNA 200-301 v1.1
  • More Lessons

Latest Blog Posts

Cisco ccna v1.1 update, new lessons, Generative AI (Artificial Intelligence), Cloud Network Management and Machine Learning

WHAT YOU WILL FIND?

  • 250.000+ Students All Over The World
  • 8.000+ Questions & Answers
  • 100+ Lab Files & Cheat Sheets
  • 30+ IT/Network Courses
  • A Real Desire To Help You
  • Daily Social Media Shares
  • %100 Satisfaction
  • CISCO Courses
  • NOKIA Courses
  • HUAWEI Courses
  • JUNIPER Courses
  • PYTHON Course
  • KEY Courses
  • VIDEO Courses
  • UDEMY Courses
  • Cheat Sheets
  • Configuration Files
  • Interview Questions
  • IPCisco On Social Media
  • Pärnu mnt. 139c – 14, 11317, Tallinn, Estonia
  • [email protected]
  • +971 (5) 281 10952
  • info@networkwalks.com
  • Cisco & IT Courses
  • Cyber Security & Hacking Courses
  • Premium Membership

Network Walks Logo

Session Layer of OSI Model (Layer-5)

Session Layer of OSI Model

Session layer of OSI Model is designed to allow devices to establish and manage sessions so that multiple channels could be established between same terminals and hosts. Session Layer is the fifth layer in the 7-Layer OSI Model after Transport Layer. Session Layer is also called as ‘Port Layer’. The main function of Session Layer is to establish, maintain and synchronize the interaction between communicating systems and hosts like computers and servers. It allows information of different streams, originating from different sources, to be properly combined or synchronized.

OSI Model divides the network communication processes into seven layers in order to simplify it. Each layer performs specific functions to support the layers above it. This seven Layer model starts from Physical till Application Layer and Session Layer supports the Application and Presentation layers as shown in this figure:

Session Layer of OSI Model

Functions/Duties of Session Layer

Each Layer in OSI Model Performs some important duties. Important functions performed by Session Layer are listed here:

The boundaries between layers start to get blurred once we cross Transport Layer. It becomes hard to categorize what exactly belongs at layer 5/6/7. These some of the functions that are performed by Session Layer along with the support of other layers:

  • In the Session establishment phase, the service and the rules for communication between the two devices are proposed & agreed upon. For example, who transmits and when, how much data can be sent at a time etc.
  • Once the rules are established, the data transfer phase begins.
  • Finally, connection termination occurs when the session is complete, and communication ends gracefully.
  • Duplex Control: Session Layer also controls that whether both sender/receiver of a session will communicate at same time or one will speak & other will listen
  • Authentication (It is for Authentication b/w peer computers before the exchange happens e.g. simple username/password authentication
  • Authorization (It confirms what a user is authorized to perform).

Authentication is the process of verifying that “you are who you say you are”

Authorization is the process of verifying that “you are permitted to do what you are trying to do”.

Session Layer Protocols

The OSI Model provides a conceptual framework for communication between computers, but the model itself is not a method of communication. Actual communication is made possible by using communication protocols. Each layer on the OSI Model has some protocols associated with it. Some important protocols on Session layer are listed in below:

  • SIP (Session Initiation Protocol)
  • H.245 (Call Control Protocol for Multimedia Communications)
  • SMB (Server Message Block)
  • NFS (for Network File System)
  • PAP (Password Authentication Protocol)

Network Equipment/Components at Session Layer

  • Load Balancers

Session layer is the 5th Layer in OSI seven Layer Model & supports the two layers above it. It performs important functions like Sessions Management, Authentication, Authorization and Duplex Control. Important Protocols at Session Layer include SIP, PPTP, H.245, PPTP/L2TP, SMB, NFS and PAP. Equipment operating at Session Layer include Firewalls, Gateways, Load Balancers and Computers.

Now, test your knowledge on OSI Model using our free Quizzes & Cheat sheet resources for long term memory:

Networkwalks Summary Cheatsheets
Free Online Quizzes (Best for Cisco CCNA, Huawei HCNA, N+)

Follow our Facebook Page & YouTube Channel for more updated Cheatsheets & Quizzes :

' src=

Written by  Arman Hasen

guest

  • Trending Categories

Data Structure

  • Selected Reading
  • UPSC IAS Exams Notes
  • Developer's Best Practices
  • Questions and Answers
  • Effective Resume Writing
  • HR Interview Questions
  • Computer Glossary

The Session Layer of OSI Model

The session layer (layer 5) is responsible for establishing, managing, synchronizing and terminating sessions between end-user application processes.

The main functions of the session layer are as follows −

  • It works as a dialog controller. It allows the systems to communicate in either half-duplex or full-duplex mode of communication.
  • It is responsible for token management. Through this, it prevents the two users to simultaneously attempt the same critical operation.
  • It synchronizes communication. It adds synchronization points or checkpoints in data streams for long communications. This ensures that data streams up to the checkpoints are successfully received and acknowledged. In case of any failures, only the streams after the checkpoints have to be re-transmitted.

what is presentation and session layer

  • Related Articles
  • The Transport Layer of OSI Model
  • The Presentation Layer of OSI Model
  • The Data Link Layer of OSI Model
  • The OSI Reference Model
  • Explain the functions of Session Layer.
  • What is the session layer?
  • Advantages and Disadvantages of the OSI Model
  • Computer Networks – Layers of OSI Model
  • What is the OSI Reference Model?
  • OSI Model in Computer Networking
  • Why Does the OSI Reference Model Matter?
  • What are the critiques of OSI Model and Protocols?
  • Explain the advantages and disadvantages of the OSI reference Model
  • OSI vs. TCP/IP Reference Model
  • What is Session Layer in the Computer Network?

Kickstart Your Career

Get certified by completing the course

IMAGES

  1. What is the session layer OSI communications model?

    what is presentation and session layer

  2. PPT

    what is presentation and session layer

  3. PPT

    what is presentation and session layer

  4. The OSI Model Layers from Physical to Application

    what is presentation and session layer

  5. PPT

    what is presentation and session layer

  6. Session Layer and Presentation Layer

    what is presentation and session layer

VIDEO

  1. OSI model

  2. Protocols and Devices Used at various Levels of OSI Model

  3. Part 1.16

  4. Session, Presentation & Application Layer

  5. OSI model

  6. OSI Reference Model

COMMENTS

  1. Session Layer in OSI model

    Application Layer Presentation Layer Present Layer=> Session Layer Transport Layer Network Layer Data Layer Physical Layer. Working of Session Layer : Session Layer, which is the 5th layer in the OSI model, uses the services provided by The transport layer, enables applications to establish and maintain sessions and to synchronize the sessions. ...

  2. Presentation layer and Session layer of the OSI model

    The presentation layer is the sixth layer of the OSI Reference model. It defines how data and information is transmitted and presented to the user. It translates data and format code in such a way that it is correctly used by the application layer. It identifies the syntaxes that different applications use and formats data using those syntaxes.

  3. OSI model

    The session layer is meant to store states between two connections, like what we use cookies for when working with web programming. The presentation layer is meant to convert between different formats. This was simpler when the only format that was worried about was character encoding, ie ASCII and EBCDIC. When you consider all of the different ...

  4. The OSI Model

    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 ...

  5. What is the session layer OSI communications model?

    The session layer organizes this start and stop traffic into an overall session between the two endpoints with a specific start and end point. The session layer then gives the coherent data it collected to the presentation layer. The session layer, Layer 5 in the OSI communications model, is between the transport and the presentation layers.

  6. Functions of Session Layer

    The session layer, presentation layer and application layer are known as the software or upper layers of OSI model. Q.3: What is meant by session termination? Answer: Session termination is defined as a process of ending the session communication. This process of session termination is important because it releases the resources and makes sure ...

  7. Presentation layer

    The presentation layer ensures the information that the application layer of one system sends out is readable by the application layer of another system. On the sending system it is responsible for conversion to standard, transmittable formats. [7] On the receiving system it is responsible for the translation, formatting, and delivery of ...

  8. Session Layer

    OSI Layer 5 - Session Layer. In the seven-layer OSI model of computer networking, the session layer is layer 5. The session layer provides the mechanism for opening, closing and managing a session between end-user application processes, i.e., a semi-permanent dialogue. Communication sessions consist of requests and responses that occur between ...

  9. Layer 6 Presentation Layer

    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 ...

  10. Understanding the Purpose and Function of the Session Layer ...

    The purpose of the session layer is to establish, maintain, and terminate communication sessions between devices in a network. It synchronises communication between devices and manages data flow control, ensuring reliable communication between devices. Some protocols used at the session layer include SCTP (Stream Control Transmission Protocol ...

  11. OSI Model: Session, Presentation, and Application Layer (#5 ...

    Layer 5: Session layer Wikipedia defines a session as this. In computer science and networking in particular, a session is a time-delimited two-way link, a practical (relatively high) layer in the tcp/ip protocol enabling interactive expression and information exchange between two or more communication devices or ends — be they computers ...

  12. A Guide to the Session Layer

    The session layer is the fifth layer of the OSI (Open Systems Interconnection) Model. It's also called the network dialogue controller. It relies on the layers above and below it - the presentation layer and transport layer - to carry out its function. Layer 5's main task is to start requests and responses of dialogues within communication systems.

  13. Presentation Layer in OSI model

    Introduction : Presentation Layer is the 6th layer in the Open System Interconnection (OSI) model. This layer is also known as Translation layer, as this layer serves as a data translator for the network. The data which this layer receives from the Application Layer is extracted and manipulated here as per the required format to transmit over ...

  14. What is the session layer?

    The session layer is also known as the communication management layer. It is the fifth of seven layers in the OSI model. This conceptual model was developed in the 1970s to create a standard for communication between different devices and systems within a network. All seven layers have their own tasks and are built upon each other.

  15. The Session Layer: Understanding layer 5 of the OSI Model

    Of the seven layers of the OSI Model, layers 5 and 6, the session and presentation layers, are the two least relevant layers for network engineers.

  16. Session layer

    1. Physical layer. In the seven-layer OSI model of computer networking, the session layer is layer 5. The session layer provides the mechanism for opening, closing and managing a session between end-user application processes, i.e., a semi-permanent dialogue. Communication sessions consist of requests and responses that occur between applications.

  17. Session Layer in OSI Model

    The session layer is Layer 5 layer from the bottom in the OSI model. The job of the session layer is to control and maintain connections between systems to share data. It establishes, maintains, and ends sessions across all channels. In case of a network error, it checks the authenticity and provides recovery options for active sessions.

  18. What is OSI Model?

    Presentation Layer: Data is formatted and encrypted. Session Layer: Connections are established and managed. ... The Session Layer is the 5th layer in the Open System Interconnection (OSI) model. This layer allows users on different machines to establish active communications sessions between them. It is responsible for establishing ...

  19. Session Layer: What It Is, Design Issues, Functionalities

    Specific functionalities of the Session Layer are as follows: 1. Dialog Control. The session layer behaves as a dialog controller. It allows two communication machines to enter into a dialog. It permits to communicate in either half-duplex (one way at a time) or full-duplex (two ways at a time) mode of communication.

  20. How do the Application, Presentation and Session layers of the OSI

    In going from OSI to TCP/IP, everything above TCP (OSI Layers 5-7) is considered the Application layer (TCP/IP Layer 4). From TCP/IP to OSI there can be a lot of disagreement over what falls into each of layers 5-7. To add to the complication there are protocols which span multiple layers, for example, Ethernet is both layer 1 AND 2 in the OSI ...

  21. What is OSI Model?

    Session Layer (Layer 5) is the OSI layer, that responsible for session jobs between the end points. It provides session establishment, maintenance and termination. ... Session layer, presentation layer and application layer are the lower layers of OSI Model. In which layer of Open Systems Interconnection Model, does FTP, HTTP, DNS works?

  22. Session Layer of OSI Model (Layer-5)

    Session layer of OSI Model is designed to allow devices to establish and manage sessions so that multiple channels could be established between same terminals and hosts. Session Layer is the fifth layer in the 7-Layer OSI Model after Transport Layer. Session Layer is also called as 'Port Layer'. The main function of Session Layer is to establish, maintain and synchronize the interaction ...

  23. The Session Layer of OSI Model

    Advertisements. The Session Layer of OSI Model - The session layer (layer 5) is responsible for establishing, managing, synchronizing and terminating sessions between end-user application processes.The main functions of the session layer are as follows −It works as a dialog controller. It allows the systems to communicate in either half-duplex o.

  24. ELI5: What's the point of the presentation and session layers ...

    The problem is that the presentation layer is usually referred to as the location where we prepare the request (let's say an http one) by encrypting it among other things which is really ambiguous beyond any tangible utility. ... So to answer your question, the point of the presentation and session layers is to show that those processes should ...