Search code examples
httpnetwork-programmingtcprouterosi

Who is responsible for the Presentation and Session layers in OSI?


I am learning about the 7 layers of OSI. But I am currently stuck trying to understand these bottom two layers. Specifically - who performs the actions in these layers? They are called software layers but does the browser itself do all of these and how? Or the browser passes it on to a different program? How does it work?

So for example, I type in my browser google.com then the browser will establish a connection and send GET / HTTP/1.1 to the server. But how exactly each of these layers come into play?

Here is my understanding so far.

7. Layer - Application layer (Browser, HTTP)
6. Layer - Presentation layer (??)
5. Layer - Session layer (??)
4. Layer - Transport layer (Operating System)
3. Layer - Network layer (Routers)
2. Layer - Data link layer (Switches and bridges)
1. Layer - Physical layer (Modem and cables)

Solution

  • In practice, the TCP/IP model is mostly used and all the three top layers (i.e. Application, presentation, and session) are managed by the application. TCP/IP vs OSI

    In the case of the web browser, the browser is going to:

    • Session layer: maintain a session token for each session.
    • Presentation layer: parse all data based on the encoding in the http header of each response from the server (e.g. Content-Type: image/png or Content-Type: text/html;charset=utf-8)
    • Application layer: Present the page and interact with the user as it is implemented to do.