Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

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

like image 577
Adam Davis Avatar asked Sep 30 '08 12:09

Adam Davis


2 Answers

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.

like image 135
Antonio Haley Avatar answered Oct 07 '22 04:10

Antonio Haley


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.

like image 24
Vasil Avatar answered Oct 07 '22 02:10

Vasil