TCPIP协议原理英文版课件:Chapter 9 User Datagram Protocol(UDP)_第1页
TCPIP协议原理英文版课件:Chapter 9 User Datagram Protocol(UDP)_第2页
TCPIP协议原理英文版课件:Chapter 9 User Datagram Protocol(UDP)_第3页
TCPIP协议原理英文版课件:Chapter 9 User Datagram Protocol(UDP)_第4页
TCPIP协议原理英文版课件:Chapter 9 User Datagram Protocol(UDP)_第5页
已阅读5页,还剩23页未读 继续免费阅读

下载本文档

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

文档简介

2022/10/29TCP/IPProtocolSuite1TransportLayerProtocolTransportLayerprotocol:ToserveastheintermediarybetweentheapplicationprogramsandthenetworkoperationsResponsibilitiesTocreateaprocess-to-processcommunicationToprovideacontrolmechanismatthetransportlayerflowcontrol&errorcontrolToprovideaconnectionmechanismfortheprocessesDatastream2ProtocolsfortransportlayerTransmissionControlProtocol,TCPUserDatagramProtocol,UDP2022/10/29TCP/IPProtocolSuite2Chapter9UDPProcess-to-processcommunicationUserdatagramChecksumUDPoperationUseofUDPUDPpackage2022/10/29TCP/IPProtocolSuite3Process-to-ProcessComm.Internet进程Process进程ProcessDomainofIPprotocolDomainoftransportprotocolsIP地址协议端口(port)端点(endpoint)+2022/10/29TCP/IPProtocolSuite4IPentityTransportLayer

protocolentityPortNumbers212000(21)(23)(80)Process1Process2Process3803450236490IPAddress2022/10/29TCP/IPProtocolSuite5Process-to-ProcessCommunicationUDP负责将IP数据报交付给适当的进程Process(进程):arunningapplicationprogramAcomputercanrunseveralprocessesatthesametimeC/SapplicationmodelClient:aprocessonthelocalhostwhichneedsservicesSever:aprocessontheremotehostwhichprovidestheservicesForProcess-to-ProcessCommunication,mustdefinethe:Localhost(IP),localprocess(PortNumber)Remotehost(IP),remoteprocess(PortNumber)2022/10/29TCP/IPProtocolSuite6PortNumbersVS.C/SPortnumber:todefinetheprocessesEphemeralportnumber(短暂端口号):canbechosenrandomlybytheclientprocessWell-knownportnumber(熟知端口号):isuniversal

portnumberforserverprocess传输协议Data1352000Data1352000传输协议1352000ClientServer……多目标并发通信Well-knownportsusedwithUDP2022/10/29TCP/IPProtocolSuite72022/10/29TCP/IPProtocolSuite8IPAddress&PortNumber1352001135200113IPheaderTransportprotocolheaderPortnumber…ServerProcesses21802022/10/29TCP/IPProtocolSuite9IANARangesWell-knownportsAssignedandcontrolledbyIANARegisteredportsNotassignedorcontrolledbyIANACanonlyberegisteredwithIANAtopreventduplicationDynamicportsNeithercontrollednorregisteredCanbeusedbyanyprocess010231024491514915265535Well-knownRegisteredDynamicPortnumber2022/10/29TCP/IPProtocolSuite10Well-knownPorts/assignments/port-numbersThewell-knownPortsonmostsystemscanonlybeusedbysystem(orroot)processesorbyprogramsexecutedbyprivilegedusersTotheextentpossible,someportassignmentsarebothusedwiththeTCPandUDPExample:port53(DNS)2022/10/29TCP/IPProtocolSuite11Socket(套接字)Addresses(IPaddress,Portnumber)SocketAddress——todefinetheS/CprocessuniquelyProcess-to-processcommunicationneeds2SocketAddresses客户套接字地址服务器套接字地址2022/10/29TCP/IPProtocolSuite12Chapter9UDPProcess-to-processcommunicationUserdatagramChecksumUDPoperationUseofUDPUDPpackage2022/10/29TCP/IPProtocolSuite13UserDatagramUserDatagramProtocol,UDPRFC768,用户数据报协议IPLANsMANsWANsICMPIGMPARPRARPNetworkLayerNetworkAccessLayerApplicationLayerTCPUDPTransportLayer2022/10/29TCP/IPProtocolSuite14IPheaderIPdataProtocol=17UserDatagramFormatUDPHeaderSourceportnumber16bitsDestinationportnumber16bitsTotallength16bits(0~65535)Checksum16bitsDataThelengthofthedatacanbebetween

0and65507bytes65507=65535––IPheaderUDPheader208IPheaderIPdata2022/10/29TCP/IPProtocolSuite15Chapter9UDPProcess-to-processcommunicationUserdatagramChecksumUDPoperationUseofUDPUDPpackage2022/10/29TCP/IPProtocolSuite16ChecksumUDPchecksum与IP校验和的计算方法相同校验内容不同,包括三个部分:

Pseudoheader+UDPheader+DataPseudoheader(伪首部)根据IP首部的部分信息形成不会与UDP报文一起发送到网络上进一步确保UDP报文送到正确主机(目的IP地址正确)的正确端口上ChecksumOptional减少高可靠性网络上的传输开销2022/10/29TCP/IPProtocolSuite17PseudoHeaderFormatProtocolAll0sUDPtotallengthDestinationIPaddressSourceIPaddressSourceportnumberDest.portnumberUDPtotallengthChecksumDataPseudoheaderHeader2022/10/29TCP/IPProtocolSuite18Chapter9UDPProcess-to-processcommunicationUserdatagramChecksumUDPoperationUseofUDPUDPpackage2022/10/29TCP/IPProtocolSuite19UDPOperationAconnectionless,unreliabletransportprotocolTocreateaprocess-to-processcommunicationConnectionless:不同路径、不编号、面向报文面向报文:不支持数据流,也不支持分段、重组NoflowcontrolAlittererrorcontrol:checksum出错,悄悄丢弃对IP协议增强主机多目标通信的区分,允许多个通信并发进行而不会发生混淆2022/10/29TCP/IPProtocolSuite20Encapsulation&Decapsulation2022/10/29TCP/IPProtocolSuite21QueuesinUDP队列是与端口相关联在一起的进程入队列/出队列or进程入队列2022/10/29TCP/IPProtocolSuite22Multiplexing&Demultiplexing2022/10/29TCP/IPProtocolSuite23Chapter9UDPProcess-to-processcommunicationUserdatagramChecksumUDPoperationUseofUDPUDPpackage2022/10/29TCP/IPProtocolSuite24UseofUDP简单、简短的应用简单的请求-响应通信,如查询操作、网络管理IPphone,利用UDP快捷的特点适用于具有内部流控和差错控制的进程,如TFTP组播或广播应用某些路由协议,如RIP一般使用方式——客户/服务器模式服务端:固定守候在特定portx,提供服务客户端:动态绑定任意portn,向服务器portx发出请求,获得服务响应2022/10/29TCP/IPProtocolSuite25Chapter9UDPProcess-to-processcommunicationUserdatagramChecksumUDPoperationUseofUDPUDPpackage2022/10/29TCP/IPProtocolSuite26UDPPackage2022/10/29TCP/IPProtocolSuite27Discussion伪首部使得IP层和UDP层的界线模糊不清考查UDP协议软件在发送报文时如何计算校验和UDPIPI1NI1NI2NI3I2I317(dIP,dPort,Data)sPort封装UDP

温馨提示

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

评论

0/150

提交评论