Role of OSI layers when we open a url in browser?

15,426

Solution 1

Don't think about opening a URL in terms of OSI layers; They are two different things. Furthermore, the OSI model is outdated and not really used in practice; it's more of a teaching tool.

When you open a URL in a browser, there are many things that happen, but in particular there are a number of network requests that are made. Each one of these network requests involves the OSI model.

Let's take a look at the network request "Fetch the home page of google.com" (assuming we already have DNS information) in terms of OSI layers and how it's broken down in practice:

7, 6, 5. The Web browser creates the request (GET / HTTP/1.1) and tells the networking stack to send it to google.com
4, 3. The TCP/IP stack breaks the request up into packets (if necessary), and sends them out over the data link. It resends packets as necessary and manages the rate at which packets are sent. This is essentially the operating system.
2. The data link wraps each packet into a network frame, and sends it over the physical link to the next switch or router that the computer is connected to. This is essentially the network card.
1. The physical link is the wire and electrical signals that actually transmit the data.

As you can see, in practice there is more of a 4-layer model. The OSI layers that I've grouped together are very difficult to distinguish in practice, aren't always there, or are in different orders depending on what you're talking about.

Solution 2

First, understand the OSI is mostly reference and is not strictly followed, especially layers 5 (Session) through 7 (Application), things layer 5 and above are not really distinguished too well in practice.

TCP lives at Layer 4 (Transport).

IP one layer beneath that (Layer 3, Network).

Even then, you have some protocols like ICMP and MPLS which don't fit neatly into specific layers in the model.

Basically, your application is at the top, and things trickle down from Layer 7 until they get to Layer 1, which is the signaling hardware in your Ethernet controller or equivalent. The reverse when your network hardware receives communications on the physical medium.

The point of having layers is that each layer doesn't really need to be too concerned with the details of the other layers, as long as the other layers are doing their job. So your web browser doesn't really need to be understand how TCP works, or what network controller you are using or how it talks on the medium. Conversely, your network hardware doesn't need to know what applications you are going to use it for.

Solution 3

OSI is not a standard which is used anymore, it is primarily used as a teaching tool even though it is not accurate to how networking actually works. TCP/IP is the standard used for the whole process today.

Here's a guide which explains how you establish the initial connection to a webserver, it's called the 3-way handshake: http://support.microsoft.com/kb/172983

Share:
15,426

Related videos on Youtube

user2715898
Author by

user2715898

Updated on September 18, 2022

Comments

  • user2715898
    user2715898 over 1 year

    I have searched on this topic a lot but I am not able to understand how and where OSI layers (Application, Presentation, Session, Transport, Network, Datalink, Physical) come into picture in the whole process of opening a webpage in browser. I have read this - https://stackoverflow.com/questions/2092527/what-happens-when-you-type-in-a-url-in-browser?lq=1 and I know all the functions of all the layers that are there in OSI model. Also, do we use OSI model or TCP/IP in the whole process?

    Basically I am having problem linking all the things together. And please forgive me if there are resources out there that explain this concept. You can definitely point to them.

  • user2715898
    user2715898 over 9 years
    Thank you so much. This was the explanation I was looking for.