TCPIP協(xié)議原理教學(xué)課件:Chapter 9 User Datagram Protocol(UDP)_第1頁(yè)
TCPIP協(xié)議原理教學(xué)課件:Chapter 9 User Datagram Protocol(UDP)_第2頁(yè)
TCPIP協(xié)議原理教學(xué)課件:Chapter 9 User Datagram Protocol(UDP)_第3頁(yè)
TCPIP協(xié)議原理教學(xué)課件:Chapter 9 User Datagram Protocol(UDP)_第4頁(yè)
TCPIP協(xié)議原理教學(xué)課件:Chapter 9 User Datagram Protocol(UDP)_第5頁(yè)
已閱讀5頁(yè),還剩22頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

1、Transport Layer ProtocolTransport Layer protocol: To serve as the intermediary between the application programs and the network operationsResponsibilities To create a process-to-process communicationTo provide a control mechanism at the transport layerflow control & error controlTo provide a connect

2、ion mechanism for the processesData stream2 Protocols for transport layerTransmission Control Protocol,TCPUser Datagram Protocol,UDP7/15/20221TCP/IP Protocol SuiteChapter 9 UDPProcess-to-process communicationUser datagramChecksumUDP operationUse of UDPUDP package7/15/20222TCP/IP Protocol SuiteProces

3、s-to-Process Comm.Internet進(jìn)程Process進(jìn)程ProcessDomain of IP protocolDomain of transport protocolsIP地址協(xié)議端口(port)端點(diǎn)(endpoint)7/15/20223TCP/IP Protocol SuiteIP entityTransport Layerprotocol entityPort Numbers212000( 21 )( 23 )( 80 )Process1Process2Process3803450236490IP Address7/15/20224TCP/IP Protocol Su

4、iteProcess-to-Process CommunicationUDP負(fù)責(zé)將IP數(shù)據(jù)報(bào)交付給適當(dāng)?shù)倪M(jìn)程Process(進(jìn)程): a running application programA computer can run several processes at the same time C/S application model Client: a process on the local host which needs servicesSever: a process on the remote host which provides the servicesFor Proce

5、ss-to-Process Communication, must define the:Local host (IP), local process (Port Number)Remote host (IP), remote process (Port Number)7/15/20225TCP/IP Protocol SuitePort Numbers VS. C/SPort number: to define the processesEphemeral port number(短暫端口號(hào)): can be chosen randomly by the client processWell

6、-known port number(熟知端口號(hào)): is universal port number for server process傳輸協(xié)議Data1352000Data1352000傳輸協(xié)議1352000ClientServer多目標(biāo)并發(fā)通信7/15/20226TCP/IP Protocol SuiteIP Address & Port Number1352001135200113IP headerTransportprotocolheaderPortnumberServer Processes 21807/15/20227TCP/IP Protocol SuiteIANA Rang

7、esWell-known portsAssigned and controlled by IANARegistered portsNot assigned or controlled by IANACan only be registered with IANA to prevent duplicationDynamic portsNeither controlled nor registeredCan be used by any process010231024491514915265535Well-knownRegisteredDynamicPort number7/15/20228TC

8、P/IP Protocol SuiteWell-known Ports/assignments/port-numbersThe well-known Ports on most systems can only be used by system (or root) processes or by programs executed by privileged usersTo the extent possible, some port assignments are both used with the TCP and UDPExample:port 53(DNS)7/15/20229TCP

9、/IP Protocol SuiteSocket (套接字)Addresses(IP address, Port number) Socket AddressProcess-to-process communication needs 2 Socket Addresses客戶(hù)套接字地址服務(wù)器套接字地址7/15/202210TCP/IP Protocol SuiteChapter 9 UDPProcess-to-process communicationUser datagramChecksumUDP operationUse of UDPUDP package7/15/202211TCP/IP

10、 Protocol SuiteUser DatagramUser Datagram Protocol,UDPRFC 768,用戶(hù)數(shù)據(jù)報(bào)協(xié)議IPLANsMANsWANsICMPIGMPARPRARPNetworkLayerNetworkAccess LayerApplication LayerTCPUDPTransportLayer7/15/202212TCP/IP Protocol SuiteIP headerIP dataProtocol = 17User Datagram FormatUDP HeaderSource port number16 bitsDestination port n

