现代计算机网络讲义6(英语)+传输层课件_第1页
现代计算机网络讲义6(英语)+传输层课件_第2页
现代计算机网络讲义6(英语)+传输层课件_第3页
现代计算机网络讲义6(英语)+传输层课件_第4页
现代计算机网络讲义6(英语)+传输层课件_第5页
已阅读5页,还剩62页未读, 继续免费阅读

下载本文档

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

文档简介

Chapter6TheTransportLayer

Heartofthewholeprotocolhierarchy.Providingreliable,cost-effectivedatatransportfromthesourcetothedestination2023/8/81Chapter6TheTransportLayer

26.1TheTransportServiceServicesProvidedtotheUpperLayersConnection-orientedandconnectionlessSubnetvsHostTransportServicePrimitivesAstandardsetofprimitivesandworkonawidevarietyofnetworksBerkeleySocketsAnExampleofSocketProgramming:AnInternetFileServer2023/8/826.1TheTransportServiceServi6.1.1ServicesProvidedtotheUpperLayersThenetwork,transport,andapplicationlayers.TheTransportaddress2023/8/836.1.1ServicesProvidedtothe6.1.2TransportServicePrimitives(1)Theprimitivesforasimpletransportservice.2023/8/846.1.2TransportServicePrimit6.1.2TransportServicePrimitives(2)Astatediagramforasimple

connection

managementscheme.

2023/8/856.1.2TransportServicePrimit6.1.3BerkeleySocketsThesocketprimitivesforTCP.2023/8/866.1.3BerkeleySocketsThesock6.2ElementsofTransportProtocolsAddressingConnectionEstablishmentConnectionReleaseFlowControlandBufferingMultiplexingCrashRecovery2023/8/876.2ElementsofTransportProt6.2.1Addressing(1)TSAPs,NSAPsandtransportconnectionsAtime-of-dayserverprocesslistensatTSAP1522ofhost2towaitforanincomingcall..Anapplicationprocessonhost1issuesaCONNECTrequestspecifyingTSAP1208asthesourceandTSAP1522asthedestination.Thetimeserverprocessrespondswiththecurrenttime.Well-knownTSAP2023/8/886.2.1Addressing(1)TSAPs,NSA6.2.1Addressing(2)InitialconnectionprotocolprocessserverAsaproxyforlessheavilyusedservers.ListentoasetofportsatthesametimeTherequestedserverinheritstheexistingconnectionwiththeuser2023/8/896.2.1Addressing(2)InitialcoNameserverorDirectoryserver.servicesdoexistindependentlyoftheprocessserverUsersetsupaconnectiontothenameserver(awell-knownTSAP).Specifyingtheservicename,NameserversendsbacktheTSAPaddress.UserreleasestheconnectionwiththenameserverEstablishesanewonewiththedesiredservice.Anewservicemustregisteritselfwiththenameserver6.2.1Addressing(3)2023/8/810NameserverorDirectoryserve6.2.2ConnectionEstablishment(1)CONNECTIONREQUESTandCONNECTIONACCEPTED.Problem:networkcanlose,store,andduplicatepackets.EstablishingconnectionsinareliablewayThrow-awaytransportaddressesMakestheprocessservermodelimpossibleGiveeachconnectionaconnectionidentifieri.e.asequencenumberMaintainacertainamountofhistoryinformation,crash?Ensurethatnopacketliveslongerthansomeknowntime2023/8/8116.2.2ConnectionEstablishmentTissomesmallmultipleofthetruemaximumpacketlifetimeEachhostwithatime-of-dayclock.Theclocksatdifferenthostsneednotbesynchronized.Theclockcontinuerunningevenifthehostgoesdown.Abinarycounterincrementsatuniformintervals.Thenumberofbitsinthecountermustequalorexceedthenumberofbitsinthesequencenumbers.6.2.2ConnectionEstablishment(2)2023/8/812Tissomesmallmultipleofth6.2.2ConnectionEstablishment(3)EnsurethattwoidenticallynumberedTPDUsareneveroutstandingatthesametime.Whenaconnectionissetup,thelow-orderkbitsoftheclockareusedastheinitialsequencenumber(alsokbits,fordata).EachconnectionstartsnumberingitsTPDUswithadifferentinitialsequencenumber.Thesequencespaceshouldbesolargethatbythetimesequencenumberswraparound,oldTPDUswiththesamesequencenumberaregone.Onceconnectionestablishedontheinitialsequencenumber,anyslidingwindowprotocolcanbeusedfordataflowcontrol.2023/8/8136.2.2ConnectionEstablishment6.2.2ConnectionEstablishment(4)ForbiddenregionahostcrashesTPDUsmaynotentertheforbiddenregion.Theresynchronizationproblem.thedelayedduplicateproblemfordataTPDUssolved2023/8/8146.2.2ConnectionEstablishment6.2.2ConnectionEstablishment(5)Establishingaconnectionusingathree-wayhandshake.(CR-CONNECTIONREQUEST)ControlTPDUsmayalsobedelayedNormaloperationOldCONNECTIONREQUESTappearingoutofnowhere.DuplicateCONNECTIONREQUESTandduplicateACK.2023/8/8156.2.2ConnectionEstablishment6.2.3ConnectionRelease(1).Releasingaconnectioniseasierthanestablishingone,but...AsymmetricreleaseAbruptdisconnectionwithlossofdata2023/8/8166.2.3ConnectionRelease(1).Re6.2.3ConnectionRelease(2)SymmetricreleaseTreatstheconnectionastwounidirectionalconnectionsRequireseachonetobereleasedseparatelyThetwo-armyproblem.noprotocolexiststhatworks2023/8/8176.2.3ConnectionRelease(2)Sy6.2.3ConnectionRelease(3)Releasingaconnectionusingathree-wayhandshake(a)Normalcaseofathree-wayhandshake.(b)finalACKlost.2023/8/8186.2.3ConnectionRelease(3)Re6.2.3ConnectionRelease(4)(c)Responselost.

