欢迎来到麦多课文档分享! | 帮助中心 海量文档,免费浏览,给你所需,享你所想!
麦多课文档分享
全部分类
  • 标准规范>
  • 教学课件>
  • 考试资料>
  • 办公文档>
  • 学术论文>
  • 行业资料>
  • 易语言源码>
  • ImageVerifierCode 换一换
    首页 麦多课文档分享 > 资源分类 > PPT文档下载
    分享到微信 分享到微博 分享到QQ空间

    Announcement.ppt

    • 资源ID:378417       资源大小:351KB        全文页数:29页
    • 资源格式: PPT        下载积分:2000积分
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    二维码
    微信扫一扫登录
    下载资源需要2000积分(如需开发票,请勿充值!)
    邮箱/手机:
    温馨提示:
    如需开发票,请勿充值!快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如需开发票,请勿充值!如填写123,账号就是123,密码也是123。
    支付方式: 支付宝扫码支付    微信扫码支付   
    验证码:   换一换

    加入VIP,交流精品资源
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    Announcement.ppt

    1、1,Announcement,Project 2 out Much harder than project 1, start early!Homework 2 due next Tuesday,2,Previous Lecture,Reliable transfer protocols rdt 2.0: data corruption - ACK/NAK rdt2.1: ACK/NAK corruption - Seq # in data rdt2.2: a NAK-free protocol - Seq # in ACKs rdt3.0: channels with errors and l

    2、oss Retransmission timeout Pipelined protocols Go-back-N Selective repeat,3,Go-Back-N,Sender: k-bit seq # in pkt header (the range of 0 , 2k - 1) “window” of up to N, consecutive unacked pkts allowed,ACK(n): ACKs all pkts up to, including seq # n - “cumulative ACK” may deceive duplicate ACKs (see re

    3、ceiver) One timer for all packets in-flight timeout: retransmit all packets in flight,4,Selective repeat: sender, receiver windows,5,Outline,Connection-oriented transport: TCP Overview and segment structure Reliable data transfer Flow control Connection management,6,TCP: Overview RFCs: 793, 1122, 13

    4、23, 2018, 2581,full duplex data: bi-directional data flow in same connection MSS: maximum segment size connection-oriented: handshaking (exchange of control msgs) inits sender, receiver state before data exchange flow controlled: sender will not overwhelm receiver,point-to-point: one sender, one rec

    5、eiver reliable, in-order byte steam: no “message boundaries” pipelined: TCP congestion and flow control set window size send & receive buffers,7,TCP segment structure,URG: urgent data (generally not used),ACK: ACK # valid,PSH: push data now (generally not used),RST, SYN, FIN: connection estab (setup

    6、, teardown commands),# bytes rcvr willing to accept,counting by bytes of data (not segments!),Internet checksum (as in UDP),8,TCP seq. #s and ACKs,Seq. #s: byte stream “number” of first byte in segments data ACKs: seq # of next byte expected from other side cumulative ACK Q: how receiver handles out

    7、-of-order segments A: TCP spec doesnt say, - up to implementor,Host A,Host B,Seq=42, ACK=79, data = C,Seq=79, ACK=43, data = C,Seq=43, ACK=80,User types C,host ACKs receipt of echoed C,host ACKs receipt of C, echoes back C,simple telnet scenario,9,TCP Round Trip Time and Timeout,Q: how to set TCP ti

    8、meout value? longer than RTT but RTT varies too short: premature timeout unnecessary retransmissions too long: slow reaction to segment loss,Q: how to estimate RTT? SampleRTT: measured time from segment transmission until ACK receipt ignore retransmissions SampleRTT will vary, want estimated RTT “sm

    9、oother” average several recent measurements, not just current SampleRTT,10,TCP Round Trip Time and Timeout,EstimatedRTT = (1- )*EstimatedRTT + *SampleRTT,Exponential weighted moving average influence of past sample decreases exponentially fast typical value: = 0.125The weighted average puts more wei

    10、ght on recent samples which better reflect the current congestion,11,Example RTT estimation:,12,TCP Round Trip Time and Timeout,Setting the timeout EstimtedRTT plus “safety margin” large variation in EstimatedRTT - larger safety margin first estimate of how much SampleRTT deviates from EstimatedRTT:

    11、,TimeoutInterval = EstimatedRTT + 4*DevRTT,DevRTT = (1-)*DevRTT +*|SampleRTT-EstimatedRTT|(typically, = 0.25),Then set timeout interval:,13,Outline,Connection-oriented transport: TCP Overview and segment structure Reliable data transfer Flow control Connection management,14,TCP reliable data transfe

    12、r,TCP creates rdt service on top of IPs unreliable service Pipelined segments Cumulative acks TCP uses single retransmission timer,Retransmissions are triggered by: timeout events duplicate acks Initially consider simplified TCP sender:ignore duplicate acks Use only timeout ignore flow control, cong

    13、estion control,15,TCP sender events:,data rcvd from app: Create segment with seq # seq # is byte-stream number of first data byte in segment start timer if not already running (think of timer as for oldest unacked segment),timeout: retransmit segment that caused timeout restart timerAck rcvd: If ack

    14、nowledges previously unacked segments update what is known to be acked start timer if there are outstanding segments,16,TCP sender (simplified),NextSeqNum = InitialSeqNumSendBase = InitialSeqNumloop (forever) switch(event) event: data received from application above create TCP segment with sequence

    15、number NextSeqNum if (timer currently not running)start timerpass segment to IP NextSeqNum = NextSeqNum + length(data) event: timer timeoutretransmit not-yet-acknowledged segment with smallest sequence numberstart timerevent: ACK received, with ACK field value of y if (y SendBase) SendBase = yif (th

    16、ere are currently not-yet-acknowledged segments)start timer /* end of loop forever */,Comment:SendBase-1: last cumulatively acked byte Example:SendBase-1 = 71; y= 73, so the rcvr wants 73+ ; y SendBase, so that new data is acked,17,TCP: retransmission scenarios,Host A,Seq=100, 20 bytes data,ACK=100,

    17、premature timeout,Host B,Seq=92, 8 bytes data,ACK=120,Seq=92, 8 bytes data,ACK=120,Seq=92 timeout,SendBase = 100,SendBase = 120,SendBase = 120,Sendbase = 100,18,TCP retransmission scenarios (more),SendBase = 120,timeout: When timeout expires after T0 no packet was received for the last TO period Cou

    18、ld be a congestion TO=2*TO,19,TCP ACK generation RFC 1122, RFC 2581,Event at ReceiverArrival of in-order segment with expected seq #. All data up to expected seq # already ACKedArrival of in-order segment with expected seq #. One other segment has ACK pendingArrival of out-of-order segment higher-th

    19、an-expect seq. # . Gap detectedArrival of segment that partially or completely fills gap,TCP Receiver actionDelayed ACK. Wait up to 500ms for next segment. If no next segment, send ACKImmediately send single cumulative ACK, ACKing both in-order segments Immediately send duplicate ACK, indicating seq

    20、. # of next expected byteImmediate send ACK, provided that segment starts at lower end of gap,20,Fast Retransmit,Time-out period often relatively long: long delay before resending lost packet Detect lost segments via duplicate ACKs. Sender often sends many segments back-to-back If segment is lost, t

    21、here will likely be many duplicate ACKs.,If sender receives 3 ACKs for the same data, it supposes that segment after ACKed data was lost: fast retransmit: resend segment before timer expires,21,event: ACK received, with ACK field value of y if (y SendBase) SendBase = yif (there are currently not-yet

    22、-acknowledged segments)start timer else increment count of dup ACKs received for yif (count of dup ACKs received for y = 3) resend segment with sequence number y,Fast retransmit algorithm:,a duplicate ACK for already ACKed segment,fast retransmit,22,Outline,Connection-oriented transport: TCP Overvie

    23、w and segment structure Reliable data transfer Flow control Connection management,23,TCP Flow Control,receive side of TCP connection has a receive buffer:,speed-matching service: matching the send rate to the receiving apps drain rate,app process may be slow at reading from buffer,24,TCP Flow contro

    24、l: how it works,(Suppose TCP receiver discards out-of-order segments) spare room in buffer = RcvWindow = RcvBuffer-LastByteRcvd - LastByteRead,Rcvr advertises spare room by including value of RcvWindow in segments Sender limits unACKed data to RcvWindow guarantees receive buffer doesnt overflowPatho

    25、logical scenario RcvWindow=0 Sender has no packets to send,25,Outline,Connection-oriented transport: TCP Overview and segment structure Reliable data transfer Flow control Connection management,26,TCP Connection Management,Recall: TCP sender, receiver establish “connection” before exchanging data se

    26、gments initialize TCP variables: seq. #s buffers, flow control info (e.g. RcvWindow) client: connection initiatorSocket clientSocket = new Socket(“hostname“,“port number“); server: contacted by clientSocket connectionSocket = welcomeSocket.accept();,Three way handshake: Step 1: client host sends TCP

    27、 SYN segment to server specifies initial seq # no data Step 2: server host receives SYN, replies with SYNACK segment server allocates buffers specifies server initial seq. # Step 3: client receives SYNACK, replies with ACK segment, which may contain data,27,TCP Connection Management (cont.),Closing

    28、a connection: client closes socket: clientSocket.close(); Step 1: client end system sends TCP FIN control segment to server Step 2: server receives FIN, replies with ACK. Closes connection, sends FIN.,28,TCP Connection Management (cont.),Step 3: client receives FIN, replies with ACK. Enters “timed wait” - will respond with ACK to received FINs Step 4: server, receives ACK. Connection closed.,client,FIN,server,ACK,ACK,FIN,closing,closing,closed,timed wait,closed,29,TCP Connection Management (cont),TCP client lifecycle,TCP server lifecycle,


    注意事项

    本文(Announcement.ppt)为本站会员(boatfragile160)主动上传,麦多课文档分享仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文档分享(点击联系客服),我们立即给予删除!




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1 

    收起
    展开