TCPIP协议原理英文版课件:Chapter 9 User Datagram Protocol(UDP)

上传人:M****1 文档编号:570812619 上传时间:2024-08-06 格式:PPT 页数:28 大小:1.15MB
返回 下载 相关 举报
TCPIP协议原理英文版课件:Chapter 9 User Datagram Protocol(UDP)_第1页
第1页 / 共28页
TCPIP协议原理英文版课件:Chapter 9 User Datagram Protocol(UDP)_第2页
第2页 / 共28页
TCPIP协议原理英文版课件:Chapter 9 User Datagram Protocol(UDP)_第3页
第3页 / 共28页
TCPIP协议原理英文版课件:Chapter 9 User Datagram Protocol(UDP)_第4页
第4页 / 共28页
TCPIP协议原理英文版课件:Chapter 9 User Datagram Protocol(UDP)_第5页
第5页 / 共28页
点击查看更多>>
资源描述

《TCPIP协议原理英文版课件:Chapter 9 User Datagram Protocol(UDP)》由会员分享,可在线阅读,更多相关《TCPIP协议原理英文版课件:Chapter 9 User Datagram Protocol(UDP)(28页珍藏版)》请在金锄头文库上搜索。

1、2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite1 1Transport Layer Protocoll lTransport Layer protocolTransport Layer protocol: To serve as the : To serve as the intermediary between the application programs intermediary between the application programs and the network operationsand the ne

2、twork operationsl lResponsibilities Responsibilities l lTo create a To create a process-to-process communicationprocess-to-process communicationl lTo provide a To provide a control mechanismcontrol mechanism at the transport at the transport layerlayerl lflow control & error controlflow control & er

3、ror controll lTo provide a To provide a connection mechanismconnection mechanism for the for the processesprocessesl lData streamData streaml l2 Protocols for transport layer2 Protocols for transport layerl lTransmission Control ProtocolTransmission Control Protocol,TCPTCPl lUser Datagram ProtocolUs

4、er Datagram Protocol,UDPUDP2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite2 2Chapter 9 UDPl lProcess-to-process communicationl lUser datagraml lChecksuml lUDP operationl lUse of UDPl lUDP package2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite3 3Process-to-Process Comm.InternetI

