Ch11-User Datagram Protocol
Ch11-User Datagram Protocol
LESSON 11
Lesson 11 - (1 of 31)
Outline:
User Datagram Protocol (UDP)
• Identifying Multiple • Multiplexing,
Destinations within a Host Demultiplexing, and Ports
• User Datagram • UDP Input and Output
Protocol (UDP) • UDP Port Numbers
• UDP Message Format
• UDP Pseudo-Header • TCP/IP Protocol Tracing:
• Conceptual Layering – ARP
• UDP Encapsulation – IP
• UDP / IP Integration – DNS
Lesson 11 - (2 of 31)
Identifying Multiple
Destinations within a Host:
• Software and communication protocols provide a
mechanism that distinguishes among multiple
destinations within a given host.
• Often, this mechanism is used to support transport
services for multiple applications.
• The ultimate destination in a host is not a process,
but a software Port.
Lesson 11 - (3 of 31)
Identifying Multiple
Destinations within a Host:
• Software Ports:
– A set of abstract destinations points called
protocol ports are identified by positive integer
values and controlled by the local operating
system.
• Ports are usually allocated by an operating system
to an application in the form of memory blocks,
accessed by specific data structures..
Lesson 11 - (4 of 31)
Identifying Multiple
Destinations within a Host:
• Packets arriving from the IP layer, destined for a
particular port, are enqueued within a buffer.
• Protocol ports also use outgoing queues to store
messages being sent from an application program.
• To send and receive, we need to know the source
and destination port numbers. Both are always
sent in each message.
Lesson 11 - (5 of 31)
User Datagram
Protocol (UDP):
• User Datagram Protocol (UDP):
– A connectionless, unreliable delivery service
using the IP protocol for its message transport.
– UDP distinguishes among multiple destinations
in a host, but sends no acknowledgments
(ACKs).
Lesson 11 - (6 of 31)
User Datagram
Protocol (UDP):
• Applications using UDP must handle all problems
to ensure reliable transfer. They must deal with:
– Duplicate messages.
– Lost messages.
– Delayed and Out-of-Order delivery.
• UDP is good for delay-sensitive traffic such as
video and voice since no acknowledgment or
retransmission features are used.
Lesson 11 - (7 of 31)
UDP Message Format:
Lesson 11 - (8 of 31)
UDP Message Format:
0 16 31
DATA
...
Lesson 11 - (9 of 31)
UDP Message Format:
• UDP Pseudo-Header:
– Used to verify that the UDP datagram has
reached it’s correct destination (since UDP
headers only use port numbers).
• A checksum is computed over the pseudo-header,
UDP-header, and the data area before sending the
user datagram.
0 8 16 31
SOURCE IP ADDRESS
DESTINATION IP ADDRESS
PADDING PROTOCOL UDP LENGTH
Application Layer
User Datagram Protocol (UDP)
Internet Protocol (IP)
Network Interface and Hardware
IP IP DATA AREA
HEADER
FRAME
FRAME DATA AREA
HEADER
• Important distinction:
– IP Layer - transferring of data between a pair of
hosts on the Internet (only responsibility).
– UDP Layer - differentiating among multiple
sources or destinations within one host only
(same for TCP as well).
UDP : Demultiplexing
Based On Port
IP Layer
application programs
operating system ports for
UDP
datagrams
TCP Input
Process
Control
messages
TCP TCP
queue for datagrams
Timer Process sent to IP
– Universal Assignment:
• Everyone agrees on allowing a central
authority to assign and publish port numbers
(software is built around
well-known port assignments).