<html xmlns="http://www.w3.org/1999/xhtml"><head><meta charset="utf-8"><meta name="generator" content="pdf2htmlEX"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><link rel="stylesheet" href="https://csdnimg.cn/release/download_crawler_static/css/base.min.css"><link rel="stylesheet" href="https://csdnimg.cn/release/download_crawler_static/css/fancy.min.css"><link rel="stylesheet" href="https://csdnimg.cn/release/download_crawler_static/10738201/raw.css"><script src="https://csdnimg.cn/release/download_crawler_static/js/compatibility.min.js"></script><script src="https://csdnimg.cn/release/download_crawler_static/js/pdf2htmlEX.min.js"></script><script>try{pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({});}catch(e){}</script><title></title></head><body><div id="sidebar" style="display: none"><div id="outline"></div></div><div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://csdnimg.cn/release/download_crawler_static/10738201/bg1.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">1</div></div><div class="pi" data-data='{"ctm":[1.777778,0.000000,0.000000,1.777778,0.000000,0.000000]}'></div></div></body></html>
<div id="pf2" class="pf w0 h0" data-page-no="2"><div class="pc pc2 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://csdnimg.cn/release/download_crawler_static/10738201/bg2.jpg"><div class="t m0 x2 h3 y2 ff2 fs0 fc0 sc0 ls0 ws0">许多人认为,OSI参考模型所描述的架构是在计算时代的初始阶段形成的,并且</div><div class="t m0 x2 h3 y3 ff2 fs0 fc0 sc0 ls0 ws0">有助于提供许多(如果不是全部)网络互联技术指导。但是,这是不正确的观点。</div><div class="t m0 x2 h3 y4 ff2 fs0 fc0 sc0 ls0 ws0">事实上,OSI参考模型在1984年左右引入,而此时互联网的基础已经发展和实</div><div class="t m0 x2 h3 y5 ff2 fs0 fc0 sc0 ls0 ws0">现,基本的互联网协议已经使用很多年。传输控制协议/网际协议</div><div class="t m0 x2 h3 y6 ff2 fs0 fc0 sc0 ls0 ws0">(T<span class="_ _0"></span>ransmission Control Protocol/Internet Pr<span class="_ _1"></span>otocol,T<span class="_ _2"></span>CP/IP)族实际上具有它</div><div class="t m0 x2 h3 y7 ff2 fs0 fc0 sc0 ls0 ws0">们自己的模型,今天我们学习和理解网络互联问题时还经常使用这些模型。</div><div class="t m0 x2 h3 y8 ff2 fs0 fc0 sc0 ls0 ws0">正如ISO标准7498-1所述,OSI<span class="_ _3"></span>参考模型提供了供应商、工程师、开发人员和其</div><div class="t m0 x2 h3 y9 ff2 fs0 fc0 sc0 ls0 ws0">他人使用的重要指南。这种模型将网络互联任务、协议和服务分为不同的层。</div><div class="t m0 x2 h3 ya ff2 fs0 fc0 sc0 ls0 ws0">当两台计算机通过网络通信时,每一层都具有自己的职责。每一层都有特定的</div><div class="t m0 x2 h3 yb ff2 fs0 fc0 sc0 ls0 ws0">功能,并且由那一层内工作的服务和协议来实现。</div><div class="t m0 x2 h3 yc ff2 fs0 fc0 sc0 ls0 ws0">OSI模型的目的是帮助其他人开发出能在开放网络架构内工作的产品。开放网络</div><div class="t m0 x2 h3 yd ff2 fs0 fc0 sc0 ls0 ws0">架构不为任何供应商所专有,而且能够很容易地集成不同的技术并提供这些技</div><div class="t m0 x2 h3 ye ff2 fs0 fc0 sc0 ls0 ws0">术的实现。供应商将OSI模型当成跳板,以开发出他们自己的网络互联框架。这</div><div class="t m0 x2 h3 yf ff2 fs0 fc0 sc0 ls0 ws0">些供应商以OSI模型为蓝本,并且开发他们自己的协议和服务,以实现与其他供</div><div class="t m0 x2 h3 y10 ff2 fs0 fc0 sc0 ls0 ws0">应商不同或重复的功能。然而,由于这些供应商以OSI为起点,因此与不同供应</div><div class="t m0 x2 h3 y11 ff2 fs0 fc0 sc0 ls0 ws0">商各自为政开始设计网络互联框架相比,集成不同供应商的产品要容易得多,</div><div class="t m0 x2 h3 y12 ff2 fs0 fc0 sc0 ls0 ws0">互操作性问题也不会很严重。</div><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">2</div></div><div class="pi" data-data='{"ctm":[1.777778,0.000000,0.000000,1.777778,0.000000,0.000000]}'></div></div>
<div id="pf3" class="pf w0 h0" data-page-no="3"><div class="pc pc3 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://csdnimg.cn/release/download_crawler_static/10738201/bg3.jpg"><div class="t m0 x2 h3 y2 ff2 fs0 fc0 sc0 ls0 ws0">网络协议是决定系统如何在网络中通信的规则标准集。尽管本身有所不同,然</div><div class="t m0 x2 h3 y3 ff2 fs0 fc0 sc0 ls0 ws0">而两个不同系统之所以能够相互通信和理解,其原因在于它们使用了相同的协</div><div class="t m0 x2 h3 y4 ff2 fs0 fc0 sc0 ls0 ws0">议。这类似于两个人使用相同的语言就能相互交流和理解。</div><div class="t m0 x2 h3 y5 ff2 fs0 fc0 sc0 ls0 ws0">每一层上的协议都具有特定的职责、所执行的控制功能以及所期望的数据格式</div><div class="t m0 x2 h3 y6 ff2 fs0 fc0 sc0 ls0 ws0">语法。每一层都有一个特殊的接口(连接点),以允许它与其他3个层交互:</div><div class="t m0 x2 h3 y7 ff2 fs0 fc0 sc0 ls0 ws0">(1)与上一层的接口通信;(2)与下一层的接口通信;(3)与目标包地址接</div><div class="t m0 x2 h3 y8 ff2 fs0 fc0 sc0 ls0 ws0">口中的相同层通信。控制功能的形式为数据包的首部和尾部,由每一层上的协</div><div class="t m0 x2 h3 y9 ff2 fs0 fc0 sc0 ls0 ws0">议添加。</div><div class="t m0 x2 h3 yb ff2 fs0 fc0 sc0 ls0 ws0">虽然计算机通信是物理的(电信号通过线缆从一台计算机传递到另一台计算</div><div class="t m0 x2 h3 yc ff2 fs0 fc0 sc0 ls0 ws0">机),不过它们也通过逻辑通道来通信。特定OSI层上的每个协议与工作在另一</div><div class="t m0 x2 h3 yd ff2 fs0 fc0 sc0 ls0 ws0">台计算机的相同OSI层上的对应协议进行通信。此时,通信通过封装来完成。</div><div class="t m0 x2 h3 ye ff2 fs0 fc0 sc0 ls0 ws0">封装的工作过程如下:消息在一台计算机上的程序内构造,接着通过协议栈向</div><div class="t m0 x2 h3 yf ff2 fs0 fc0 sc0 ls0 ws0">下传递。每一层上的协议都在消息中添加自己的信息,这样消息的大小在沿协</div><div class="t m0 x2 h3 y10 ff2 fs0 fc0 sc0 ls0 ws0">议栈往下传递的过程中会增大。随后,消息发送至目标计算机,封装的过程逆</div><div class="t m0 x2 h3 y11 ff2 fs0 fc0 sc0 ls0 ws0">转,数据包将被拆开,这与在源计算机中进行封装的步骤相同。在数据链路层,</div><div class="t m0 x2 h3 y12 ff2 fs0 fc0 sc0 ls0 ws0">只有与该层相关的信息会被抽取出来,接着消息发送至上面一层。接下来在网</div><div class="t m0 x2 h3 y13 ff2 fs0 fc0 sc0 ls0 ws0">络层,只有网络层数据被剥离和处理,数据包又发送至上面一层。这就是计算</div><div class="t m0 x2 h3 y14 ff2 fs0 fc0 sc0 ls0 ws0">机的逻辑通信方式。目标计算机剥离的信息会告诉它如何正确解释和处理这个</div><div class="t m0 x2 h3 y15 ff2 fs0 fc0 sc0 ls0 ws0">数据包。</div><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">3</div></div><div class="pi" data-data='{"ctm":[1.777778,0.000000,0.000000,1.777778,0.000000,0.000000]}'></div></div>
<div id="pf4" class="pf w0 h0" data-page-no="4"><div class="pc pc4 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://csdnimg.cn/release/download_crawler_static/10738201/bg4.jpg"><div class="t m0 x2 h3 y2 ff2 fs0 fc0 sc0 ls0 ws0">应用层(application layer)是第七层,它工作在与用户最为接近的地方,提</div><div class="t m0 x2 h3 y3 ff2 fs0 fc0 sc0 ls0 ws0">供文件传输、消息交换、终端会话以及更多功能。这一层并不包括实际的应用,</div><div class="t m0 x2 h3 y4 ff2 fs0 fc0 sc0 ls0 ws0">但是包括支持这些应用的协议。当某个应用需要通过网络发送数据时,它就会</div><div class="t m0 x2 h3 y5 ff2 fs0 fc0 sc0 ls0 ws0">将指令和数据发送至在这一层上支持该应用的协议。这一层处理和适当格式化</div><div class="t m0 x2 h3 y6 ff2 fs0 fc0 sc0 ls0 ws0">数据,并继续向下传递至OSI模型内的下一层。应用层构造的数据包含了每一层</div><div class="t m0 x2 h3 y7 ff2 fs0 fc0 sc0 ls0 ws0">通过网络传送数据所需的关键信息之后才会向下传递。然后,数据传送到网络</div><div class="t m0 x2 h3 y8 ff2 fs0 fc0 sc0 ls0 ws0">线缆上,直至其到达目标计算机。</div><div class="t m0 x2 h3 y9 ff2 fs0 fc0 sc0 ls0 ws0">应用层上的协议处理文件传输、虚拟终端、网络管理以及执行应用程序的网络</div><div class="t m0 x2 h3 ya ff2 fs0 fc0 sc0 ls0 ws0">请求。下面列出了在这个层上工作的一些协议:</div><div class="t m0 x2 h3 yb ff2 fs0 fc0 sc0 ls0 ws0">● 文件传输协议(File T<span class="_ _0"></span>ransfer Protocol,FTP)</div><div class="t m0 x2 h3 yc ff2 fs0 fc0 sc0 ls0 ws0">● 普通文件传输协议(T<span class="_ _0"></span>rivial File T<span class="_ _0"></span>ra<span class="_ _3"></span>nsfer Protocol,TFTP)</div><div class="t m0 x2 h3 yd ff2 fs0 fc0 sc0 ls0 ws0">● 简单网络管理协议(Simple Network Management Protocol,SNMP)</div><div class="t m0 x2 h3 ye ff2 fs0 fc0 sc0 ls0 ws0">● 简单邮件传输协议(Simple Mail T<span class="_ _0"></span>ransfer Protocol,SMTP)</div><div class="t m0 x2 h3 yf ff2 fs0 fc0 sc0 ls0 ws0">● T<span class="_ _0"></span>elnet</div><div class="t m0 x2 h3 y10 ff2 fs0 fc0 sc0 ls0 ws0">● 超文本传输协议(Hyper<span class="_ _3"></span>text T<span class="_ _0"></span>ransfer Protocol,HTTP)</div><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">4</div></div><div class="pi" data-data='{"ctm":[1.777778,0.000000,0.000000,1.777778,0.000000,0.000000]}'></div></div>
- 1
- 2
- 3
- 4
前往页