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

7

16

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.

So:

  • 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

Retroflex answered 30/9, 2008 at 12:47 Comment(0)
R
19

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.

Reiser answered 30/9, 2008 at 12:53 Comment(0)
L
9

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.

Longdistance answered 30/9, 2008 at 12:50 Comment(0)
I
6

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.

Investigation answered 30/9, 2008 at 13:48 Comment(0)
F
4

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.

Figurant answered 30/9, 2008 at 13:52 Comment(0)
M
1

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.

Merino answered 23/10, 2008 at 22:40 Comment(0)
Z
1

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.

Source

Zither answered 18/8, 2019 at 13:28 Comment(0)
S
0

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.

Simper answered 17/12, 2016 at 15:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.