IP網(wǎng)絡(luò)技術(shù)基礎(chǔ)課件(英文)_第1頁
IP網(wǎng)絡(luò)技術(shù)基礎(chǔ)課件(英文)_第2頁
IP網(wǎng)絡(luò)技術(shù)基礎(chǔ)課件(英文)_第3頁
IP網(wǎng)絡(luò)技術(shù)基礎(chǔ)課件(英文)_第4頁
IP網(wǎng)絡(luò)技術(shù)基礎(chǔ)課件(英文)_第5頁
已閱讀5頁,還剩36頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1End-to-EndProtocolOutline

SimpleDemultiplexer(UDP)ReliableByte-Stream(TCP)ConnectionEstablishment/TerminationSlidingWindowRevisitedFlowControl1End-to-EndProtocolOutline2TheLayeredNetworkStackPhysicalLayerApplicationLayerTransportLayer(TCP/UDP)NetworkLayer(IP)DataLinkLayerInternetStackPhysicalLayerSessionLayerTransportLayerNetworkLayerDataLinkLayerOSIStackPresentationLayerApplicationLayer2TheLayeredNetworkStackPhys3End-to-EndProtocolsUnderlyingbest-effortnetworkdropmessagesre-ordersmessagesdeliversduplicatecopiesofagivenmessagelimitsmessagestosomefinitesizedeliversmessagesafteranarbitrarilylongdelayCommonend-to-endservicesguaranteemessagedeliverydelivermessagesinthesameordertheyaresentdeliveratmostonecopyofeachmessagesupportarbitrarilylargemessagessupportsynchronizationallowthereceivertoflowcontrolthesendersupportmultipleapplicationprocessesoneachhost3End-to-EndProtocolsUnderlyin4Transportlayerusesthenetworklayer,tosendandreceivedata.TransportProtocolDataUnit(TPDU)EachlayeraddsitspartTCPsegment,IPpacket,DatalinkframeOverviewofTransportLayer

4Transportlayerusesthenetw5OverviewofTransportLayer

(cont.)5OverviewofTransportLayer

