




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Chapter 16,Protocols and Protocol Layering,Protocol,Agreement about communication A network protocol or computer communication protocol is a set of rules that specify the format and meaning of messages exchanged between computers across a network Specifies Format of messages (syntax) Meaning of mess
2、ages (semantics) Rules for exchange Procedure for handling problems,Need for Protocols,Hardware is low level Many problems can occur Bits corrupted or destroyed Entire packet lost Packet duplicated Packets delivered out of order Need mechanisms to distinguish among Multiple computers on a network Mu
3、ltiple applications on a computer Multiple copies of a single application on a computer,Set of Protocols,Complexity requires multiple protocols, each of which manages a part of the problem A set of related protocols that are designed for compatibility is called a protocol suite Protocol suite design
4、ers Analyze communication problem Divide problems into subproblems Design a protocol for each subproblem Work together,Set of Protocols,Each protocol solves part of communication problem Protocols are implemented by protocol software Known as Protocol suite Protocol family Designed in layers,Plan fo
5、r Protocol Design,Intended for protocol designers Divides protocols into layers Each layer devoted to one subproblem Example: ISO 7-layer reference model,Illustration of the 7-Layer Model,ISO - International Organization for Standards Defined early Now somewhat dated Does not include internet layer!
6、,ISO Layers,Layer 1: Physical Underlying hardware- such as RS-232 or Ethernet (chap5) Layer 2: Data Link (media access) Hardware frame definitions: Format of data in frames and delivery of frames through network interface (chap7:frame, stuffing, checksum) Layer 3: Network Packet forwarding: Address
7、assignment and data delivery across a physical network (chap9:addressing chap13:forwarding) Layer 4: Transport Reliability: Reliable delivery of data between computers (chap16-17),ISO Layers(continued),Layer 5: Session Login and passwords: Management of sessions such as login to a remote computer La
8、yer 6: Presentation Data representation:Common formats for representation of data Layer 7: Application Services for common applications: Application-specific protocols such as FTP and SMTP (electronic mail),Layers and Protocol Software,Protocol software follows layering model One software module per
9、 layer Modules cooperate Incoming or outgoing data passes from one module to another Entire set of modules known as stack,Layered Software and Stacks,Two constraints: Software for each layer depends only on the services of the software provided by lower layers Software at layer n at the destination
10、receives exactly the same protocol message sent by layer n at the sender These constraints mean that protocols can be tested independently and can be replaced within a protocol stack,Layers and Packet Headers,On the sender, each layer: Accepts an outgoing message from the layer above Adds a header a
11、nd other processing Passes resulting message to next lower layer,Layers and Packet Headers,On the receiver, each layer: Receives an incoming message from the layer below Removes the header for that layer and performs other processing Passes the resulting message to the next higher layer,Scientific L
12、ayering Principle,Application data need to be transformed into packets (the basic transmission unit) Peer entities in layer N+1 communicate with each other by communication services provided by layer N (below them) Each layer has specific tasks and functionality. It also provides services to the lay
13、ers above and below it Peer entities communicate by exchanging messages,Software implementing layer N at the destination receives exactly the message sent by software implementing layer N at the source,Illustration of Layering Principle,Peer-to-peer communications,In order to travel data from the so
14、urce to the destination, each layer of the OSI model at the source must communicate with its peer layer at the destination. The protocols of each layer exchange information, called protocol data units (PDUs). Each layer of communication on the source computer communicates with a layer-specific PDU,
15、and with its peer layer on the destination computer.,Protocol Data Units,Different layers in the OSI model have different groupings for data(PDU): Application layer deals with APDU presentation layer deals with PPDU session layer deals with SPDU Transport layer deals with segments Network layer enca
16、psulates segments into packets Data Link layer encapsulates packets into frames Physical layer converts frames to bit streams,PDU,Data Flow,Protocol Techniques,Need to ensure reliable delivery of a block of data from one computer to another For bit corruption - Data link layer (chap4:detect error) P
17、arity Checksum CRC For out-of-order delivery(chap13:best path, chap 15:connectionless network) Transport layer:Sequence numbers Duplication Sequence numbers,Protocol Techniques (continued),For lost packets Positive acknowledgement and retransmission(带重发的确认) For replay(重播) (excessive delay) Unique me
18、ssage ID For data overrun (数据过载) Flow control (流控制),Out-of-order Delivery,Packets may be delivered out of order - especially in systems that include multiple networks Out of order delivery can be detected and corrected through sequencing Sender attaches sequence number to each outgoing packet Receiv
19、ed uses sequence numbers to put packets in order and detect missing packets List,Duplicate Delivery,Packets may be duplicated during transmission Can caused by malfunctioning hardware Sequencing can be used to. Detect duplicate packets with duplicated sequence numbers Discard those duplicate packets
20、,Retransmission,Protocols use positive acknowledgment with retransmission to detect and correct lost packets Receiver sends short message acknowledging receipt of packets Sender infers lost packets from missing acknowledgments Sender retransmits lost packets Sender sets timer for each outgoing packe
21、t Saves copy of packet If timer expires before acknowledgment is received, sender can retransmit saved copy Protocols define upper bound on retransmission to detect unrecoverable network failure,Replay,One source of delay in a packet switching system arises from the store-and-forward approach-queue
22、Extraordinary delays can lead to replay errors Replay means that an old, delayed packet affect later communication For example:,Two computers agree to communicate at 1 PM One computer sends a sequence of ten packets to the other A hardware problem causes packet 3 to be delayed Router change to avoid
23、 the hardware problem Protocol software on the sending computer retransmitting packet 3, and the remaining packets are transmitted without error At 1:05 PM the two computers agree to communicate again After the second packet arrives, the delayed copy of packet 3 arrives from the earlier session Pack
24、et 3 arrives from the second session,Replay,Sufficiently delayed packets may be inserted into later sessions Protocols attach session number to each packet in a protocol session to differentiate packets from different sessions,Flow Control,Needed because Sending computer system faster than receiving
25、 computer Sending application faster than receiving application Protocols use flow control mechanisms through which receiver can control rate of data transmission Related to buffering Two forms Stop-and-go (简单停等) Sliding window (滑动窗口),Stop-And-Go Flow Control,Sending Side Transmits one packet Waits
26、for signal from receiver Receiving side Receives and consumes packets Transmits signal to sender Can be very inefficient of network bandwidth if delivery time is large,发送方,接收方,Example,Network:a packet size of 1000 octets, a throughput capacity of 2 Mbps, a delay of 50 millisecond The hardware can tr
27、ansport 2 Mbps from one computer to another After transmitting a packet, the sender must wait 100 msec before sending another packet(50 msec for the packet to reach the receiver and 50 msec for an acknowledgement to travel back) The maximum rate at which data can be sent using stop-and-go is one pac
28、ket every 100 millisecond When expressed as a bit rate, the maximum rate stop-and-go can achieved is 80,000bps,which is only 4% of the hardware capacity,Sliding Window Flow Control,Allows sender to transmit multiple packets before receiving an acknowledgment Number of packets that can be sent is def
29、ined by the protocol and called the window As acknowledgments arrive from the receiver, the window is moved along the data packets; hence sliding window,Sliding Window Flow Control,Receiving side Establishes multiple buffers and informs sender Sending side Transmits packets for all available buffers
30、 Only waits if no signal arrives before transmission Receiving side Sends signals as packets arrive,Illustration of SlidingWindow on Sending Side,Window tells how many packets can be sent Window moves as acknowledgements arrive,Comparison of Flow Control,Stop-and-go Slow Useful only in special cases
31、 Sliding window Fast Needed in high-speed network,time : 8N 2N+,N,N,N,N,N,N,N,N,N,Why Sliding Window?,Simultaneously Increase throughput Control flow Speedup Tw = min(B, TG * W) where B is underlying hardware bandwidth TW is sliding window throughput TG is stop-and-go throughput W is the window size
32、,Congestion,Fundamental problem in networks Analogous to congestion on a highway Principal cause of delay Network congestion arises in network systems that include multiple links If input to some link exceeds maximum bandwidth, packets will queue up at connection to that link Eventually, packets wil
33、l be discarded and packets will be retransmitted,Illustration of ArchitectureThat Can Experience Congestion,Multiple sources Bottleneck,Congestion and Loss,Modern network hardware works well; most packet loss results from congestion, not from hardware failure,Rate control (e.g. temporarily reducing Windows
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025电子产品分期付款购买合同模板
- 2025设备采购合同范本模板
- 2025房产证办理代办服务合同
- 护理急救车的规范管理
- 急诊脑梗死护理查房
- 心理健康教育:挫折
- 广州大学大一数学试卷
- 贵州7年级数学试卷
- 河北高考卷数学试卷
- 河北二年级上数学试卷
- 肺结节中医课件
- 护理核心制度考试试卷(附答案)
- 尾矿工安全培训
- 西安高新区管委会招聘笔试真题2024
- 2025年中国工商银行招聘笔试备考题库(带答案详解)
- 研发项目工时管理制度
- 浮选药剂安全管理制度
- 会阴水肿硫酸镁湿敷专题报告
- 技术异化的解放路径-洞察及研究
- 2025年连云港市中考语文试卷真题(含标准答案)
- 2025年学校校长公开选拔笔试试题及参考答案校长招聘考试笔试真题
评论
0/150
提交评论