第2章传输层协议设计v4分析解析_第1页
第2章传输层协议设计v4分析解析_第2页
第2章传输层协议设计v4分析解析_第3页
第2章传输层协议设计v4分析解析_第4页
第2章传输层协议设计v4分析解析_第5页
已阅读5页,还剩117页未读 继续免费阅读

下载本文档

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

文档简介

清华大学研究生课程,1,Internet传输层协议设计,徐恪清华大学计算机系,清华大学研究生课程,2,提纲,传输层协议概述UDP协议简介TCP协议简介与可靠性设计TCP窗口流控TCP拥塞控制机制分析Tahoe,Reno,NewReno,Sack,Vegas等源算法RED等主动队列管理算法,清华大学研究生课程,3,提纲,传输层协议概述UDP协议简介TCP协议简介与可靠性设计TCP窗口流控TCP拥塞控制机制分析Tahoe,Reno,NewReno,Sack,Vegas等源算法RED等主动队列管理算法,清华大学研究生课程,4,TCP/IP协议栈,清华大学研究生课程,5,传输层协议,实现端到端的数据传输ProtocolimplementedentirelyattheendsFate-sharingCompleteness/correctnessoffunctionimplementations,清华大学研究生课程,6,传输层协议,UDPprovidesjustintegrityanddemuxTCPaddsConnection-orientedReliableOrderedPoint-to-pointByte-streamFullduplexFlowandcongestioncontrolled,清华大学研究生课程,7,提纲,传输层协议概述UDP协议简介TCP协议简介与可靠性设计TCP窗口流控TCP拥塞控制机制分析Tahoe,Reno,NewReno,Sack,Vegas等源算法RED等主动队列管理算法,清华大学研究生课程,8,UDP:UserDatagramProtocolRFC768,MinimalTransportService:“Besteffort”service,UDPsegmentsmaybe:LostDeliveredoutofordertoappConnectionless:NohandshakingbetweenUDPsender,receiverEachUDPsegmenthandledindependentlyofothers,Noconnectionestablishment(whichcanadddelay)Simple:noconnectionstateatsender,receiverSmallheaderNocongestioncontrol:UDPcanblastawayasfastasdesired:dubious!,清华大学研究生课程,9,Multiplexing/demultiplexing,multiplexing/demultiplexing:basedonsender,receiverportnumbers,IPaddressessource,destport#sineachsegmentwell-knownportnumbersforspecificapplications,e.g.DNSonport53,gatheringdatafrommultipleappprocesses,envelopingdatawithheader(laterusedfordemultiplexing),sourceport#,destport#,32bits,applicationdata(message),otherheaderfields,TCP/UDPsegmentformat,清华大学研究生课程,10,Multiplexing/demultiplexing,P2,segment-unitofdataexchangedbetweentransportlayerentitiesakaTPDU:transportprotocoldataunit,receiver,H,t,Demultiplexing:deliveringreceivedsegmentstocorrectapplayerprocesses,segment,segment,M,P1,P3,P4,segmentheader,application-layerdata,清华大学研究生课程,11,UDP,cont.,OftenusedforstreamingmultimediaappsLosstolerantRatesensitiveOtherUDPuses(why?):DNSSNMPReliabletransferoverUDP:addreliabilityatapplicationlayerApplication-specificerrorrecover!,Sourceport#,Destport#,32bits,Applicationdata(message),UDPsegmentformat,Length,Checksum,Length,inbytesofUDPsegment,includingheader,清华大学研究生课程,12,UDPChecksum,SenderTreatsegmentcontentsassequenceof16-bitintegersChecksum:addition(1scomplementsum)ofsegmentcontentsSenderputschecksumvalueintoUDPchecksumfield,ReceiverComputechecksumofreceivedsegmentCheckifcomputedchecksumequalschecksumfieldvalue:NO-errordetectedYES-noerrordetected.Butmaybeerrorsnonetheless?,Goal:detect“errors”(e.g.,flippedbits)intransmittedsegmentNote:IPonlyhasaheaderchecksum,清华大学研究生课程,13,提纲,传输层协议概述UDP协议简介TCP协议简介与可靠性设计TCP窗口流控TCP拥塞控制机制分析Tahoe,Reno,NewReno,Sack,Vegas等源算法RED等主动队列管理算法,清华大学研究生课程,14,IntroductiontoTCP,Communicationabstraction:ReliableOrderedPoint-to-pointByte-streamFullduplexFlowandcongestioncontrolledProtocolimplementedentirelyattheendsFatesharing,清华大学研究生课程,15,EvolutionofTCP,1975,1980,1985,1990,1982TCPpredictscongestioncollapse,1987Karnsalgorithmtobetterestimateround-triptime,1986Congestioncollapseobserved,1988VanJacobsonsalgorithmscongestionavoidanceandcongestioncontrol(mostimplementedin4.3BSDTahoe),19904.3BSDRenofastretransmitdelayedACKs,1975Three-wayhandshakeRaymondTomlinsonInSIGCOMM75,清华大学研究生课程,16,TCPThroughthe1990s,1993,1994,1996,1994ECN(Floyd)ExplicitCongestionNotification,1993TCPVegas(Brakmoetal)realcongestionavoidance,1994T/TCP(Braden)TransactionTCP,1996SACKTCP(Floydetal)SelectiveAcknowledgement,1996HoeImprovingTCPstartup,1996FACKTCP(Mathisetal)extensiontoSACK,清华大学研究生课程,17,TCPHeader,Sourceport,Destinationport,Sequencenumber,Acknowledgement,Advertisedwindow,HdrLen,Flags,0,Checksum,Urgentpointer,Options(variable),Data,Flags:,SYNFINRESETPUSHURGACK,清华大学研究生课程,18,PrinciplesofReliableDataTransfer,Characteristicsofunreliablechannelwilldeterminecomplexityofreliabledatatransferprotocol(rdt),清华大学研究生课程,19,ReliabilityModels,Reliability=requiresredundancytorecoverfromuncertainlossorotherfailuremodesTwotypesofredundancy:SpatialredundancyindependentbackupcopiesForwarderrorcorrection(FEC)codesProblem:requireshugeoverhead,sincetheFECisalsopartofthepacket(s)itcannotrecoverfromerasureofallpacketsTemporalredundancyretransmitifpacketslost/errorLazy:tradesoffresponsetimeforreliabilityDesignofstatusreportsandretransmissionoptimizationimportant,清华大学研究生课程,20,Forwarderrorcontrol,addredundancytorecoverfromlosses,originalfile(nblocks),infinitenumberofblocks,encoding,lossychannel,receive(1+e)blocks,recoverfile,decoding,清华大学研究生课程,21,TemporalRedundancyModel,Packets,SequenceNumbersCRCorChecksum,StatusReports,ACKsNAKsSACKsBitmaps,Retransmissions,Timeout,清华大学研究生课程,22,Typesoferrorsandeffects,Forwardchannelbit-errors(garbledpackets)Forwardchannelpacket-errors(lostpackets)Reversechannelbit-errors(garbledstatusreports)Reversechannelpacket-errors(loststatusreports)Protocol-inducedeffects:DuplicatepacketsDuplicatestatusreportsOut-of-orderpacketsOut-of-orderstatusreportsOut-of-rangepackets/statusreports(inwindow-basedtransmissions),清华大学研究生课程,23,Mechanisms,Mechanisms:Checksuminpkts:detectspktcorruptionACK:“packetcorrectlyreceived”NAK:“packetincorrectlyreceived”Providesreliabletransmissionover:Aforwardchannelwhichhasbit-errors;reverse:okCannothandlereverse-channelbit-errors;orpacket-lossesineitherdirection,清华大学研究生课程,24,MoreMechanisms,Mechanisms:Checksum:detectscorruptioninpktstransmitnewpacket(s)Onnon-dupACK(1RTTlater),setcwndssthresh(windowdeflation)EnterCA,清华大学研究生课程,91,Example:FR/FR,FastretransmitRetransmiton3dupACKsFastrecoveryInflatewindowwhilerepairinglosstofillpipe,time,S,time,R,8,cwnd,8,ssthresh,清华大学研究生课程,92,Summary:Reno,BasicideasFastrecoveryavoidsslowstartdupACKs:fastretransmit+fastrecoveryTimeout:fastretransmit+slowstart,slowstart,retransmit,congestionavoidance,FR/FR,dupACKs,timeout,清华大学研究生课程,93,NewReno:Motivation,On3dupACKs,receiverhaspackets2,4,6,cwnd=8,retransmitspkt1,enterFR/FRNextdupACKincrementcwndto9AfteraRTT,ACKarrivesforpkts1&2,exitFR/FR,cwnd=5,8unackedpktsNomoreACK,sendermustwaitfortimeout,1,2,time,S,time,R,3,4,5,6,8,7,1,FR/FR,10,9,0,0,0,0,0,8unackdpkts,2,清华大学研究生课程,94,NewRenoFall&Floyd96,(RFC2583),Motivation:multiplelosseswithinawindowPartialACKacknowledgessomebutnotallpacketsoutstandingatstartofFRPartialACKtakesRenooutofFR,deflateswindowSendermayhavetowaitfortimeoutbeforeproceedingIdea:partialACKindicateslostpacketsStaysinFR/FRandretransmitsimmediatelyRetransmits1lostpacketperRTTuntilalllostpacketsfromthatwindowareretransmittedEliminatestimeout,清华大学研究生课程,95,SACKMathis,Mahdavi,Floyd,Romanow96(RFC2018,RFC2883),Motivation:Reno&NewRenoretransmitatmost1lostpacketperRTTPipecanbeemptiedduringFR/FRwithmultiplelossesIdea:SACKprovidesbetterestimateofpacketsinpipeSACKTCPoptiondescribesreceivedpacketsOn3dupACKs:retransmits,halveswindow,entersFRUpdatespipe=packetsinpipeIncrementwhenlostornewpacketssentDecrementwhendupACKreceivedTransmitsa(lostornew)packetwhenpipecwndExitFRwhenallpacketsoutstandingwhenFRwasenteredareacknowledged,清华大学研究生课程,96,TCPReno(Jacobson1990),SS,time,window,CA,SS:SlowStartCA:CongestionAvoidance,清华大学研究生课程,97,TCPVegas(Brakmo&Peterson1994),SS,time,window,CA,Converges,noretransmissionprovidedbufferislargeenough,清华大学研究生课程,98,foreveryRTTifW/RTTminW/RTTbthenW-foreverylossW:=W/2,VegasCAalgorithm,清华大学研究生课程,99,Implications,Congestionmeasure=end-to-endqueueingdelayAtequilibriumZerolossStablewindowatfullutilizationApproximatelyweightedproportionalfairnessNonzeroqueue,largerformoresourcesConvergencetoequilibriumConvergesifsufficientnetworkbufferOscillateslikeRenootherwise,清华大学研究生课程,100,提纲,传输层协议概述UDP协议简介TCP协议简介与可靠性设计TCP窗口流控TCP拥塞控制机制分析Tahoe,Reno,NewReno,Sack,Vegas等源算法RED等主动队列管理算法,清华大学研究生课程,101,RED(Floyd&Jacobson1993),Idea:warnsourcesofincipientcongestionbyprobabilisticallymarking/droppingpacketsLinkalgorithmtoworkwithsourcealgorithm(Reno)Bonus:desynchronizationPreventburstylosswithbufferoverflows,清华大学研究生课程,102,RED(Floyd&Jacobson1993),time,window,host,清华大学研究生课程,103,RED,ImplementationProbabilisticallydroppacketsProbabilisticallymarkpacketsMarkingrequiresECNbit(RFC2481)PerformanceDesynchronizationworkswellExtremelysensitivetoparametersettingFailtopreventbufferoverflowas#sourcesincreases,清华大学研究生课程,104,SALLYFLOYD,2007SIGCOMMAward2005IEEEInternetAwardForcontributionstotheInternetarchitecture,particularlyintheareasofcongestioncontrol,trafficmodeling,andactivequeuemanagement.,清华大学研究生课程,105,Variant:ARED,Motivation:REDextremelysensitiveto#sourcesIdea:adaptmaxptoloadIfavg.queuemaxth,increasemaxpNoper-flowinformationneeded,清华大学研究生课程,106,Variant:FRED,Motivation:markingpacketsinproportiontoflowratedoesnotleadtofairbandwidthsharing(e.g.,adaptivevsunadaptiveflows)IdeaAflowcanbufferuptominqpacketswithoutbeingmarkedAflowthatfrequentlybuffersmorethanmaxqpacketsgetspenalizedAllflowswithbacklogsinbetweenaremarkedaccordingtoREDNoflowcanbuffermorethanavgcqpacketspersistentlyNeedper-active-flowaccounting,清华大学研究生课程,107,Variant:BLUE,Motivation:wildoscillationofREDleadstocyclicoverflow&underutilizationAlgorithmOnbufferoverflow,incrementmarkingprobOnlinkidle,decrementmarkingprob,清华大学研究生课程,108,Optimization-basedapproachtowardscongestioncontrol,Resourceallocationasoptimizationproblem:howtoallocateresources(e.g.,bandwidth)tooptimizesomeobjectivefunctionmaybenotpossiblethatoptimalityexactlyobtainedbutoptimizationframeworkasmeanstoexplicitlysteernetworktowardsdesirableoperatingpointpracticalcongestioncontrolasdistributedasynchronousimplementationsofoptimizationalgorithmsystematicapproachtowardsprotocoldesign,清华大学研究生课程,109,c1,c2,Model,Network:LinksleachofcapacityclSourcess:(L(s),Us(xs)L(s)-linksusedbysourcesUs(xs)-utilityifsourcerate=xs,x1,x2,x3,Us(xs),xs,exampleutilityfunctionforelasticapplication,清华大学研究生课程,110,OptimizationProblem,maximizesystemutility(note:allsourcesequal)constraint:bandwidthusedlessthancapacitycentralizedsolutiontooptimizationimpracticalmustknowallutilityfunctionsimpracticalforlargenumberofsourcescongestioncontrolasdistributedasynchronousalgorithmstosolvethisproblem,“system”problem,清华大学研究生课程,111,REM,MainideasDecouplecongestion&performancemeasurePriceadjustedtomatchrateandclearbufferMarkingprobabilityexponentialinprice,REM,RED,Avgqueue,1,清华大学研究生课程,112,CongestionControl,HeavytailMice-elephants,清华大学研究生课程,113,TCP&AQM,Examplecongestionmeasurepl(t)Loss(DropTail)Queuelength(RED)Queueingdelay(Vegas)Price(REM),清华大学研究生课程,114,TCP&AQM,DualitytheoryequilibriumSourceratesxi(t)areprimalvariablesCongestionmeasurespl(t)aredualvariablesCongestioncontrolisoptimizationprocessoverInternet,清华大学研究生课程,115,TCP&AQM,Controltheorystability&robustnessInternetisagiganticfeedbacksystemDistributed&delayed,清华大学研究生课程,116,提纲,传输层协议概述UDP协议简介TCP协议简介与可靠性设计TCP窗口流控TCP拥塞控制机制分析Tahoe,Reno,NewReno,Sack,Vegas等源算法RED等主动队列管理算法,清华大学研究生课程,117,总结,拥塞控制是Internet最重要的问题之一初期研究来自直观和实验TCP源算法RED等链路算法控制理论和优化理论提供了重要的分析工具,清华大学研究生课程,118,其他研究课题,高带宽延迟乘积网络无线网络组播拥塞控制TCP友好的拥塞控制,清华大学研究生课程,119,参考文献,1VanJacobson.CongestionAvoidanceandControl.InProceedingsofACMSIGCOMM,Sept.1988.2W.Stevens.TCPSlowStart,CongestionAvoidance,FastRetransmit,andFastRecoveryAlgorithms.RFC2001,Jan.1997.3L.Brakmo,S.OMalley,andL.Peterson.TCPVegas:Newtechniquesforcongestiondetectionandavoidance.InProceedingsofACMSIGCOMM,1994.4SallyFloydandVanJacobson.R

温馨提示

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

评论

0/150

提交评论