计算机网络和协议分析3_第1页
计算机网络和协议分析3_第2页
计算机网络和协议分析3_第3页
计算机网络和协议分析3_第4页
计算机网络和协议分析3_第5页
已阅读5页,还剩48页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Advanced Computer Networks,计算机网络,Weihong Chen Department of Computer Science Hunan City University Sep, 2010,Review,Network Hardware The transmission techniques: Broadcasting links, Point-to-point links The types of the networks by scale: LAN,MAN,WAN Network software Protocol Hierarchies Design Issu

2、es for the Layers Connection-Oriented and Connectionless Services Service Primitives The Relationship of Services to Protocols,Connection-Oriented and Connectionless Services,connection-oriented,connectionless,Connection-oriented service is modeled after the telephone system.,Connectionless service

3、is modeled after the postal system.,It just sends the data.,Three phases: set up a connection, data transmission, release the connection.,The Relationship of Services to Protocols,Services and protocols are distinct concepts.,Fig.6 The relationship between a service and a protocol,Service provided b

4、y layer k,Protocol,A service is a set of primitives (operations) that a layer provides to the layer above it. A service relates to an interface between two layers, with the lower layer being the service provider and the upper layer being the service user.,A protocol, in contrast, is a set of rules g

5、overning the format and meaning of the packets, or messages that are exchanged by the peer entities within a layer. Entities use protocols to implement their service definitions.,Back,第一章 引言,Chapter 1,Introduction,Spring10 CN,4. Network Software,Protocol Hierarchies Design Issues for the Layers Conn

6、ection-Oriented and Connectionless Services Service Primitives The Relationship of Services to Protocols,Spring10 CN,协议层次 典型的设计问题 面向连接和无连接服务 服务原语 服务和协议的关系,Spring10 CN,4.1 Protocol Hierarchies,To reduce their design complexity, most networks are organized as a stack of layers or levels, each one buil

7、t upon the one below it. The number of layers, the name of each layer, the contents of each layer, and the function of each layer differ from network to network. The purpose of each layer is to offer certain services to the higher layers, shielding those layers from the details of how the offered se

8、rvices are actually implemented. In a sense, each layer is a kind of virtual machine, offering certain services to the layer above it.,Spring10 CN,分层的好处,各层之间是独立的; 灵活性好; 结构上可分割开; 易于实现和维护; 能促进标准化工作;,Spring10 CN,Fig.9 Protocol Hierarchies,A protocol is an agreement between the communicating parties on

9、how communication is to proceed. It contains three elements: syntax, meaning and synchronization.,The entities comprising the corresponding layers on different machines are called peers.,Between each pair of adjacent layers is an interface.,A set of layers and protocols is called a network architect

10、ure.,In reality, no data are directly transferred from layer n on one machine to layer n on another machine. Instead, each layer passes data and control information to the layer immediately below it, until the lowest layer is reached. Below layer 1 is the physical medium through which actual communi

11、cation occurs. In Fig.9, virtual communication is shown by dotted lines and physical communication by solid lines.,10101000011101,10100110100101,Communication on different machines,5,4,3,2,1,5,4,3,2,1,Computer 1,AP2,AP1,Computer 2,3,2,1,Router,Spring10 CN,Fig. 10 Example information flow supporting

12、virtual communication in layer 5,Spring10 CN,一些概念,对等实体:在不同的系统中位于同一层次上的实体。(不同系统之间的通信实际上就是各对等实体之间的通信。) 协议:对等实体间通信所需遵循的规则的总和。 接口:定义了上层调用下层服务的原语操作。 网络体系结构:层次与协议的集合。 协议栈:将系统使用的协议按层次顺序(每层一个协议)列出而得到的协议列表。 实通信和虚通信。 分层网络中实际的通信过程。,Spring10 CN,4.2 Design Issues for the Layers,Error control is an important issu

13、e because physical communication circuits are not perfect. error-detecting, error-correcting Flow control: limit the sender to an agreed-on transmission rate. Multiplexing: use the same connection for multiple, unrelated conversations. Routing: When there are multiple paths between source and destin

14、ation, a route must be chosen.,Spring10 CN,4.3 Connection-Oriented and Connectionless Services,connection-oriented,connectionless,Connection-oriented service is modeled after the telephone system.,Connectionless service is modeled after the postal system.,It just sends the data.,Three phases: set up

