- 12
- 0
- 约3.62万字
- 约 151页
- 2017-11-24 发布于河南
- 举报
计算机网络课件 - TopDownV4-3(new)
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1、If a packet with sequence number n is received correctly and is in-order , the receiver sends an ACK for packet n and delivers the data portion of the packet to the upper layer. 2、all other cases, the receiver discards the packet and resends an ACK for the most recently received in-order packet. 3、if packet k has been received and delivered, then all packets with a sequence number lower than k have also been delivered. * * * * * * * * 等待 start_timer udt_send(sndpkt[base]) udt_send(sndpkt[base+1]) … udt_send(sndpkt[nextseqnum-1]) timeout rdt_send(data) if (nextseqnum base+N) { sndpkt[nextseqnum] = make_pkt(nextseqnum,data,chksum) udt_send(sndpkt[nextseqnum]) if (base == nextseqnum) start_timer nextseqnum++ } else refuse_data(data) base = getacknum(rcvpkt)+1 If (base == nextseqnum) stop_timer else start_timer rdt_rcv(rcvpkt) notcorrupt(rcvpkt) base=1 nextseqnum=1 rdt_rcv(rcvpkt) corrupt(rcvpkt) L 运输层 * L 运输层 * GBN: 接收方扩展 FSM 窗口大小为1,存储期望接受的数据报序号值 使用ACK应答: 对正确接收的按序分组发送ACK,否则为最近按序接收的分组重传ACK 可能产生冗余的ACKs 仅需要记住期望的序号值(expectedseqnum) 对失序的分组: 丢弃 (不缓存) - 没有接收缓冲区! 重新确认具有按序的分组 rdt_rcv(rcvpkt) notcurrupt(rcvpkt) hasseqnum(rcvpkt,expectedseqnum) extract(rcvpkt,data) deliver_data(data) sndpkt = make_pkt(expectedseqnum,ACK,chksum) udt_send(sndpkt) expectedseqnum++ udt_send(sndpkt) default expectedseqnum=1 Sndpkt=make_pkt(expectedseqnum ,ACK,chksum) L 等待 运输层 * 发送文件字节序号 1 …….. 3 4 5 6 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 文件大小1G 发送字节序号,发送窗口位置 1 …….. 3 4 5 6 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1G 文件大小1G 发送字节序号,窗口 = 16 发送文件字节序号 已发送并 收到确认 已发送并 收到确认 1G 不允许发送 不允许发送 运输层 * GBN: 发送方扩展的 FSM 三个事件: 1、上层的调用 2、收到ACK 3、超时事件 你将采用怎样数据结构保存发送方缓存数据? 结构体对象;不会使用一个超大的数据。 等待 start_timer ud
您可能关注的文档
最近下载
- 2025年山东医学高等专科学校单招(数学)历年真题考点含答案解析.docx
- 《QSH0038-2007-钻井液用羧甲基纤维素钠盐技术要求》.pdf VIP
- 《桂海虞衡志》中少数民族风俗研究.doc VIP
- QSH 0048-2007 钻井液用聚丙烯酰胺钾盐技术要求.pdf VIP
- 医疗护理员培训大纲(试行).docx VIP
- 一汽大众ERP-SAP_原创文档.pdf VIP
- Haier海尔洗衣机10公斤超薄嵌入洗烘一体机 EG100HPRO51说明书用户手册.pdf
- 一汽大众ERP-SAP一汽大众ERP-SAP.docx VIP
- 新中国60年统计汇编.pdf VIP
- 自贸区对地区经济的影响研究以我国中西部自贸区为例.docx VIP
原创力文档

文档评论(0)