应用程序如何知道要使用哪个 OSI 协议?
我想了解当我们在浏览器中输入 OSI 模型的“google.com”时会发生什么。每层都有哪些协议,它们如何知道要使用哪一个?
我还想知道,传输层使用TCP/UDP哪一种是由网络/应用程序决定的?对于像 google.com 这样的普通网页,必须使用 TCP,但对于视频流则必须使用 UDP。这是如何传达到网络的?
浏览器也是其中的一部分吗,因为它正在提供帮助。它也应该属于应用层吗?
Http 属于 OSI 模型的应用层。现在对于这个特定的例子,演示层和会话层下有什么?会话将在会话层中维护还是 HTTP 将代表会话进行维护?
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?
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?
Is the browser also part of this as it is helping. Should it also come under application layer?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来您想要有关 TCP/IP 的教程。我可以建议几本好书
网页中的 URL 有前缀它告诉应用程序如何处理该链接。例如,
ftp://
打开一个使用 tcp 的 ftp 会话(参考 RFC 959 - 文件传输协议)。作为一般规则,URL 前缀对应于通过 RFC 指定的标准化协议。 RFC 表示使用哪种传输协议。编辑
对于 youtube,他们的视频有一个
http://
网址前缀,但在您发出请求后,它会重定向到rtsp://
URL。 RTSP 可以通过 UDP 进行流传输 。要回答这样的问题,您可能会发现 wireshark 对于调查这些事情非常有用......保留请注意,wireshark 在有线连接上效果最好。
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 artsp://
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.
应用程序不使用 OSI 协议栈的任何层。它们使用 TCP/IP 堆栈中的 TCP 或 UDP,并且它们“知道哪一个”,因为它们被编程为使用其中之一或另一个或两者。 OSI 模型已经过时,并且当然不适用于 TCP/IP。
编辑: OSI 层模型是 TCP/IP 不适合的 Procrustean 床。您应该立即忘记 OSI。它没有描述现实世界中的任何事物。
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.