-2

I would like to understand what happens when we type "google.com" in our browser wrt OSI model. What all protocols comes into picture AT EACH LAYER any how does they know which one to be used?

  1. Also I would like to know, TCP/UDP which one to be used in Transport layer is decided for network/application? That is for a normal web page like google.com TCP must be used but for video streaming UDP. how is this conveyed to network?

  2. Is the browser also part of this as it is helping. Should it also come under application layer?

  3. Http comes under Application layer of OSI model. now for this particular example, what will come under Presentation and Session layers? Will the sessions be maintained in session layer or HTTP will be doing it on their behalf?

Mike Pennington
  • 41,899
  • 19
  • 136
  • 174
learner
  • 1,095
  • 2
  • 18
  • 41
  • 2
    You are asking for a quarter of a networking course. – cnicutar May 08 '11 at 11:42
  • Hi Cnicutar, I have some confusion wrt to these things. Would be great for me, if u can clarify some part of it. Thanks – learner May 08 '11 at 12:10
  • 1
    OSI doesn't necessarily conform to the real world; trying to bash everything into its form is an academic and largely pointless exercise. – bobince May 08 '11 at 12:58
  • HTTP comes under 'application layer' of the *TCP/IP* model. TCP/IP has nothing to do with OSI. It's unfortunate that you wasted time at university learning the OSI model. It doesn't apply to anything in the real world. – user207421 Dec 20 '16 at 01:26

2 Answers2

2

It sounds like you would like a tutorial on TCP/IP. May I suggest a couple of good books

URLs in webpages have a prefix that tells the applications what to do with that link. For instance, ftp:// opens an ftp session, which uses tcp (ref RFC 959 - File Transfer Protocol). As a general rule, the URL prefixes correspond to a standardized protocol, which was specified via RFC. The RFC denotes which transport protocol is used.

EDIT

In the case of youtube, their videos have a http:// URL prefix, but after you make the request, it is redirected to a rtsp:// URL. RTSP can be streamed over UDP.

To answer questions like this, you may find that wireshark is very useful to investigate these things... keep in mind that wireshark works best on wired connections.

Community
  • 1
  • 1
Mike Pennington
  • 41,899
  • 19
  • 136
  • 174
  • Thanks Mike for the response, but what happens in case of YouTube? We all know live streaming uses UDP. How does in that case it gets the message that now its the time for UDP transfer and not TCP? – learner May 08 '11 at 12:07
  • That solves one of my doubt. Thanks Mike. Another thing I would like to clarify ie, Http comes under Application layer of OSI model. now for this particular example, what will come under Presentation and Session layers? Will the sessions be maintained in session layer or HTTP will be doing it on their behalf? – learner May 08 '11 at 12:22
0

Applications don't use any layer of the OSI protocol stack. They use TCP or UDP from the TCP/IP stack, and they 'know which' because of they are programmed to use one or the other or both. The OSI model is obsolete and certainly doesn't apply to TCP/IP.

EDIT: The OSI layer model is a Procrustean bed into which TCP/IP does not fit. You should forget about OSI immediately. It doesn't describe anything in the real world.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • Huh? L1=100baseT, L2=Ethernet, L3=IP, L4=TCP, L5=Sockets, L6=SSL; L7=webserver. A client program typically connects (possibly through an SSL library) to L5/socket, specifies TCP in the socket type, and IP in the sockaddr. IP chooses Ethernet if that's where the routing table points and Ethernet knows what type of wire is attached. – Brian White May 31 '11 at 15:21
  • @Brian White TCP has its own reference model that doesn't agree with that. I can't agree that Sockets is a session layer unless TCP is as well: in fact I can't agree that Sockets is a layer at all. It's just an API that presents the TCP primitives more or less as defined in the RFC. I also can't agree that SSL is a presentation layer, or a layer at all really, as it is provided by the application. Nobody ever knew what was in the OSI presentation layer actually. – user207421 May 31 '11 at 22:55
  • 1
    @EJP Layer-6 is usually described as some sort of translation. Though I've never seen anything official define SSL as layer-6 but it does fit quite nicely so made a good example; Wikipedia (http://en.wikipedia.org/wiki/OSI_model) agrees, for what it's worth. TCP/IP may not be officially OSI but it's very close. – Brian White Jun 01 '11 at 09:22
  • @Brian White Wikipedia gives SSL as one example, not as the canonical answer. And it doesn't agree with you about sockets. You can't have it both ways. You still have nothing credible in layer 5, or 6 either if SSL/MIME/XDR/ASN.1 aren't present. I don't get my CS from Wikpedia actually ;-) Plenty of authors e.g. Tanenbaum take my position, that TCP/IP isn't 'very close' to OSI at all. – user207421 Jun 01 '11 at 11:15
  • 1
    @EJP Actually, it does list "sockets" under layer-5, but it's an example and I agree it's not canonical. I'd never referenced it before writing that last comment. I got my "CS" from writing a complete TCP/IP network stack (including Ethernet, PPP, SSL, and several applications) from scratch for an embedded device. – Brian White Jun 01 '11 at 14:20
  • @Brian White Cerf and Kahn first described a TCP/IP reference model in 1974, many years before OSI. Specifically to this conversation, the TCP model doesn't have a session or presentation layer. It doesn't distinguish physical from datalink either. Tanenbaum, *Computer Networks,* pp 38ff, describes numerous philosophical and practical differences between that and OSI. He also gives a lengthy critique of both ;-) – user207421 Jun 02 '11 at 00:51