SlideServe
Menu
Préférences
© SlideServe · v2026

UDP Protocol: Application Data Transfer Mechanism in TCP/IP

kriner avatar
23 diapositives · 980 Views · Jan 01, 2020

User Datagram Protocol (UDP) allows applications to send datagrams independently on a network, introducing a way to distinguish hosts and handle multiple functions within a process, despite being connectionless and unreliable. Learn about UDP encapsulation, checksum, port management, and multiplexing in this chapter.

UDP Protocol: Application Data Transfer Mechanism in TCP/IP - slide 1
01 / 23UDP Protocol: Application Data Transfer Mechanism in TCP/IP
1 / 17

Télécharger la présentation

UDP Protocol: Application Data Transfer Mechanism in TCP/IP
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. User Datagram Protocol (UDP) Chapter 11

  2. Know TCP/IP transfers datagrams around • Forwarded based on destination’s IP address • At IP layer, destination address identifies host • Made no further distinction about which application on the host gets the datagram • This chapter extends TCP/IP protocol suite • Adds mechanism to distinguish among hosts • Multiple applications on a given computer can send and receive datagrams independently

  3. The Ultimate Destination • Most OSs support multiprogramming • Multiple applications execute simultaneously • In OS terms, each executing program is a process, task, application program, or user level process • Systems are called multitasking systems

  4. Is a process the ultimate destination? • Seems natural; but is a bit misleading • Processes are created and destroyed dynamically • Want to replace processes without notifying senders • Want to identify destinations by function • Not by process that implements them • Single process may handle multiple functions • Want process to decide which function the sender wants • So, we will abstract the problem • Imagine each machine has a set of protocol ports • Each port identified by a positive integer • Local OS provides means to specify or access a port

  5. Most OS’s provide synchronous port access • Computation stops during port access operation • Block process extracting data if no data there • Most ports are buffered • Puts waiting data in a finite queue • To communicate with a foreign port • Sender must know IP address & protocol port # • Messages must carry • Destination port on the machine receiving the msg • Source port on the machine sending the msg

  6. User Datagram Protocol (UDP) • Provides primary mechanism for application programs to swap datagrams • Provides protocol ports to distinguish among multiple executing programs • Uses IP to transport messages between machines • Provides same unreliable, connectionless image • No acknowledgements; no ordering of incoming msgs • No feedback for rate control; can lose messages

  7. Application programs have full responsibility for: • Reliability • Message loss • Duplication • Out-of-order delivery • Loss of connectivity • Unfortunately, most application programmers ignore this responsibility • Testing is usually done in controlled, reliable LANs • Fail dramatically when used in TCP/IP internet

  8. Format of UDP Messages • Each UDP message is a user datagram • Has a header and data area

  9. UDP Pseudo-Header • Checksum can cover data in datagram • Need to ensure more than that • Datagram only has protocol port number • Correct destination includes specific machine • Want to compute checksum on destination IP as well as UDP datagram • Constructs pseudo-header and includes in checksum computation

  10. Pseudo-header • Sender computes checksum over pseudo-header and datagram • Only datagram gets sent • Receiver reconstructs pseudo-header by extracting fields from the IP header UDP datagram

  11. UDP Encapsulation & Protocol Layering • UDP is our first transport protocol example

  12. Layering above UDP means complete UDP message (header and data) is encapsulated in an IP datagram • UDP datagram in IP datagram data area • IP datagram in frame data area • Layering provides division of duties • IP layer identifies source & destination hosts • UDP layer identifies source or destination ports within a host

  13. Figure 11.4

  14. Layering & UDP Checksum • Violation of layering rules with checksum • Pseudo-header needs source & dest IP address • UDP must interact with IP layer to get these • Regardless of method, still interacts • Violates separation of functionality by layering • UDP is tightly integrated with IP • Compromise made for practical reasons

  15. UDP Multiplexing, Demultiplexing, & Ports • Thru the layers, SW must mux and demux among multiple objects at next layer • UDP provides another example of this • Accepts UDP datagrams from many application programs • Passes to IP for transmission • Takes arriving datagrams • Passes each to appropriate application program

  16. Figure 11.5

  17. Conceptually, mux & demux occurs at ports • In practice, little more involved • Applications negotiate with OS to obtain a port protocol and associated port number • One assigned, application puts the port number in all outgoing UDP datagrams • Think of ports as queues • OS creates internal queue when provides port • UDP receives datagram, see if port # matches one • If not, sends port unreachable ICMP error msg, discards • If is, enqueues datagram at port for application program • If port full, get error and datagram discarded

  18. Reserved & Available Ports • How should port numbers be assigned? • Two computers must agree on port numbers • A wants file from B; needs to know what port the file transfer program on B uses • Two fundamental approaches • Central authority • Dynamic binding

  19. Central Authority • Everyone agrees that central authority assigns • List of assignments will be published • All software will be built according to the list • Also called universal assignment • Called well-known port assignments • Dynamic Binding • Ports not globally known • Software assigns ports when needed • Must send request to computer to learn of assignments • Target machine replies with the port number to use

  20. TCP/IP uses hybrid approach • Some ports globally assigned a priori • Many left available for local sites or applications • Low values going up are assigned • Higher values left open

  21. Summary • Can have multiple applications executing • UDP distinguishes among these processes • Uses two 16-bit integers for port numbers • Some are pre-assigned (well-known) • Some available for arbitrary use

  22. UDP is a thin protocol • Not add significantly to semantics of IP • Provides way for applications to use IP to communicate • Unreliable, connectionless • UDP lies in transport layer • Conceptual independence between it and internet layer is somewhat violated