11、umber16 bitsTotal length16 bits(065535)Checksum16 bitsDataThe length of the data can be between 0 and 65507 bytes65507 = 65535 IP headerUDP header208IP headerIP data7/15/202213TCP/IP Protocol SuiteChapter 9 UDPProcess-to-process communicationUser datagramChecksumUDP operationUse of UDPUDP package7/1

12、5/202214TCP/IP Protocol SuiteChecksumUDP checksum與IP校驗(yàn)和的計(jì)算方法相同校驗(yàn)內(nèi)容不同,包括三個(gè)部分:Pseudo header + UDP header + DataPseudo header(偽首部)根據(jù)IP首部的部分信息形成不會(huì)與UDP報(bào)文一起發(fā)送到網(wǎng)絡(luò)上進(jìn)一步確保UDP報(bào)文送到正確主機(jī)(目的IP地址正確)的正確端口上Checksum Optional減少高可靠性網(wǎng)絡(luò)上的傳輸開(kāi)銷(xiāo)7/15/202215TCP/IP Protocol SuitePseudo Header FormatProtocolAll 0sUDP total lengt

13、hDestination IP addressSource IP addressSource port numberDest. port numberUDP total lengthChecksumDataPseudoheaderHeader 7/15/202216TCP/IP Protocol SuiteChapter 9 UDPProcess-to-process communicationUser datagramChecksumUDP operationUse of UDPUDP package7/15/202217TCP/IP Protocol SuiteUDP OperationA

14、 connectionless, unreliable transport protocolTo create a process-to-process communicationConnectionless: 不同路徑、不編號(hào)、面向報(bào)文面向報(bào)文:不支持?jǐn)?shù)據(jù)流,也不支持分段、重組No flow controlA litter error control: checksum出錯(cuò),悄悄丟棄對(duì)IP協(xié)議增強(qiáng)主機(jī)多目標(biāo)通信的區(qū)分,允許多個(gè)通信并發(fā)進(jìn)行而不會(huì)發(fā)生混淆7/15/202218TCP/IP Protocol SuiteEncapsulation & Decapsulation7/15/20221

15、9TCP/IP Protocol SuiteQueues in UDP隊(duì)列是與端口相關(guān)聯(lián)在一起的進(jìn)程入隊(duì)列/出隊(duì)列 or 進(jìn)程入隊(duì)列7/15/202220TCP/IP Protocol SuiteMultiplexing & Demultiplexing7/15/202221TCP/IP Protocol SuiteChapter 9 UDPProcess-to-process communicationUser datagramChecksumUDP operationUse of UDPUDP package7/15/202222TCP/IP Protocol SuiteUse of UD

16、P簡(jiǎn)單、簡(jiǎn)短的應(yīng)用簡(jiǎn)單的請(qǐng)求-響應(yīng)通信,如查詢(xún)操作、網(wǎng)絡(luò)管理IP phone,利用UDP快捷的特點(diǎn)適用于具有內(nèi)部流控和差錯(cuò)控制的進(jìn)程,如TFTP組播或廣播應(yīng)用某些路由協(xié)議,如RIP一般使用方式 客戶(hù)/服務(wù)器模式服務(wù)端:固定守候在特定port x,提供服務(wù)客戶(hù)端:動(dòng)態(tài)綁定任意port n,向服務(wù)器port x發(fā)出請(qǐng)求,獲得服務(wù)響應(yīng)7/15/202223TCP/IP Protocol SuiteChapter 9 UDPProcess-to-process communicationUser datagramChecksumUDP operationUse of UDPUDP package7/15/202224TCP/IP Protocol SuiteUDP Package7/15/202225TCP/IP Protocol SuiteDiscussion偽首部使得IP層和UDP層的界線模糊不清考查UDP協(xié)議軟件在發(fā)送報(bào)文時(shí)如何計(jì)算校驗(yàn)和UDPIPI1NI1NI2NI3I2I317(dIP,dPort,Data)sPort封裝UDP計(jì)算CS計(jì)算

溫馨提示

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

評(píng)論

0/150

提交評(píng)論