ymqi07-数据链路控制

上传人:今*** 文档编号:105804405 上传时间:2019-10-13 格式:PPT 页数:50 大小:996.50KB
返回 下载 相关 举报
ymqi07-数据链路控制_第1页
第1页 / 共50页
ymqi07-数据链路控制_第2页
第2页 / 共50页
ymqi07-数据链路控制_第3页
第3页 / 共50页
ymqi07-数据链路控制_第4页
第4页 / 共50页
ymqi07-数据链路控制_第5页
第5页 / 共50页
点击查看更多>>
资源描述

《ymqi07-数据链路控制》由会员分享,可在线阅读,更多相关《ymqi07-数据链路控制(50页珍藏版)》请在金锄头文库上搜索。

1、Chapter 7 Data Link Control Protocols 数据链路控制,PRESENTED BY YONGMIN QI (祁永敏),Overview,Flow Control流量控制 Error Control差错控制 High Level Data Link Control(HDLC)高级数据链路控制,为何需要数据链路控制?,存在传输差错的可能性 数据接收方可能需要调整数据到达的速率 仅靠物理层的同步和接口技术是不够的 为了有效地进行数字数据通信,还需涉及差错控制和管理信息交换的更多内容。 数据链路层与数据链路控制协议,数据链路层功能,向网络层提供服务接口 组帧 差错控制:

2、纠正传输比特差错 流量控制:调节数据流量 发送站的速度=接受站接纳帧的速度 寻址 控制信息和数据在同一链路上 链路管理,Flow Control,Ensuring the sending entity does not overwhelm the receiving entity Preventing buffer 缓存overflow溢出 Transmission time传输时间 Time taken to emit all bits into medium 一个帧的所有比特送到媒体上所花的时间 Propagation time传播时间 Time for a bit to traverse

3、 the link 一个比特经过链路从源点到终点所花的时间,Model of Frame Transmission,传播时延,传输时延,传输时间与传播时间,Transmission time 将一帧所有比特发送到传输媒体所花的时间 与帧的长度L成正比 与发送速率R成反比 传输时间 ttrans = L / R Propagation time 一个比特通过链路的时间 传播时间 tprop = d / V d为链路距离 V为传播速度,Stop and Wait停止等待,Source transmits frame Destination receives frame and replies wi

4、th acknowledgement( ACK )确认 Source waits for ACK before sending next frame Destination can stop flow by not send ACK Works well for a few large frames,Fragmentation分割,Large block of data may be split into small frames Limited buffer size Errors detected sooner (when whole frame received) On error, r

5、etransmission of smaller frames is needed Prevents one station occupying medium for long periods Stop and wait becomes inadequate,Frame,Ack,Src,Destn,Src,Destn,Prop. Delay Transmission delay,Trans. Delay Propagation delay,停止等待链路利用率,链路的比特长度B:以比特为单位的链路长度 B = R(d/v) R:链路数据率,bps; d:链路的长度,m 传送数据的总时间 T T=

6、 ttrans +tprop + tproc+ tprop+ tack+ tproc 线路利用率或者效率 u=ttrans/ (ttrans+2tprop)=1/(1+2a) transmission time归一化 propagation time表示为变量 a,Sliding Windows Flow Control 滑动窗流控制,Allow multiple frames to be in transit Receiver has buffer W long Transmitter can send up to W frames without ACK Each frame is num

7、bered ACK includes number of next frame expected Sequence number bounded by size of field,Sliding Window Diagram,发送方滑动窗口,当发送出数据时,滑动窗口从左边开始收缩; 当收到确认时,滑动窗口向右扩展。,接收方滑动窗口,当接收到数据时,滑动窗口从左边开始收缩; 当发送确认时,滑动窗口向右扩展。,Example Sliding Window,Sliding Window Enhancements,Receiver can acknowledge frames without perm

8、itting further transmission (Receive Not Ready接收未确认) Must send a normal acknowledge to resume If duplex, use piggybacking捎带确认 If no data to send, use acknowledgement frame If data but no acknowledgement to send, send last acknowledgement number again, or have ACK valid flag (TCP),Error Control差错控制,D

9、etection and correction of errors 两种类型的差错 Lost frames帧丢失 Damaged frames帧损伤 Automatic repeat request(ARQ)自动重传请求 Error detection Positive acknowledgment肯定确认 Retransmission after timeout超时重传 Negative acknowledgement and retransmission 否认与重传,ARQ,ARQ的作用:使不可靠的数据链路变的可靠 ARQ的三个标准: Stop and wait Go back N返回 S

10、elective reject (selective retransmission)选择拒绝,Stop and Wait ARQ,Source transmits single frame Wait for ACK If received frame damaged, discard it Transmitter has timeout If no ACK within timeout, retransmit If ACK damaged,transmitter will not recognize it Transmitter will retransmit Receive gets two

11、 copies of frame Use ACK0 and ACK1,发送方保留帧的副本,Stop and Wait - Diagram,Stop and Wait - Pros and Cons,Simple Inefficient,Go Back N ARQ(1),Based on sliding window If no error, ACK as usual with next frame expected Use window to control number of outstanding frames用窗口控制帧的最大数目 If error, reply with rejecti

12、on否认 Discard that frame and all future frames until error frame received correctly Transmitter must go back and retransmit that frame and all subsequent frames,Go Back N - Damaged Frame,Receiver detects error in frame i Receiver sends rejection-i Transmitter gets rejection-i Transmitter retransmits

13、frame i and all subsequent,Go Back N - Lost Frame (1),Frame i lost Transmitter sends i+1 Receiver gets frame i+1 out of sequence Receiver send reject i Transmitter goes back to frame i and retransmits,Go Back N - Lost Frame (2),Frame i lost and no additional frame sent Receiver gets nothing and retu

14、rns neither acknowledgement nor rejection Transmitter times out and sends acknowledgement frame with P bit set to 1 Receiver interprets this as command which it acknowledges with the number of the next frame it expects (frame i ) Transmitter then retransmits frame i,Go Back N - Damaged Acknowledgeme

15、nt,Receiver gets frame i and send acknowledgement (i+1) which is lost Acknowledgements are cumulative累积, so next acknowledgement (i+n) may arrive before transmitter times out on frame i If transmitter times out, it sends acknowledgement with P bit set as before This can be repeated a number of times

16、 before a reset procedure is initiated,Go Back N - Damaged Rejection,As for lost frame (2),Go Back N - Diagram,Selective Reject ARQ,Also called selective retransmission选择重传 Only rejected frames are retransmitted Subsequent frames are accepted by the receiver and buffered Minimizes retransmission Receiver must maintain large enough buffer More complex login in transmitter,Selective Reject - Diagram,HDLC Station Types,Primary station主站 Con

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 高等教育 > 大学课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号