The Student Room Group

OSI Model

Hi friends.

I'm not stuck but im having trouble understanding something about the OSI Model. Oh and for anyone who is stuck on remembering the layers within the OSI Model a handy little phase is "All People Seem To Need Data Processing".

As you see each letter at the start of each word stands for a layer "Application, Presentation, Session, Transport, Network, Data Link and Pysical".

Anyway my problem is this. When you type in www.google.com into your browser does the request go through the layers before it gets sent to google? If its using TCP (which i would) is the request sent before the request goes through the model or is it sent after it reaches the phsical layer?

I understand there is a request that requires a response before any page request is sent to the server. Is the first request sent first and if the server responds with "send me your initial request" the request goes through the layers? When it finishes on the last layer the request is shipped to google servers and you request goes through the layers again but on the google server?

Thanks
Reply 1
I'm not really following your question. I might be able to help if you explain it in a different way (I did a CCNA course a while ago, although I think my cert must be out of date by now).
Im studying for my CCENT exam, lol. Thats why i need bit of help.

I think i have it. Anyway.
Reply 3
Oh I see they've split the CCNA. I did the one exam rather than the two separately.
Yeah i know. I got a DVD from CBT Nuggets and the guy mentions how they have split it up. How much did you pay to do your exam back then?
Reply 5
The Internet doesn't use the OSI model, it uses the TCP/IP model, so no it wouldn't go through all the layers :smile:

Here's how the two compare to each other:



Generally what'll happen is something like your packet will be of type HTTP (Application layer), of type TCP on port 80 (Transport layer) with Google's IP address (Internet layer). This'll leave your PC using either Ethernet or 802.11g or something similar (the host-to-network layer) and will probably stay as Ethernet travelling through the network, with routers along the way analysing the IP address (layer 3/Internet layer) deciding where to route it too, and probably changing the host-to-network layer (MAC addresses, etc). When it reaches the target machine, it'll look at the Transport layer and hand it over to the service listening on TCP port 80, and then that service will deal with the Application layer.

To answer your question more succintly, yes, any packet must go through all the layers. If you think about it logically, then the only way for anything to get out is to go all the way through to the bottom layer, so you can't ask for permission to send a request without sending a packet containing that request to ask for permission to send a request :smile:

Hope that helps.
Reply 6
cascadingstylez
Yeah i know. I got a DVD from CBT Nuggets and the guy mentions how they have split it up. How much did you pay to do your exam back then?

I think it was about £90. Something like that.

laser
The Internet doesn't use the OSI model, it uses the TCP/IP model, so no it wouldn't go through all the layers :smile:

I don't think it's really accurate to say it doesn't use the OSI model. The two models are just two different ways of thinking about networks. In some contexts it's not really important to distinguish between the functions of the application and presentation layer, so they are treated as one entity. However in some contexts that distinction is important. I think the OSI model applies to the Internet just as much as any other network, it's just that many protocols used on the internet cover more than one layer (TCP for example covers both the transport and session layers because it both initiates and controls the flow of data between the two end points).
cascadingstylez
Anyway my problem is this. When you type in www.google.com into your browser does the request go through the layers before it gets sent to google? If its using TCP (which i would) is the request sent before the request goes through the model or is it sent after it reaches the phsical layer?

I understand there is a request that requires a response before any page request is sent to the server. Is the first request sent first and if the server responds with "send me your initial request" the request goes through the layers? When it finishes on the last layer the request is shipped to google servers and you request goes through the layers again but on the google server?

You're confusing two issues here, by the sounds of it - how does a single HTTP request work through the layers, and how does the HTTP protocol itself work in terms of requests and responses?

I'll answer the first question. Basically, each layer "uses" the layer below it to achieve all the things it doesn't care about.

1. HTTP decides it wants to send a request to google.com. (Actually, DNS gets involved first to figure out what google.com actually maps to, but let's gloss over that.) It creates a GET message, which the HTTP layer on Google's server will understand. It passes this message down to the TCP stack, and asks it to send the message to 64.233.187.99.

2. TCP handles issues like making sure data is sent in the correct order, retransmitting lost packets, handling flow & congestion control etc. At first, TCP might decide it needs to establish a connection with 64.233.187.99, so it'll hold on to the HTTP message for a minute and first send a TCP SYN packet - let's gloss over that too, and assume we can just go ahead and send the message. The TCP stack doesn't understand the message itself, but wraps it up in some TCP-specific stuff (e.g. sequence number, checksum etc), and passes it down to the IP stack for routing to 64.233.187.99.

3. IP is responsible for routing the message, i.e. figuring out which computer to send it to next so that it gets to the destination. It doesn't understand the HTTP or the TCP stuff, and has no concept of a connection - just some data that it has to pass to 64.233.187.99. It decides, by some magic, that the packet needs to go via Ethernet to MAC address 13:57:9B:24:68:AC, so it wraps the TCP packet in some IP-specific stuff (e.g. DSCP, flags) and passes it down to Ethernet for transmission to 13:57:9B:24:68:AC. It might also decide that the message is too big for one packet, and needs to be split up - its partner at the other end will put everything back together. (IP isn't the only layer which might do this.)

4. Ethernet is responsible for transmitting the message physically from one computer to the next. It doesn't understand any of the HTTP, TCP or IP data it's transmitting, but it builds Ethernet frames to contain the data, and sends it out over the wire. (See http://en.wikipedia.org/wiki/Image:u:DP_encapsulation.svg, except replace UDP with TCP.)

5. The receiving computer's Ethernet driver notices this message addressed to it and picks it up. It discovers that it's an IP packet, and passes it up to the IP stack.

6. The IP stack realises that this packet isn't addressed to this computer and needs to be routed on. It figures out the MAC address of the next hop, and sends it back down to Ethernet for retransmission. (Assuming we're still using Ethernet!)

Repeat 4, 5 and 6 for a while, until eventually the request reaches Google.

7. The IP stack on the Google server decides this packet was intended for it, and opens it up to find it's a TCP packet. It passes that up to TCP.

8. TCP makes sure it's happy that there's an established connection, that this packet has the correct sequence number, and so forth. Then it figures out that there's HTTP data inside, and passes it up to HTTP.

9. Hurrah - the GET has finally arrived at Google. The HTTP stack on your computer and on Google's server can think of themselves as talking directly to each other, by using the layers below them to "handle the details". Now it can send a response - everything here is repeated!

A bit simplified (e.g. we've ignored DCP, routing, ARP...) but hopefully that gives you an idea of the basics.

Latest

Trending

Trending