5、nternet进程进程进程进程ProcessProcess进程进程进程进程ProcessProcessDomain of IP protocolDomain of IP protocolDomain of transport protocolsDomain of transport protocolsIPIP地址地址地址地址协议端口(协议端口(协议端口(协议端口(portport)端点(端点(端点(端点(endpointendpoint)2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite4 4IP entityIP entity

6、Transport LayerTransport Layerprotocol entityprotocol entityPort Numbers212120002000( 21 )( 21 )( 23 )( 23 )( 80 )( 80 )Process1Process1Process2Process2Process3Process3808034503450232364906490IP AddressIP Address2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite5 5Process-to-Process Communic

7、ationl lUDPUDP负责负责将将将将IPIP数据数据数据数据报报交付交付交付交付给给适当的适当的适当的适当的进进程程程程l lProcessProcess(进进程)程)程)程): a running application program: a running application programl lA computer can run A computer can run several processesseveral processes at the same time at the same time l lC/S C/S application model applica

8、tion model l lClientClient: a process on the : a process on the local hostlocal host which needs which needs servicesservicesl lSeverSever: a process on the : a process on the remote hostremote host which which provides the servicesprovides the servicesl lFor For Process-to-Process Communication, mu

9、st define Process-to-Process Communication, must define the:the:l lLocal host (IP), Local host (IP), local process (Port Number)local process (Port Number)l lRemote host (IP), Remote host (IP), remote process (Port Number)remote process (Port Number)2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protoc

10、ol Suite6 6Port Numbers VS. C/Sl lPort numberPort number: to define the processes: to define the processesl lEphemeral port numberEphemeral port number(短(短(短(短暂暂端口号)端口号)端口号)端口号): can be : can be chosen chosen randomlyrandomly by the by the client processclient processl lWell-known port numberWell-kn

11、own port number(熟知端口号)(熟知端口号)(熟知端口号)(熟知端口号): is : is universaluniversal port number for port number for server processserver process传输协议传输协议传输协议传输协议DataData13135200052000DataData13135200052000传输协议传输协议传输协议传输协议13135200052000ClientClientServerServer多目标多目标多目标多目标并发通信并发通信并发通信并发通信Well-known ports used with

12、 UDP2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite7 72024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite8 8IP Address & Port Number1313520052001 11313193.14.26.7193.14.26.752001520011313193.14.26.7193.14.26.7IP headerIP headerTransportTransportprotocolprotocolheaderheaderPortPortn

13、umbernumber Server Processes Server Processes 212180802024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite9 9IANA Rangesl lWell-known portsWell-known portsl lAssigned and controlled by IANAAssigned and controlled by IANAl lRegistered portsRegistered portsl lNot assigned or controlled by IANANo

14、t assigned or controlled by IANAl lCan only be registered with IANA to prevent duplicationCan only be registered with IANA to prevent duplicationl lDynamic portsDynamic portsl lNeither controlled nor registeredNeither controlled nor registeredl lCan be used by any processCan be used by any process0

15、01023102310241024491514915149152491526553565535Well-knownWell-knownRegisteredRegisteredDynamicDynamicPort number2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite1010Well-known Portslhttp:/www.iana.org/assignments/port-numbersl lThe well-known Ports on most systems The well-known Ports on mo

16、st systems can only be used by can only be used by system (or root) system (or root) processesprocesses or by or by programs executed by programs executed by privileged usersprivileged usersl lTo the extent possible, some port To the extent possible, some port assignments are both used with the TCP

17、assignments are both used with the TCP and UDPand UDPl lExampleExample:port 53port 53(DNSDNS)2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite1111Socket (套接字)(套接字)Addressesl l(IP address, Port number) Socket Addressto define the S/C process uniquelyl lProcess-to-process communication needs

18、2 Socket Addressesl l客客客客户户套接字地址套接字地址套接字地址套接字地址l l服服服服务务器套接字地址器套接字地址器套接字地址器套接字地址2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite1212Chapter 9 UDPl lProcess-to-process communicationl lUser datagraml lChecksuml lUDP operationl lUse of UDPl lUDP package2024/8/62024/8/6TCP/IP Protocol SuiteTCP

19、/IP Protocol Suite1313User Datagraml lUser Datagram Protocol,UDPl lRFC 768RFC 768,用,用,用,用户户数据数据数据数据报协议报协议IPLANsMANsWANsICMPIGMPARPRARPNetworkLayerNetworkAccess LayerApplication LayerApplication LayerTCPUDPTransportLayer2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite1414IP IP headerheaderI

20、P IP datadataProtocol = 17Protocol = 17User Datagram FormatUDP HeaderUDP HeaderSource port numberSource port number16 bits16 bitsDestination port numberDestination port number16 bits16 bitsTotal lengthTotal length16 bits16 bits(0 06553565535)ChecksumChecksum16 bits16 bitsDataDataThe length of the da

21、ta can The length of the data can be betweenbe between 0 and 65507 0 and 65507 bytesbytes65507 = 65535 IP headerUDP header208IP IP headerheaderIP IP datadata2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite1515Chapter 9 UDPl lProcess-to-process communicationl lUser datagraml lChecksuml lUDP

22、 operationl lUse of UDPl lUDP package2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite1616Checksuml lUDP checksumUDP checksuml l与与与与IPIP校校校校验验和的和的和的和的计计算方法相同算方法相同算方法相同算方法相同l l校校校校验验内容不同内容不同内容不同内容不同,包括三个部分:,包括三个部分:,包括三个部分:,包括三个部分:Pseudo header + UDP header +Pseudo header + UDP header + Data

23、Datal lPseudo headerPseudo header(伪伪首部)首部)首部)首部)l l根据根据根据根据IPIP首部的部分信息形成首部的部分信息形成首部的部分信息形成首部的部分信息形成l l不会与不会与不会与不会与UDPUDP报报文一起文一起文一起文一起发发送到网送到网送到网送到网络络上上上上l l进进一步确保一步确保一步确保一步确保UDPUDP报报文送到正确主机文送到正确主机文送到正确主机文送到正确主机( (目的目的目的目的IPIP地址正确地址正确地址正确地址正确) )的的的的正确端口上正确端口上正确端口上正确端口上l lChecksum Checksum Optional O

24、ptionall l减少高可靠性网减少高可靠性网减少高可靠性网减少高可靠性网络络上的上的上的上的传输传输开开开开销销2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite1717Pseudo Header FormatProtocolProtocolAll 0sAll 0sUDP total lengthUDP total lengthDestination IP addressDestination IP addressSource IP addressSource IP addressSource port numberSour

25、ce port numberDest. port numberDest. port numberUDP total lengthUDP total lengthChecksumChecksumDataDataP Ps se eu ud do oh he ea ad de er rH He ea ad de er r 2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite1818Chapter 9 UDPl lProcess-to-process communicationl lUser datagraml lChecksuml lU

26、DP operationl lUse of UDPl lUDP package2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite1919UDP Operationl lA A connectionless, unreliableconnectionless, unreliable transport transport protocolprotocoll lTo create a process-to-process communicationTo create a process-to-process communicatio

27、nl lConnectionless: Connectionless: 不同路径、不不同路径、不不同路径、不不同路径、不编编号、面向号、面向号、面向号、面向报报文文文文l l面向面向面向面向报报文:不支持数据流,也不支持分段、重文:不支持数据流,也不支持分段、重文:不支持数据流,也不支持分段、重文:不支持数据流,也不支持分段、重组组l lNo flow controlNo flow controll lA litter error control: checksumA litter error control: checksuml l出出出出错错,悄悄悄悄悄悄悄悄丢丢弃弃弃弃l l对对IPIP