15、 a connection, data transmission, release the connection.,Spring10 CN,Each service can be characterized by a quality of service. Connection-oriented service is reliable, but Connectionless service is unreliable.,Connection-oriented communication has three phases. In the establishment phase a request

16、 is made to set up a connection. Only after this phase has been successfully completed can the data transfer phase be started and data transported.Then comes the release phase. Connectionless communication does not have these phases. It just sends the data.,Spring10 CN,面向连接服务 建立连接、传输数据、拆除连接三步曲。类似电话系

17、统服务,保证数据传输顺序。 无连接服务 数据不需要沿着相同的路径传输。类似邮政系统服务,不保证数据传输顺序。 可靠的服务 通过接收方的应答来实现,会引入开销和延迟。,Spring10 CN,4.5 The Relationship of Services to Protocols,Services and protocols are distinct concepts.,Fig.6 The relationship between a service and a protocol,Service provided by layer k,Protocol,A service is a set o

18、f primitives (operations) that a layer provides to the layer above it. A service relates to an interface between two layers, with the lower layer being the service provider and the upper layer being the service user.,A protocol, in contrast, is a set of rules governing the format and meaning of the

19、packets, or messages that are exchanged by the peer entities within a layer. Entities use protocols to implement their service definitions.,Back,Spring10 CN,In other words, services relate to the interfaces between layers, as illustrated in Fig. 11. In contrast, protocols relate to the packets sent

20、between peer entities on different machines.,Spring10 CN,服务 涉及同一系统的相邻两个层次,定义了下层可以为上层执行的操作,但没有说明这些操作如何完成。 协议 涉及不同系统上的对等实体,定义了这些实体间通信所要遵循的规则,如数据包的格式及含义等。对等实体使用协议来实现它们的服务。,5. Reference Models,The OSI Reference Model The TCP/IP Reference Model A Comparison of the OSI and TCP/IP Reference Models A Critiq

21、ue of the OSI Model and Protocols A Critique of the TCP/IP Reference Model,5.1 The OSI Reference Model,OSI : Open Systems Interconnection,The OSI model has seven layers.,The OSI Reference Model,OSI :,Open Systems Interconnection,The Physical Layer,The design issues here largely deal with mechanical,

22、 electrical, and timing interfaces, and the physical transmission medium, which lies below the physical layer.,功能:完成相邻节点之间原始比特流的传输 协议: 机械特性:连接器形状,DB25 电气特性:正、负逻辑,传输介质、速率、距离等 功能特性:每一根信号线的功能定义 过程特性:完成特定功能时,各信号的工作过程,The Data Link Layer,The main task of the data link layer is to transform a raw transmis

23、sion facility into a line that appears free of undetected transmission errors to the network layer.,功能:完成相邻节点之间数据的可靠传输 协议: 帧(frame)结构 差错控制 流量控制 LAN的数据链路层又分为两个子层: 介质访问子层(MAC) 逻辑链路子层(LLC),The Network Layer,A key design issue is determining how packets are routed from source to destination.,The Transpo

24、rt Layer,The basic function of the transport layer is to accept data from above, split it up into smaller units if need be, pass these to the network layer, and ensure that the pieces all arrive correctly at the other end.,功能:在两个主机的不同进程之间提供无差错和有效的数据通信服务,The Session Layer,The session layer allows use

25、rs on different machines to establish sessions between them. Sessions offer various services, including dialog control, token management, and synchronization.,The Presentation Layer,The presentation layer is concerned with the syntax and semantics of the information transmitted.,功能:完成不同用户之间的会话管理,功能:

26、提供公共的数据表示格式或完成数据格式转换、数据加解密以及数据压缩和解压缩的功能。,The Application Layer,The application layer contains a variety of protocols that are commonly needed by users.,功能:提供访问网络的各种接口和应用层协议 实例: E-mail,Telnet,FTP, WWW,BBS,5.2 The TCP/IP Reference Model,Fig.2 The TCP/IP reference model,The Internet Layer,The internet

27、layer defines an official packet format and protocol called IP (Internet Protocol). The job of the internet layer is to deliver IP packets where they are supposed to go. Packet routing is clearly the major issue here, as is avoiding congestion. For these reasons, it is reasonable to say that the TCP