(6Twotypesoftransportservicesconnection-orientedconnectionlessEnd-to-EndProtocols6Twotypesoftransportservic7SimpleDemultiplexor(UDP)TransportprotocolaboveIPsimplypassesIPthroughtotheupper(application)layersUnreliableandunordereddatagramserviceAddsmultiplexingNoflowcontrolEndpointsidentifiedbyportsservershavewell-knownportsFTP-21,Telnet-23,http-80,pop-110,DNS-537SimpleDemultiplexor(UDP)Tra8UDP“Features”Givesapp’stheoptiontosendpacketsunreliablyUsefulformulticastapp’sLowdelaytransmissionforinteractivetext/audio/videoMinimalconnectionstate:“connectionless”MinimalconnectionsetuptimeNocongestioncontrol–blastawayBuildownapplication-levelprotocolontopofUDP8UDP“Features”Givesapp’sthe9UDPUDPHeader:Only8bytes!(vs.IP20bytesheader)SourceportforUDPsendingprocessDestportforUDPreceivingprocessLengthinbytesofUDPheader+payloadChecksumoverUDPheader+payloadSourcePort#Dest.Port#UDPlengthChecksum1632UDPpayloaddataUDPpayloadIPhdrUDPhdrErrorDetection9UDPUDPHeader:SourcePort#De10ErrorDetectionWhyisthereerrordetectioninthetransportlayergiventhatthesamefunctionisprovidedbythedatalinklayerReliabletransmissionalongeachlinkisstillnoguaranteeoferror-freetransmissionbetweenthesourceandthedestination.10ErrorDetectionWhyisthere11ErrorDetection(cont.)11ErrorDetection(cont.)12TCPOverviewConnection-orientedTCPprovides:Reliabledeliveryofpackets,Streamorin-orderdeliveryApplicationprocessWritebytesTCPSendbufferSegmentSegmentSegmentTransmitsegmentsApplicationprocessReadbytesTCPReceivebuffer………Fullduplex Flowcontrol:keepsenderfromoverrunningreceiverCongestioncontrol:keepsenderfromoverrunningnetwork12TCPOverviewConnection-orien13TransportControlProtocolProvidesareliableend-to-endbytestreamoveranunreliablenetworksuchasIP.Providesconnectionorienteduser-to-userserviceconnectionmanagementNointermediatenodesareinvolvedinconnectionestablishment.TCPserviceisobtainedbyhavingboththesenderandreceivercreateendpointscalledsockets.Eachsocketisassociated(bound)withIPaddressofthehost16-bitnumberlocaltothehostcalledaport13TransportControlProtocolPr14TransportControlProtocol

(cont.)14TransportControlProtocol

(15DataLinkVersusTransportPotentiallyconnectsmanydifferenthostsneedexplicitconnectionestablishmentandterminationPotentiallydifferentRTTneedadaptivetimeoutmechanismPotentiallylongdelayinnetworkneedtobepreparedforarrivalofveryoldpacketsPotentiallydifferentcapacityatdestinationneedtoaccommodatedifferentnodecapacityPotentiallydifferentnetworkcapacityneedtobepreparedfornetworkcongestion15DataLinkVersusTransportPo16TCPSegmentAsegmentconsistsofafixed20-byteheader(plusanoptionalpart)followedbyzeroormoredatabytes16TCPSegmentAsegmentconsist17TCPSegment(cont.)Sourceport(16bits)–Specifiestheapplicationsendingthesegment.17TCPSegment(cont.)Sourcepo18TCPSegment(cont.)Destinationport(16bits)–Identifiestheapplicationtowhichthesegmentissent.18TCPSegment(cont.)Destinati19TCPSegment(cont.)Sequencenumber(32bits)–Containsthesequencenumberofthefirstbyteofdata.19TCPSegment(cont.)Sequence20TCPSegment(cont.)Acknowledgmentnumber(32bits)–ContainsthebytesequencenumberwhichthereceivingTCPentityexpectstoreceivenext.20TCPSegment(cont.)Acknowled21TCPSegment(cont.)Headerlength(4bits):thesizeoftheTCPheader.21TCPSegment(cont.)Headerle22TCPSegment(cont.)Flags(6bits)–Controlfunctionsforestablishingandremovingconnectionsetc.IncludeURG,ACK,PSH,RST,SYN,FIN.22TCPSegment(cont.)Flags(623TCPSegment(cont.)Window(16bits)–TellsthereceivingTCPentityhowmanydatabytesthesendingTCPentitycanaccept.23TCPSegment(cont.)Window(124TCPSegment(cont.)Checksum(16bits)–Usedfortransportlayererrordetection.–

pseudoheader(12Bytes)+TCPheader+data24TCPSegment(cont.)Checksum25TCPSegment(cont.)Urgentpointer(16bits)–Signalthereceivertodeliverthedatatothehigherlayerasquicklyaspossible.25TCPSegment(cont.)Urgentpo26TCPSegment(cont.)Options/padding-maximumsegmentsize26TCPSegment(cont.)Options/p27SegmentFormat(cont)Eachconnectionidentifiedwith4-tuple:(SrcPort,SrcIPAddr,DsrPort,DstIPAddr)Slidingwindow+flowcontrolacknowledgment,SequenceNum,AdvertisedWinowSenderData(SequenceNum)Acknowledgment+AdvertisedWindowReceiver27SegmentFormat(cont)Eachco28ConnectionEstablishmentActiveparticipant(client)Passiveparticipant(server)SYN,SequenceNum=xSYN+ACK,SequenceNum=

y,ACK,Acknowledgment=y

+1Acknowledgment=x

+1SequenceNum=x+1

28ConnectionEstablishmentActi29ConnectionTermination29ConnectionTermination30StateTransitionDiagramCLOSEDLISTENSYN_RCVDSYN_SENTESTABLISHEDCLOSE_WAITLAST_ACKCLOSINGTIME_WAITFIN_WAIT_2FIN_WAIT_1PassiveopenCloseSend/SYNSYN/SYN+ACKSYN+ACK/ACKSYN/SYN+ACKACKClose/FINFIN/ACKClose/FINFIN/ACKACK+FIN/ACKTimeoutaftertwosegmentlifetimesFIN/ACKACKACKACKClose/FINCloseCLOSEDActiveopen/SYN30StateTransitionDiagramCLOS31SlidingWindowRevisitedSendingsideLastByteAcked<=LastByteSentLastByteSent<=LastByteWrittenbufferbytesbetweenLastByteAckedandLastByteWrittenSendingapplicationLastByteWrittenTCPLastByteSentLastByteAckedReceivingapplicationLastByteReadTCPLastByteRcvdNextByteExpectedReceivingsideLastByteRead<NextByteExpectedNextByteExpected<=LastByteRcvd+1bufferbytesbetweenNextByteReadandLastByteRcvd31SlidingWindowRevisitedSend32FlowControlSendbuffersize:MaxSendBufferReceivebuffersize:MaxRcvBufferReceivingsideLastByteRcvd-LastByteRead<=MaxRcvBufferAdvertisedWindow=MaxRcvBuffer–((NextByteExpected-1)-NextByteRead)SendingsideLastByteSent-LastByteAcked<=AdvertisedWindowEffectiveWindow=AdvertisedWindow-(LastByteSent-LastByteAcked)LastByteWritten-LastByteAcked<=MaxSendBufferblocksenderif(LastByteWritten-LastByteAcked)+y>MaxSenderBufferAlwayssendACKinresponsetoarrivingdatasegmentPersistwhenAdvertisedWindow

=032FlowControlSendbuffersize33FlowControlTransportprotocolsresemblethedatalinkprotocolsFlowcontrol,errorcontrol,sequencingAslidingwindowisusedforflowcontrolDifferencesArouterusuallyhasonlyafewlinkstoothers,whileatransportentitymayhavenumerousconnections.Thisdifferencemakesitimpracticaltoimplementadatalinkbufferingstrategyinthetransportlayer.Thereceivermaynotdedicatespecificbufferstospecificconnections.33FlowControlTransportprotoc34FlowControlDynamicbuffermanagement-creditmechanismInitially,thesenderrequestsacertainnumberofbuffers(credit),basedonitsperceivedneeds.Thereceivergrantsasmanyoftheseasitcanafford.EverytimethesendertransmitsaTPDU,itdecreasesitsallocation(credit),stoppingwhentheallocation(credit)reacheszero.Thereceiverreturnsbothacknowledgmentsandbufferallocations(credit).34FlowControlDynamicbufferm35MoveforwardbyACK1002003004005006007008009001012013014015016017018011SenderwindowDatathatcanbesent不可發(fā)送pointerSenderwantstosend900bytes–9segments(100byteseachsegment).

Thesenderwindowis500bytes.SendercanmovethewindowforwardbytheACKfromthereceiver.Inaddition,thesendermaintainapointertoidentifythedatawhichhavebeensent.Datathatcannotbesent35MoveforwardbyACK100200300361002003004005006007008009001012013014015016017018011可發(fā)送不可發(fā)送pointer1002003004005006007008009001012013014015016017018011發(fā)送窗口可發(fā)送不可發(fā)送SendwindowmovesforwardThesenderhavesend400bytes.AndthesenderonlyreceivetheACKofthetop200bytes.Thewindowis500.Sothesendercanstillsend300bytes.

Sent&acked已發(fā)送但未被確認SenderwindowDatathatcanbesentMoveforwardbyACK500600700800900501601701801不可發(fā)送DatathatcannotbesentpointerSent&NotackedDatathatcanbesentDatathatcannotbesent361002003004005006007008009001371002003004005006007008009001012013014015016017018011Sent&acked可發(fā)送pointerSendwindowreduceThesenderreceivetheACKofthefollowing200bytes.Thewindowischangedto400.Sothesendercansend400bytes.1002003004005006007008009001012013014015016017018011可發(fā)送不可發(fā)送pointerSendwindowmovesforwardSent&acked已發(fā)送但未被確認Sent&Notack

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論