4

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)
Liga
  • 3,291
  • 5
  • 34
  • 59
  • 2
    Nothing in the real world follows the OSI model, it is just a model. The IP Services model is much closer to what really happens, but there are protocols that simply do not fit that model either. Models are just models, and nothing forces anything to follow them. They are useful as concepts, but do not try to force anything into the model if it does not already fit. – Ron Maupin Nov 24 '19 at 16:56
  • @RonMaupin thank for that explanation. I suppose then that the browser also does the Presentation and the Session layer – Liga Nov 24 '19 at 17:31
  • 1
    You are trying to force a browser into the model, but please do not do that. An application is an application. The IP Services model, on which most OSes were at least loosely designed, does not have those layers (above the transport layer is the application). – Ron Maupin Nov 24 '19 at 17:37
  • @RonMaupin oh... that makes even more sense. The whole OSI model then is very confusing. So the browser then works directly with the Transport layer. – Liga Nov 24 '19 at 17:44
  • 1
    Yes, that is correct. An application will ask TCP to assign it a port to use. The application directly uses the transport protocol. – Ron Maupin Nov 24 '19 at 17:46

1 Answers1

3

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.
alshaboti
  • 643
  • 8
  • 18
  • Session layer can be also considered as part of TCP layer if TCP protocol is used as it maintains a session/connection. TCP established a session using the three-way handshake then maintains this session using `the sequence number` and `keep-alive`. – alshaboti Nov 24 '19 at 22:17
  • 1
    Not really. Sessions outlive connections in most protocols that have them, e.g. HTTP, TLS. – user207421 Oct 21 '20 at 00:39