28、/IP internet layer is similar in functionality to the OSI network layer. Fig.2 shows this correspondence.,功能:负责IP报文在各节点中的传输,The Transport Layer,Two end-to-end transport protocols have been defined here: TCP and UDP. The first one, TCP (Transmission Control Protocol), is a reliable connection-oriente

29、d protocol that allows a byte stream originating on one machine to be delivered without error on any other machine in the internet. The second protocol in this layer, UDP (User Datagram Protocol), is an unreliable, connectionless protocol for applications. The relation of IP, TCP, and UDP is shown i

30、n Fig.3 .,功能:在源结点和目的结点的两个进程之间提供可靠的端到端的数据传输。,Fig.3 Protocols and networks in the TCP/IP model initially,The Application Layer,It contains all the higher-level protocols.,The Host-to-Network Layer,功能:提供用户访问网络的接口,功能:接收IP协议模块交来的IP数据报并通过物理传输网络发送出去或者作相反的工作。,5.3 Comparing OSI and TCP/IP Models,The OSI and

31、TCP/IP reference models have much in common. Both are based on the concept of a stack of independent protocols. Also, the functionality of the layers is roughly similar.,The two models also have many differences.,1. Three concepts are central to the OSI model: Services, Interfaces, Protocols,The ser

32、vice definition tells what the layer does, not how entities above it access it or how the layer works. A layers interface tells the processes above it how to access it. It specifies what the parameters are and what results to expect. It, too, says nothing about how the layer works inside. The peer p

33、rotocols used in a layer are the layers own business. It can use any protocols it wants to, as long as it gets the job done (i.e., provides the offered services). It can also change them at will without affecting software in higher layers.,The TCP/IP model did not originally clearly distinguish betw

34、een service, interface, and protocol.,2. Different numbers of layers: the OSI model has seven layers and the TCP/IP has four layers. Both have (inter)network, transport, and application layers, but the other layers are different. 3. Another difference is in the area of connectionless versus connecti

35、on-oriented communication. The OSI model supports both connectionless and connection-oriented communication in the network layer, but only connection-oriented communication in the transport layer . The TCP/IP model has only one mode in the network layer (connectionless) but supports both modes in th

36、e transport layer .,OSI参考模型清晰地区分服务、接口、协议三个概念,而TCP/IP参考模型没有区分这三个概念; OSI参考模型是在其协议开发之前设计出来的,更通用性;而TCP/IP参考模型是对现成协议的描述; OSI参考模型(除去session和presentation层)可以用于很好地讨论计算机网络,但OSI协议却不常用;相反,TCP/IP参考模型不常用,但TCP/IP协议却很常用。,5.4 A Critique of the OSI Model and Protocols,Why OSI did not take over the world Bad timing B

37、ad technology Bad implementations Bad politics,5.5 A Critique of the TCP/IP Reference Model,Problems: Service, interface, and protocol not distinguished Not a general model Host-to-network “layer” not really a layer No mention of physical and data link layers Minor protocols deeply entrenched, hard

38、to replace,In summary, despite its problems, the OSI model (minus the session and presentation layers) has proven to be exceptionally useful for discussing computer networks. In contrast, the OSI protocols have not become popular. The reverse is true of TCP/IP: the model is practically nonexistent,

39、but the protocols are widely used. In effect, the hybrid model of Fig.4 as the framework for this book.,Fig.4 The hybrid reference model to be used in this book,8 Metric Units,M milli Micro Kilo 1024 e.g. 1GB=1024B but, 1k bps=1000bps,Exercise,Imagine that you have trained your St. Bernard, Bernie,

40、to carry a box of three 8mm tapes instead of a flask of brandy. (When your disk fills up, you consider that an emergency.) These tapes each contain 7 gigabytes. The dog can travel to your side, wherever you may be, at 18 km/hour. For what range of distances does Bernie have a higher data rate than a

41、 transmission line whose data rate (excluding overhead) is 150 Mbps?,Summarize,OSI Reference models TCP/IP Reference models Comparing OSI and TCP/IP Models,Homework,Page82 21, 22,Preparation,Charpter 2 The Physical Layer,The answer to exercise,11. What are two reasons for using layered protocols? Among other reasons for using la

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论