版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
ComputerNetworks
Lecture13JingXu(徐晶)Dept.ofElectronicsandInformationEng.HuazhongUniversityofScienceandTechnologyDec.2011-2-Review:RequirementAnalysisWhatweexpectfromanetwork?Requirement1:connectivityAnestedInterconnectionofnodesandlinksRequirement2:cost-effectiveconnectivitySharingthishardwarebasethroughtheuseofstatisticalmultiplexingThisresultsinapacket-switchednetworkRequirement3:process-to-processcommunicationservices-3-Problem:GettingProcessestoComm.NetworkLayerTransportLayerApplicationLayerLinkLayerConnectivityamongHostsConnectivityatLinklayerleveldirectlinkorswitchednetworksConnectivityatnetworklayerlevel–internetworkinghost-to-hostprotocolsheterogeneityandscalabilityconcernswithinternetworkingIPservicemodelandprotocols?CommonServices?ProbleminChapter5:GettingProcessestoCommunicate-4--5-Lecture13Chapter5End-to-EndProtocolsProblem:GettingProcessestoCommunicate5.1SimpleDemultiplexer(UDP)5.2ReliableByteStream(TCP)5.3RemoteProcedureCall5.4Real-timetransportprotocol(RTP)5.5Performance5.6Summary-6-TransportLayer:AboveNetworkLayerTransportLayerApplicationLayerLinkLayerWhatapplication-levelprocessesaboveexpect?guaranteesmessagedeliverydeliversmessagesinthesameordertheyaresentdeliversatmostonecopyofeachmessagesupportsarbitrarilylargemessagessupportssynchronizationbetweenthesenderandthereceiverallowsthereceivertoapplyflowcontroltothesendersupportsmultipleapplicationprocessesoneachhost-7-TransportLayer:BelowNetworkLayerTransportLayerApplicationLayerLinkLayerWhatthenetworkbelowmayprovideunreliablepacketdeliverylossreorderingduplicatearbitrarilyvariabledelayfinitesizeofpacketWhatapplication-levelprocessesaboveexpect?guaranteesmessagedeliverydeliversmessagesinthesameordertheyaresentdeliversatmostonecopyofeachmessagesupportsarbitrarilylargemessages......-8-TransportLayer:ChallengesNetworkLayerTransportLayerApplicationLayerLinkLayerWhatthenetworkbelowmayprovideunreliablepacketdelivery:loss,reordering,duplicatearbitrarilyvariabledelayfinitesizeofpacketWhatapplication-levelprocessesaboveexpectmultipleapplicationprocessesreliablemessagedeliveryflowcontrolmessagelengthEnd-to-endprotocolsChallengesturndeficientaspectsofunderlyingnetworksintothehigh-levelserviceexpectedbyapplicationprocesses-9-TransportLayerProtocolsThischapterlooksfourrepresentativeservicesasimpleasynchronousdemultiplexingserviceUDP(UserDatagramProtocol)areliablebyte-streamserviceTCP(TransmissionControlProtocol)arequest/replyserviceRemoteProcedureCall(RPC)SunRPCandDCE-RPCareal-timetransmissionserviceRTP-10-Lecture13Chapter5End-to-EndProtocolsProblem:GettingProcessestoCommunicate5.1SimpleDemultiplexer(UDP)5.2ReliableByteStream(TCP)5.3RemoteProcedureCall5.4Real-timetransportprotocol(RTP)5.5Performance5.6SummaryUserDatagramProtocol(UDP)OneoftwotransportlayerprotocolsinTCP/IPprotocolstackUDP:developedin1980FirstTCPin1974,IPv4in1981FeaturesuponIP,justaddsalevelofdemultiplexingmessage-orientedconnectionlessnoguaranteetoreliablemessagedeliverynoflowcontrol-11-TwoBasicTransportFeaturesDemultiplexing:portnumbersErrordetection:checksums12Webserver(port80)ClienthostServerhostEchoserver(port7)Servicerequestto:80OSClientIPpayloaddetectcorruptionRequestfrom:3456Demuxtable(“5tuple”)Socket<*,*,,80,TCP>5<,3456,,80,TCP>6UDPDemultiplexing-14-UDPHeaderFieldsSrcPortandDstPort:identifyapplicationprocessesChecksum:optional,computedonthepayloadandpseudoheader-15-Port:PublicserviceHowaprocesslearnstheporttowhichitwantstosendamessage?Commonapproachisfortheservertoacceptmessagesatawell-knownportDNS,port53SNMP,port25PortMapperTheclientandserverusethewell-knownporttoagreeonsomeotherportthattheywilluseforsubsequentcommunication,leavingthewell-knownportfreeforotherclientsAdvantagesofUDPControloverwhatdataissentandwhenAssoonasanapplicationprocesswritesintothesocket…UDPwillpackagethedataandsendthepacketNodelayforconnectionestablishmentUDPjustsendsmessageswithoutcontactingthehostfirstPaysoffwhenhostisexpectingmessagesanywayStatelessconnectionNoallocationofbuffers,parameters,sequence#s,etc.…makingiteasiertohandlemanyactiveclientsatonce(thinkofservers)SmallpacketheaderoverheadUDPheaderisonlyeight-byteslong16DisadvantagesofUDP“Besteffort”networkingNoguaranteedeliveryofmessagestodestinationhost,noordereddeliveryNocongestioncontrolNoadaptationtothecongestionconditionsofthenetworkSuppressesTCPflowsIncaseofcongestionTCPflowswillbackoffwhileUDPwillstayonthesamerateCanbeusedasanattackmethod(UDPfloodingattack)17ApplicationsUtilizingUDPSimplequeryprotocolslikeDomainNameSystem(DNS)DelayforconnectionestablishmentistoolargeQueriesaresmallandUDPaddsasmalloverhead(header)EasiertohaveapplicationretransmitifneededUsuallymayfitwithinaUDPpacketsonoout-of-orderdangerMultimediaApplicationsRetransmittinglost/corruptedpacketsisnotworthwhileBythetimethepacketisretransmitted,it’stoolateE.g.,telephonecalls,videoconferencing,gamingCertainlossisacceptablesinceVoice,picture,etcarestilldiscernable18-19-Lecture13Chapter5End-to-EndProtocolsProblem:GettingProcessestoCommunicate5.1SimpleDemultiplexer(UDP)5.2ReliableByteStream(TCP)5.3RemoteProcedureCall5.4Real-timetransportprotocol(RTP)5.5Performance5.6Summary-20-TransmissionControlProtocol(TCP)OneoftwotransportlayerprotocolsinTCP/IPprotocolstackEarlyTCPTCP/IPFirstTCPin1974,IPv4in1981MostofapplicationsuseTCPProvidesRELIABLEbytestreamservicestoapplicationprocessesByteStreamingbyTCPTCPdoesnotdistinguishboundariesamongthemessageswrittenbyapplicationprocesses,buttransmitsdataintheformofsegmentApplicationprocessWritebytesTCPSendbufferSegmentSegmentSegmentTransmitsegmentsApplicationprocessReadbytesTCPReceivebuffer■■■TCPServiceModelConnectionorientedendhostsneedtoestablishaconnectionbeforedataexchangefull-duplex:datacanbeexchangedalongbothdirectionsReliabilityguaranteeddatadeliverydataisdeliveredinthecorrectorderFlowcontroltokeepthesenderfromoverloadingthereceiverflowcontrolalsoappearsinlinklayerCongestioncontroltokeepthesenderfromoverloadingthenetworkcongestioncontrolinnetworkandtransportlayer-22-Flowvs.CongestionControlReceiverbufferoverflowRouterbufferoverflowLecture135.2ReliableByteStream(TCP)5.2.1End-to-EndIssues5.2.2SegmentFormat5.2.3ConnectionEstablishmentandTermination5.2.4SlidingWindowRevisited5.2.5TriggeringTransmission5.2.6AdaptiveRetransmission5.2.7RecordBoundaries5.2.8TCPExtensions5.2.9AlternativeDesignChoices-24--25-Reviewofreliablecommunication:
OriginalStop-and-waitAlgorithmTimeouttriggerTimeouttriggerTwofundamentalmethodstoprovidereliablecommunication:(1)ACK(acknowledgement)(2)Timeout-26-Reviewofreliablecommunication:
OriginalSlidingWindowAlgorithmTimeouttriggerTimeouttriggerACKSenderWindowReceiverWindowSeqNum012Morecomponentsrequiredinslidingwindowalgorithm(3)SenderWindow/ReceiverWindow(4)DesignedSeqNumReliabletransmissionservicesBasicsolutionofReliabletransmissionservicesACK(acknowledgement)TimeoutLinklayerARQ,SlidingWindowAlgorithmTransportlayerWhatarethedifferences?DoesTCPDuplicateLowerLayerServices?-27--28-ChallengesofTCPReliabletrans.TimeouttriggerTimeouttriggerACKSenderWindowReceiverWindowSeqNum012Challenge1:HowtosetuptheConnection,Negotiationonstart/endBackgroundbelow:IPprovideconnection-less,un-reliableservices,runningacrossheterogenicnetworks,connectingdiversehosts-29-ChallengesofTCP-1Problem:ConnectionNotrequiredinasinglephysicallinkthatalwaysconnectsthesametwocomputersTCPshouldsupportlogicalconnectionsbetweenprocessesthatarerunningonanytwocomputersintheInternet.MotivationTCPneedsanexplicitconnectionstablishmentphaseTCPalsohasanexplicitconnectionteardownphase-30-ChallengesofTCPReliabletrans.TimeouttriggerTimeouttriggerACKSenderWindowReceiverWindowSeqNum012Backgroundbelow:IPprovideconnection-less,un-reliableservices,runningacrossheterogenicnetworks,connectingdiversehostsChallenge2:Timeoutproblem,Whentoretrans?EstimationonVariableRTT-31-ChallengesofTCP-2Problem:TimeoutasinglephysicallinkthatalwaysconnectsthesametwocomputershasafixedRTTTCPconnectionsarelikelytohavewidelydifferentround-triptimesDifferentdistance:SanFranciscotoBoston,RTT100ms,twohostsinthesameroom,RTT1msVariationsintheRTT:SanFranciscotoBoston,RTT100msat3a.m.,RTT500msat3p.m.Motiviationthetimeoutmechanisminslidingwindowalgorithmthattriggersretransmissionsmustbeadaptive.-32-ChallengesofTCPReliabletrans.TimeouttriggerTimeouttriggerACKSenderWindowReceiverWindowSeqNum012Challenge3:ReorderingPacketslossanddelayBackgroundbelow:IPprovideconnection-less,un-reliableservices,runningacrossheterogenicnetworks,connectingdiversehostsChallengesofTCP-3Problem:ReorderingReorderingisnotpossibleonapoint-to-pointlinkReorderinginrealmultiplehopInternetIPthrowspacketsawayaftertheirTTLexpiresMotivationTCPassumesthateachpackethasamaximumlifetime,maximumsegmentlifetime(MSL),currentrecommendedsettingis120secondsTCPhastobepreparedforveryoldpacketstosuddenlyshowupatthereceiver,potentiallyconfusingtheslidingwindowalgorithm-33--34-ChallengesofTCPReliabletrans.TimeouttriggerTimeouttriggerACKSenderWindowReceiverWindowSeqNum012Backgroundbelow:IPprovideconnection-less,un-reliableservices,runningacrossheterogenicnetworks,connectingdiversehostsChallenge4:FlowcontrolDiversedelay*bandwidth,bufferChallengesofTCP-4Problem:FlowcontrolBufferinslidingwindowcanbedesignedinpoint-to-pointlinkBufferdesignisdifficultintransmissionoverInterentdelay×bandwidthproductisunknownbuffermaybesharedamonghundredsofTCPconnectionsMotivationTCPmustincludeamechanismthateachsideusesto“l(fā)earn”whatresources(e.g.,howmuchbufferspace)theothersideisabletoapplytotheconnection.==>flow-controlissue.-35-ChallengesofTCPReliabletrans.-36-Cancongestionbesolvedlocally?ToomanyTCPconnectionsbringtoomuchtraffictotheintermediaterouterChallengesofTCP-5Problem:CongestioncontrolCongestionisnottheprobleminpoint-to-pointlinkCongestionwilloccurinInterentsendingsideofaTCPconnectionhasnoideawhatlinkswillbetraversedtoreachthedestinationdatabeinggeneratedbymanydifferentsourcesmightbetryingtotraversethissameslowlinkMotivationTCPhastorealisethecongestioncontrolalgorithmforthenetwork-37--38-SummaryofthechallegesChallengesofTCPcomparingwiththeReliabletransmissioninlinklayerConnectionTimeoutReorderingFlowcontrolCongestioncontrolCanwesolveitbyhop-to-hopsolution?Bytheendhost??Bytheintermediaterouter??-39-hop-to-hopvs.end-to-endX.25networksrunningonvirtualcircuitswitchingnetworktheunderlyingnetworkisassumedtobesomehowreliablemessagesaredeliveredreliablyandinorderbetweeneachpairofnodesalongthepathusetheslidingwindowprotocolonahop-by-hopbasisTCPrunningondatagramswitchingnetworktheunderlyingIPnetworkisassumedtobeunreliableandtodelivermessagesoutoforderTCPusestheslidingwindowalgorithmonanend-to-endbasistoprovidereliable/ordereddelivery-40-hop-to-hopvs.end-to-endAsequenceofhop-by-hopguaranteesdoesnotnecessarilyadduptoanend-to-endguaranteeEnd-to-endargumentAfunctionshouldnotbeprovidedinthelowerlevelsofthesystemunlessitcanbecompletelyandcorrectlyimplementedatthatlevelItisstillnecessarytoprovidetrueend-to-endcheckstoguaranteereliable/orderedservice,eventhoughthelowerlevelsofthesystemalsoimplementthatfunctionality.1981Lecture135.2ReliableByteStream(TCP)5.2.1End-to-EndIssues5.2.2SegmentFormat5.2.3ConnectionEstablishmentandTermination5.2.4SlidingWindowRevisited5.2.5TriggeringTransmission5.2.6AdaptiveRetransmission5.2.7RecordBoundaries5.2.8TCPExtensions5.2.9AlternativeDesignChoices-41--42-TCPSegmentsTCPsendsasegmentwhentheamountofdatareachesthemaximumsegmentsize(MSS)triggeredbytheapplication,e.g.pushoperationperiodictimerexpiresChoiceofMSSmakesresultedIPpacketnotbefragmentedMSS=MTU–IPheadersize–TCPheadersize-43-TCPPortsSimilartoUDP,TCPusesportnumberstoidentifytheclientandserverapplicationsWellknownportsareusedtoidentifyserverapplicationsexamples:HTTP(80),FTP(21)wellknownportnumbersarebetween1and1023Clientchoosesadifferentportnumberforeachapplicationprocesstheseportsareknownephemeralports(shortlived)usuallybetween1024and5000EachTCPconnectionisuniquelyidentifiedbya4-tuple<SrcIP,SrcPort,DstPort,DstIP>-44-TCPHeaderusedbysliding-windowbasedflowcontrolFlagsSYN,FIN–establishing/terminatingaTCPconnectionACK–setwhenAcknowledgementfieldisvalidURG–urgentdataPUSH–don’twaittofillsegmentRESET–abortconnectionLecture135.2ReliableByteStream(TCP)5.2.1End-to-EndIssues5.2.2SegmentFormat5.2.3ConnectionEstablishmentandTermination5.2.4SlidingWindowRevisited5.2.5TriggeringTransmission5.2.6AdaptiveRetransmission5.2.7RecordBoundaries5.2.8TCPExtensions5.2.9AlternativeDesignChoices-46-ConnectionEstablishmentDonebeforedatatransferBasedon3-wayhandshaketheexchangeofthreemessagesbetweentwoTCPpeerstoagreeontheinitialsequencenumbersoftwoTCPpeersTheinitialsequencenumberisrandomlygeneratedtheAcknowledgmentisalwaysonelargerthanthepeersent-47--48-3-WayHandshakeActiveparticipant(client)(server)SYN,SequenceNum=xACK,Acknowledgment=y+1Acknowledgment=x+1SYN+ACK,SequenceNum=y,Three-wayhandshaketoestablishconnectionHostAsendsaSYN(open)tothehostBHostBreturnsaSYNacknowledgment(SYNACK)HostAsendsanACKtoacknowledgetheSYNACK-49-ConnectionTerminationTwoindependenthandshakesterminatingunidirectionalhalfoftheconnectionClosingtheconnectionFinish(FIN)tocloseandreceiveremainingbytesAndotherhostsendsaFINACKtoacknowledgeReset(RST)tocloseandnotreceiveremainingbytesTCPStateTransition(State,Event/Action)Lecture135.2ReliableByteStream(TCP)5.2.1End-to-EndIssues5.2.2SegmentFormat5.2.3ConnectionEstablishmentandTermination5.2.4SlidingWindowRevisited5.2.5TriggeringTransmission5.2.6AdaptiveRetransmission5.2.7RecordBoundaries5.2.8TCPExtensions5.2.9AlternativeDesignChoices-51--52-TCPSlidingWindowAlgorithmTCP’svariantofslidingwindowalgorithmcanperformreliabledeliveryofdatain-orderdeliveryofdataflowcontrol(basedonvariedAdvertisedWindowfield)Slidingwindowalgorithmwithvariedreceivingwindowsizethereceiveradvertisesareceivingwindowsizetothesender,whichisvariedovertimeratherthanfixedthereceivingwindowsizeisinformedusingtheAdvertisedWindowfieldintheTCPheader53acknowledgedsenttobesentoutsidewindowSourcePortDest.PortSequenceNumberAcknowledgmentHL/FlagsAdvertisedWinD.ChecksumUrgentPointerOptions..SourcePortDest.PortSequenceNumberAcknowledgmentHL/FlagsAdvertisedWinD.ChecksumUrgentPointerOptions..PacketSentPacketReceivedAppwriteWindowFlowControl:SendSide-54-TCPSlidingWindowAlgorithm1.Reliableandin-orderdeliveryofdataLastByteAcked≤LastByteSentLastByteSent≤LastByteWrittenLastByteRead≤NextByteExpectedNextByteExpected≤LastByteRcvd+1-55-TCPSlidingWindowAlgorithm2.FlowcontrolFlowcontrol:asendersendsdataasmuchaspossiblebutwithoutoverloadingthereceiverAdjustthesender’swindowbyreceiver’srequirementratherthanwaitingfortheACKmsgs.AdvertisedWindowfieldinthereceiver'sview:LastByteReadReceiver’sviewLastByteRcvdNextByteExpectedLastByteRcvd-LastByteRead≤MaxRcvBufferAdvertisedWindow=MaxRcvBuffer–((NextByteExpected-1)-LastByteRead)-56-TCPSlidingWindowAlgorithm2.Flowcontrol(cont.)AdvertisedWindowfieldinthesender'sview:LastByteSent-LastByteAcked≤AdvertisedWindowEffectiveWindow=AdvertiseWindow–(LastByteSent–LastByteAcked)LastByteWrittenLastByteSentLastByteAckedSender’sviewLastByteWritten–LastByteAcked≤MaxSendBuffer-57-TCPSlidingWindowAlgorithm
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2026年石家莊工商職業(yè)學(xué)院單招職業(yè)技能測試題庫參考答案詳解
- 2026年新疆喀什地區(qū)單招職業(yè)傾向性測試題庫及完整答案詳解1套
- 2026年菏澤學(xué)院單招職業(yè)適應(yīng)性測試題庫及答案詳解一套
- 2026年天津交通職業(yè)學(xué)院單招職業(yè)傾向性測試題庫及答案詳解1套
- 2026年河北東方學(xué)院單招職業(yè)適應(yīng)性測試題庫附答案詳解
- 2026年廣東建設(shè)職業(yè)技術(shù)學(xué)院單招職業(yè)適應(yīng)性考試題庫及完整答案詳解1套
- 遼寧聯(lián)考面試題目及答案
- 2025年中國科學(xué)院高能物理研究所AI應(yīng)用工程師崗位招聘備考題庫完整答案詳解
- 元陽縣2026年教育體育系統(tǒng)事業(yè)單位校園公開招聘備考題庫及答案詳解參考
- 2025年發(fā)展研究院招聘公共績效與信息化研究中心項目主管崗位備考題庫有答案詳解
- 2025年廣西職業(yè)院校技能大賽高職組(康復(fù)治療技術(shù)賽項)參考試題庫及答案
- 國家開放大學(xué)行管??啤缎姓M織學(xué)》期末紙質(zhì)考試總題庫(2025春期版)
- 中國慢性冠脈綜合征患者診斷及管理指南2024版解讀
- 目標(biāo)管理Smart原則培訓(xùn)課件
- 大數(shù)據(jù)與人工智能營銷知到智慧樹章節(jié)測試課后答案2024年秋南昌大學(xué)
- 2024年1月黑龍江省普通高中學(xué)業(yè)水平合格性考試 語文 含答案
- iso28000-2022供應(yīng)鏈安全管理手冊程序文件表單一整套
- 鐵路沿線垃圾降解清理方案
- DB52T 1423-2019 熱源塔熱泵系統(tǒng)
- 電機學(xué)完整全套教學(xué)課件2
- 2024年中國紅芪市場調(diào)查研究報告
評論
0/150
提交評論