(d)ResponselostandsubsequentDRslost.6-14,c,d2023/8/8196.2.3ConnectionRelease(4)(c6.2.4Flowcontrolandbuffering(1)DifferencebetweenLinklayerandTransferLayerArouterusuallyhasfewlines,ahostmayhavenumerousconnectionsandneedsmorebuffer.Buffersize,widevariationinTPDUsizeDynamicallyadjusttheirbufferallocations2023/8/8206.2.4Flowcontrolandbufferi6.2.5FlowControlandBuffering(2)Dynamicbufferallocation.2023/8/8216.2.5FlowControlandBufferi6.2.5Multiplexing(a)Upwardmultiplexing.Ifonlyonenetworkaddressisavailableonahost(b)Downwardmultiplexing.needsmorebandwidth2023/8/8226.2.5Multiplexing(a)Upwardm6.2.6CrashRecovery(1)Whennetworkorroutercrashes,recoveryisstraightforwardDatagramservicesConnectionorientedservices:buildinganewconnectionandretransferfromnotreceivedTPDUHostCrashesAtrouble2023/8/8236.2.6CrashRecovery(1)Whenn6.2.6CrashRecovery(2)AexampleClientissendingafiletoserverusingastop-and-waitprotocolTheserverpassestheincomingTPDUstothetransportuser,onebyone.Servercrashesandreboots,reinitializesitstables,sonolongerknowspreciselywhereitwas.ServersendsabroadcastTPDUtoallotherhosts,requestsitsclientsinformthestatusofallopenconnections.2023/8/8246.2.6CrashRecovery(2)Aexa6.2.6CrashRecovery(3)Clientcanbeinoneoftwostates:OneTPDUoutstanding,S1OrnoTPDUoutstanding,S0WhethertoretransmitthemostrecentTPDU?Eventsarepossibleattheserver:Sendinganacknowledgement(A),Writingtotheoutputprocess(W),Crashing(C).2023/8/8256.2.6CrashRecovery(3)Clien6.2.6CrashRecovery(4)Differentcombinationsofclientandserverstrategy.Therearealwayssituationswheretheprotocolfailstorecoverproperly.RecoveryfromlayerNcrashcanonlybedonebylayerN+12023/8/8266.2.6CrashRecovery(4)Differ6.3ASimpleTransportProtocolTheExampleServicePrimitivesTheExampleTransportEntityTheExampleasaFiniteStateMachine2023/8/8276.3ASimpleTransportProtoco6.3.1TheExampleServicePrimitivesCONNECTDuringthecall,thecallerisblockedIftheconnectionsucceeds,thecallerisunblockedandcanstarttransmittingdata.OrrejectedandthecallerisunblockedandgivenanerrorreturnLISTENToacceptincomingcallsTheprocessthenblocksuntilsomeremoteprocessattemptstoestablishaconnectiontoitsTSAP.DISCONNECTWhenbothsideshavedisconnected,theconnectionisreleased.Asymmetricdisconnectionmodel.2023/8/8286.3.1TheExampleServicePrim6.3.1Theexampleserviceprimitives(2)SENDAnactivecall,transmitsdataRECEIVEApassivecall,blocksuntilaTPDUarrives.Eachprimitivecorrespondstoalibraryprocedurethatexecutestheprimitive.Theparameterslibraryprocedures:connum=LISTEN(local)connum=CONNECT(local,remote)status=SEND(connum,buffer,bytes)status=RECEIVE(connum,buffer,bytes)status=DISCONNECT(connum)2023/8/8296.3.1Theexampleserviceprim6.3.2TheExampleTransportEntity(1)Usingaconnection-oriented,reliablenetworkserviceProceduresto_netandfrom_net,parametersConnectionidentifier,whichmapsontonetworkvirtualcircuitsQbits,indicatecontrolmessage,onlyone(CREDIT)inexampleMbits,moredatainthenextpacketPackettypeApointertothedataitselfAnintegergivingthenumberofbytesofdata.2023/8/8306.3.2TheExampleTransportEn6.3.2TheExampleTransportEntity(2).Thenetworklayerpacketstypeusedinexample

2023/8/8316.3.2TheExampleTransportEn6.3.2TheExampleTransportEntity(3)EachconnectionisinoneofsevenstatesIdle–Connectionnotestablishedyet.Waiting–CONNECThasbeenexecuted,CALLREQUESTsent.Queued–ACALLREQUESThasarrived;noLISTENyet.Established–Theconnectionhasbeenestablished.Sending–Theuseriswaitingforpermissiontosendapacket.Receiving–ARECEIVEhasbeendone.Disconnecting–aDISCONNECThasbeendonelocally.2023/8/8326.3.2TheExampleTransportEn6.3.2TheExampleTransportEntity(4)Transitionsoccurswhenthefollowingeventsoccuraprimitiveisexecutedapacketarrivesthetimerexpires.Aflowcontrolmechanismdifferentfromtheslidingwindow.WhenRECEIVEiscalled,aspecialcreditmessageissenttothesendingmachineWhenSENDiscalled,thetransportentitycheckstoseeifacredithasarrivedonthespecifiedconnection.Ifso,themessageissentandthecreditdecremented;ifnot,thetransportentityputsitselftosleepuntilacreditarrives2023/8/8336.3.2TheExampleTransportEnTheexampleprotocolingraphicalform.2023/8/834Theexampleprotocolingraphi2023/8/8352023/7/31352023/8/8362023/7/31362023/8/8372023/7/31372023/8/8382023/7/31382023/8/8392023/7/31392023/8/8402023/7/31402023/8/8412023/7/31412023/8/8422023/7/31426.3.3TheExampleasaFiniteStateMachine(1)TheexampleprotocolasafinitestatemachineEachentryhasanpredicate,anaction,andthenewstate.BlankentriescorrespondtoimpossibleorinvalideventsTheadvantageofrepresentingtheprotocolasamatrix

Itiseasiertosystematicallycheckeachcombinationofstateandeventtoseeifanactionisrequired.givesamuchmoreregularandsystematicdesignprotocoldescription2023/8/8436.3.3TheExampleasaFinite6.3.3TheExampleasaFiniteStateMachine(2)2023/8/8446.3.3TheExampleasaFiniteCongestion:toomanypacketsintothenetworktooquicklyintransportlayerCongestioncontrolmechanismsDesirablebandwidthallocationRegulatingthesendingrate6.4CongestionControlCongestion:toomanypacketsi456.4.1DesirableBandwidthAllocation(1)(a)Goodputand(b)delayasafunctionofofferedloadEfficiencyallocation:tousealloftheavailablenetworkcapacityPower=load(goodput)/delay6.4.1DesirableBandwidthAllo46Fairness:howtodividebandwidthbetweensendersMax-minFairnessallocationIfthebandwidthgiventooneflowcannotbeincreasedwithoutdecreasingthebandwidthgiventoanotherflow6.4.1DesirableBandwidthAllocation(2)Max-minbandwidthallocationforfourflowsFairness:howtodividebandwi476.4.1DesirableBandwidthAllocation(3)ChangingbandwidthallocationovertimeConvergenceToconvergequicklytotheidealoperatingpoint6.4.1DesirableBandwidthAllo486.4.2RegulatingtheSendingRate(1)Thesendingrateislimitedbyreceiverandnetwork6.4.2RegulatingtheSendingR496.4.2RegulatingtheSendingRate(2)TheformofthefeedbackreturnedbythenetworkExplicitorimplicitPreciseorimpreciseSomecongestioncontrolprotocols6.4.2RegulatingtheSendingR50AdditiveIncreaseMultiplicativeDecrease(AIMD)controllaw.User1’sallocationUser2’sallocation6.4.2RegulatingtheSendingRate(3)AdditiveIncreaseMultiplicati516.4.3TCPCongestionControl(1)CongestionWindowinTCPTahoeSlowstartfollowedbyadditiveincrease2023/8/8526.4.3TCPCongestionControl(16.4.3TCPCongestionControl(2)FastrecoveryandthesawtoothpatternofTCPReno.6.4.3TCPCongestionControl(536.4.4WirelessNetworksPacketloss,acongestionsignalortransmissionerrors?Somewirelesslinkshavealonground-triptimes,suchassatellites.Wirelesslinkshavevariablecapacity.2023/8/8546.4.4WirelessNetworksPacket6.5TheInternetTransportProtocols:TCP*IntroductiontoTCPTheTCPServiceModelTheTCPProtocolTheTCPSegmentHeaderTCPConnectionEstablishmentTCPConnectionReleaseTCPConnectionManagementModelingTCPTransmissionPolicyTCPCongestionControlTCPTimerManagementWirelessTCPandUDPTransactionalTCP2023/8/8556.5TheInternetTransportPro6.6PerformanceIssuesPerformanceProblemsinComputerNetworksNetworkPerformanceMeasurementSystemDesignforBetterPerformanceFastTPDUProcessingProtocolsforfuturehigh-performancenetworks2023/8/8566.6PerformanceIssuesPerformaCongestion,causedbyresourceoverloadsStructuralresourceimbalanceSynchronousoverloadsPoorsystemtuningIncorrecttimeoutssettingBandwidth-delayproductThewindowmustbeatleastaslargeasthebandwidth-delayproductTime-criticalapplications6.6.1PerformanceProblemsinComputerNetworks(1)2023/8/857Congestion,causedbyresource6.6.1PerformanceProblemsinComputerNetworks(2)Thebandwidth-delayproductThestateoftransmitting(a)Att=0(b)After500μsec(c)After20msec(d)after40msec.2023/8/8586.6.1PerformanceProblemsin6.6.2NetworkPerformanceMeasurement(1)Thebasicloopforimprovingnetworkperformance.Measurerelevantnetworkparameters.howlongaactivitytakeshowoftensomeeventhashappenedtheamountofsomethingTrytounderstandwhatisgoingon.Changeoneparameter.2023/8/8596.6.2NetworkPerformanceMeasWhenmeasuringnetworkperformance,payattentionto:SamplesizeislargeenoughSamplesarerepresentativeBecarefulwhenusingacoarse-grainedclockNothingunexpectedisgoingonduringyourtestsCachingcanwreakhavocwithmeasurementsUnderstandwhatyouaremeasuringBecarefulaboutextrapolatingtheresults6.6.2NetworkPerformanceMeasurement(2)2023/8/860Whenmeasuringnetworkperform6.6.3SystemDesignforBetterPerformanceRules:CPUspeedismoreimportantthannetworkspeed.Reducepacketcounttoreduceso

温馨提示

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

评论

0/150

提交评论