28、协议协议增增增增强强l l主机多目主机多目主机多目主机多目标标通信的区分,允通信的区分,允通信的区分,允通信的区分,允许许多个通信并多个通信并多个通信并多个通信并发进发进行而不行而不行而不行而不会会会会发发生混淆生混淆生混淆生混淆2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite2020Encapsulation & Decapsulation2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite2121Queues in UDPl l队列是与端口相关联在一起的队列是

29、与端口相关联在一起的队列是与端口相关联在一起的队列是与端口相关联在一起的l l进程进程进程进程入队列入队列入队列入队列/ /出队列出队列出队列出队列 or or 进程进程进程进程入队列入队列入队列入队列2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite2222Multiplexing & Demultiplexing2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite2323Chapter 9 UDPl lProcess-to-process communicati

30、onl lUser datagraml lChecksuml lUDP operationl lUse of UDPl lUDP package2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite2424Use of UDPl l简单简单、简简短的短的短的短的应应用用用用l l简单简单的的的的请请求求求求- -响响响响应应通信,如通信,如通信,如通信,如查询查询操作、网操作、网操作、网操作、网络络管理管理管理管理l lIP phoneIP phone,利用,利用,利用,利用UDPUDP快捷的特点快捷的特点快捷的特点快捷的特点l l

31、适用于具有内部流控和差适用于具有内部流控和差适用于具有内部流控和差适用于具有内部流控和差错错控制的控制的控制的控制的进进程,如程,如程,如程,如TFTPTFTPl l组组播或广播播或广播播或广播播或广播应应用用用用l l某些路由某些路由某些路由某些路由协议协议,如,如,如,如RIPRIPl l一般使用方式一般使用方式一般使用方式一般使用方式 客客客客户户/ /服服服服务务器模式器模式器模式器模式l l服服服服务务端:固定守候在特定端:固定守候在特定端:固定守候在特定端:固定守候在特定port xport x,提供服,提供服,提供服,提供服务务l l客客客客户户端:端:端:端:动态绑动态绑定任意

32、定任意定任意定任意port nport n,向服,向服,向服,向服务务器器器器port xport x发发出出出出请请求,求,求,求,获获得服得服得服得服务务响响响响应应2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite2525Chapter 9 UDPl lProcess-to-process communicationl lUser datagraml lChecksuml lUDP operationl lUse of UDPl lUDP package2024/8/62024/8/6TCP/IP Protocol Sui

33、teTCP/IP Protocol Suite2626UDP Package2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite2727Discussionl l伪伪首部使得首部使得首部使得首部使得IPIP层层和和和和UDPUDP层层的界的界的界的界线线模糊不清模糊不清模糊不清模糊不清l l考考考考查查UDPUDP协议软协议软件在件在件在件在发发送送送送报报文文文文时时如何如何如何如何计计算校算校算校算校验验和和和和UDPUDPIPI1NI1NI2NI3I2I317(dIPdIP,dPortdPort,DataData)sPort

34、封装封装UDP计算算CS计算计算计算计算CSCS的困难的困难的困难的困难: 计算前需要知道计算前需要知道计算前需要知道计算前需要知道sIPsIP,但,但,但,但在在在在IPIP选路前,选路前,选路前,选路前,sIPsIP是未知的是未知的是未知的是未知的(sIPsIP与选择的与选择的与选择的与选择的NINI有关)有关)有关)有关)计算步骤:计算步骤:计算步骤:计算步骤:1 1. . 封装成封装成封装成封装成UDPUDP送给送给送给送给IPIP层层层层2 2. IP. IP层完成选路,得到层完成选路,得到层完成选路,得到层完成选路,得到sIPsIP,再送回再送回再送回再送回UDPUDP层层层层3

35、3. UDP. UDP层计算层计算层计算层计算CSCS,再送,再送,再送,再送IPIP层层层层UDPUDP接收也有类似问题接收也有类似问题接收也有类似问题接收也有类似问题应用的需要应用的需要2024/8/62024/8/6TCP/IP Protocol SuiteTCP/IP Protocol Suite2828Summaryl l进程到程到进程的通信程的通信l l端点(端点(端点(端点(IPIP地址,端口)地址,端口)地址,端口)地址,端口)l lUDPl l通信特点:无通信特点:无通信特点:无通信特点:无连连接、不可靠接、不可靠接、不可靠接、不可靠l l作用作用作用作用l lUDP报文文l l格式:格式:格式:格式:伪伪首部、校首部、校首部、校首部、校验验和的含和的含和的含和的含义义和作用和作用和作用和作用l l封装:直接封装在封装:直接封装在封装:直接封装在封装:直接封装在IPIP分分分分组组中中中中

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 高等教育 > 研究生课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号