SlideShare a Scribd company logo
2
Most read
© Peter R. Egli 2015
1/7
Rev. 3.50
UDP - User Datagram Protocol indigoo.com
INTRODUCTION TO USER DATAGRAM PROTOCOL,
A SIMPLE PACKET TRANSPORT SERVICE IN THE
INTERNET PROTOCOL SUITE
PETER R. EGLI
INDIGOO.COM
USER DATAGRAM PROTOCOL
UDP
© Peter R. Egli 2015
2/7
Rev. 3.50
UDP - User Datagram Protocol indigoo.com
Contents
1. UDP (RFC768) characteristics
2. UDP Service
3. Typical UDP applications
4. UDP Checksum
5. UDP versus TCP
© Peter R. Egli 2015
3/7
Rev. 3.50
UDP - User Datagram Protocol indigoo.com
1. UDP (RFC768) characteristics
• No connection establishment/teardown; data is just sent right away.
• No flow control / congestion control, sender can overrun receiver‘s buffer:
 UDP is not suited for bulk data transfer.
 For data transfer with UDP a lock-step protocol is required (to be implemented
by the application).
• No error control; corrupted data is not retransmitted (even though UDP header has a
checksum to detect errors and report these to the application).
Packet 4 is
dropped (buffer
overrun).
Host 1 Host 2
Packet 1 is sent
to the application.
Packet 4 is missing. The
packet loss needs
to be handled by
the application
(detection, retransmission).
1
Packet 1 is stored
in the receive queue.
1
2
1
2
1
2
3
4
3
1
2
3
5
Packet 2 is stored
in the receive queue.
Packet 3 is stored
in the receive queue.
2
3
5
1
Host 1 sends
packets.
© Peter R. Egli 2015
4/7
Rev. 3.50
UDP - User Datagram Protocol indigoo.com
2. UDP service
 UDP is basically a simple extension of the IP datagram service.
 UDP adds multiplexing (on port number) to IP datagram service.
 Application writes are mapped 1:1 to UDP datagrams; UDP passes these 1:1 to the IP layer.
UDP layer
Appl.
IP packets
Application
sends packets
(APDU’s) over
the socket
interface
Socket interface
IP layer
2500
300
500
150
TPDU’s
(UDP datagrams)
2500
300
500
150
300 500 15015001000
IP layer
300
2500
500
150
UDP layer
300
2500
500
150
Appl.
Application
reads packets
(APDU’s)
from the
socket
interface
TPDU’s
(UDP datagrams)
2500byte packet is too big. IP layer fragments
the UDP datagram.
© Peter R. Egli 2015
5/7
Rev. 3.50
UDP - User Datagram Protocol indigoo.com
3. Typical UDP applications
UDP is best suited for applications with short command-response type „transactions“
that do not justify the establishment / release prior to the data exchange.
Host 1 Host 2
SNMP GET Request
SNMP GET Response
SNMP Host 1 Host 2
DNS Query
DNS Response
DNS Host 1 Host 2
Time request
Time response
SNTP
Host 1 Host 2
DHCP Request
DHCP Response
DHCP/Bootp Host 1 Host 1 Host 2
RIP Route Update
RIPHost 2
RADIUS Access Request
RADIUS
RADIUS Access Accept
Host 1 Host 2
RPC Request
RPC Reply
RPC
© Peter R. Egli 2015
6/7
Rev. 3.50
UDP - User Datagram Protocol indigoo.com
4. UDP checksum
 UDP has a checksum too that provides minimal protection against transmission errors.
 The checksum is optional; if it is not used it shall be set to 0.
 Becaus the IP addresses are used in the UDP checksum calculation,
UDP is tightly bound to the IP layer. Therefore UDP can only run on top of IP.
Pseudo
header
The checksum is
calculated over
the pseudo header,
UDP header and
data (UDP payload).
Source Port Destination Port
Checksum Length
Data
UDP Length00000000 Protocol=17 UDP Length
IP Destination Address
IP Source Address
UDP
header
© Peter R. Egli 2015
7/7
Rev. 3.50
UDP - User Datagram Protocol indigoo.com
5. UDP versus TCP
TCP
 Connection-oriented, point-to-point (unicast)
 Reliable end-to-end:
No bit errors due to checksum.
Packet ordering preserved.
No duplicates.
No packet loss.
 Stream-oriented (no message boundary preservation)
 Has flow control to maximise throughput
 Has congestion control to minimise packet loss
 Analogon: phone
Examples of application protocols using TCP:
HTTP, SMTP, FTP, TELNET
UDP
 Connection-less, best-effort
 Not reliable (no retransmissions)
 Message boundary preservation
 No flow control
 No congestion control
 Analogon: mail (snail mail)
Examples of application protocols
using UDP:
SNMP, DNS, TFTP, RTP, DHCP, SNTP
N.B.: It is possible to run application protocols over both TCP and UDP. E.g. DNS is normally run on UDP, but
for zone transfers (higher data volume) DNS uses TCP. Actually there is a shift towards using TCP instead
UDP since TCP can better provide security (SSL/TLS, simpler filtering in firewalls etc.).

More Related Content

PPTX
TCP/IP 3-way Handshake
PPT
Network layer tanenbaum
PPTX
User datagram protocol (udp)
PPT
Internet control message protocol
PPSX
Ethernet technology
PPTX
IPV6 ADDRESS
PPTX
Transport layer
PPTX
Ch 19 Network-layer protocols Section 1
TCP/IP 3-way Handshake
Network layer tanenbaum
User datagram protocol (udp)
Internet control message protocol
Ethernet technology
IPV6 ADDRESS
Transport layer
Ch 19 Network-layer protocols Section 1

What's hot (20)

PPTX
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
PPT
Unit 3 Network Layer PPT
PPTX
Arp (address resolution protocol)
PPTX
Transport layer protocols : TCP and UDP
PPTX
Tcp IP Model
PPT
Tcp Udp Icmp And The Transport Layer
PPT
Tcp ip
PPT
Error detection correction (CRC)
PDF
Transport layer services
PPSX
Congestion control in TCP
PDF
TCP - Transmission Control Protocol
PPTX
TCP/IP Model
PPTX
Media Access Control
PPT
TCP IP Addressing
PPT
transport layer
PPT
Chapter 23
PPTX
TCP and UDP
PPT
Ip addressing classful
PPT
User Datagram protocol For Msc CS
PPT
Flow & Error Control
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
Unit 3 Network Layer PPT
Arp (address resolution protocol)
Transport layer protocols : TCP and UDP
Tcp IP Model
Tcp Udp Icmp And The Transport Layer
Tcp ip
Error detection correction (CRC)
Transport layer services
Congestion control in TCP
TCP - Transmission Control Protocol
TCP/IP Model
Media Access Control
TCP IP Addressing
transport layer
Chapter 23
TCP and UDP
Ip addressing classful
User Datagram protocol For Msc CS
Flow & Error Control
Ad

Viewers also liked (7)

PPTX
Tcp and udp
PPT
Comparacion estre modelos osi y tcp/ip
PPTX
PPT
Ejemplo De AplicacióN En El Modelo Tcp
PPTX
Comparacion modelo osi y tcp ip
PPT
Comparacion entre el modelo TCP/IP Y MODELO OSI
PPTX
3. Modelos OSI y TCP/IP (Características, Funciones, Diferencias)
Tcp and udp
Comparacion estre modelos osi y tcp/ip
Ejemplo De AplicacióN En El Modelo Tcp
Comparacion modelo osi y tcp ip
Comparacion entre el modelo TCP/IP Y MODELO OSI
3. Modelos OSI y TCP/IP (Características, Funciones, Diferencias)
Ad

Similar to UDP - User Datagram Protocol (20)

PPT
UDP and TCP header.ppt
PPTX
NETWORK PROTOCOLS lecture one introdection to protocols
PPT
PPT
Unityfyfyufhufhhcfhfufhufhhufufhyrruruuf4-2.ppt
PPTX
07 coms 525 tcpip - udp
PPTX
What Is User Datagram Protocol?
PPTX
CN Activity 3.pptx
PPT
UDP protocol description in computer network
PDF
UNit-4 Transport Layer and its protocols.pdf
PDF
Transport layer
PPT
Computer Network - Transport Layer Services
PDF
TCP Vs UDP
PDF
VPN - Virtual Private Network
PPTX
TCP and UDP comparison and itsi application.pptx
PDF
Transport Layer Numericals
PPT
Internet Video
PPTX
Presentation of the details of tcp and udp protocols
DOCX
UDP and TCP Protocol & Encrytion and its algorithm
PPTX
PPTX
#1 (TCPvs. UDP)
UDP and TCP header.ppt
NETWORK PROTOCOLS lecture one introdection to protocols
Unityfyfyufhufhhcfhfufhufhhufufhyrruruuf4-2.ppt
07 coms 525 tcpip - udp
What Is User Datagram Protocol?
CN Activity 3.pptx
UDP protocol description in computer network
UNit-4 Transport Layer and its protocols.pdf
Transport layer
Computer Network - Transport Layer Services
TCP Vs UDP
VPN - Virtual Private Network
TCP and UDP comparison and itsi application.pptx
Transport Layer Numericals
Internet Video
Presentation of the details of tcp and udp protocols
UDP and TCP Protocol & Encrytion and its algorithm
#1 (TCPvs. UDP)

More from Peter R. Egli (20)

PDF
LPWAN Technologies for Internet of Things (IoT) and M2M Scenarios
PDF
Data Networking Concepts
PDF
Communication middleware
PDF
Transaction Processing Monitors (TPM)
PDF
Business Process Model and Notation (BPMN)
PDF
Microsoft .NET Platform
PDF
Overview of Cloud Computing
PDF
MQTT - MQ Telemetry Transport for Message Queueing
PDF
Enterprise Application Integration Technologies
PDF
Overview of Microsoft .Net Remoting technology
PDF
Android Native Development Kit
PDF
Overview of SCTP (Stream Control Transmission Protocol)
PDF
Overview of SCTP (Stream Control Transmission Protocol)
PDF
Web services
PDF
Overview of Spanning Tree Protocol (STP & RSTP)
PDF
MSMQ - Microsoft Message Queueing
PDF
Common Object Request Broker Architecture - CORBA
PDF
Component Object Model (COM, DCOM, COM+)
PDF
JMS - Java Messaging Service
PDF
Web Services (SOAP, WSDL, UDDI)
LPWAN Technologies for Internet of Things (IoT) and M2M Scenarios
Data Networking Concepts
Communication middleware
Transaction Processing Monitors (TPM)
Business Process Model and Notation (BPMN)
Microsoft .NET Platform
Overview of Cloud Computing
MQTT - MQ Telemetry Transport for Message Queueing
Enterprise Application Integration Technologies
Overview of Microsoft .Net Remoting technology
Android Native Development Kit
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)
Web services
Overview of Spanning Tree Protocol (STP & RSTP)
MSMQ - Microsoft Message Queueing
Common Object Request Broker Architecture - CORBA
Component Object Model (COM, DCOM, COM+)
JMS - Java Messaging Service
Web Services (SOAP, WSDL, UDDI)

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Empathic Computing: Creating Shared Understanding
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Unlocking AI with Model Context Protocol (MCP)
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Modernizing your data center with Dell and AMD
PDF
cuic standard and advanced reporting.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Empathic Computing: Creating Shared Understanding
Per capita expenditure prediction using model stacking based on satellite ima...
NewMind AI Weekly Chronicles - August'25 Week I
CIFDAQ's Market Insight: SEC Turns Pro Crypto
The AUB Centre for AI in Media Proposal.docx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Network Security Unit 5.pdf for BCA BBA.
Unlocking AI with Model Context Protocol (MCP)
“AI and Expert System Decision Support & Business Intelligence Systems”
Modernizing your data center with Dell and AMD
cuic standard and advanced reporting.pdf
Machine learning based COVID-19 study performance prediction
Review of recent advances in non-invasive hemoglobin estimation
Digital-Transformation-Roadmap-for-Companies.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Mobile App Security Testing_ A Comprehensive Guide.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

UDP - User Datagram Protocol

  • 1. © Peter R. Egli 2015 1/7 Rev. 3.50 UDP - User Datagram Protocol indigoo.com INTRODUCTION TO USER DATAGRAM PROTOCOL, A SIMPLE PACKET TRANSPORT SERVICE IN THE INTERNET PROTOCOL SUITE PETER R. EGLI INDIGOO.COM USER DATAGRAM PROTOCOL UDP
  • 2. © Peter R. Egli 2015 2/7 Rev. 3.50 UDP - User Datagram Protocol indigoo.com Contents 1. UDP (RFC768) characteristics 2. UDP Service 3. Typical UDP applications 4. UDP Checksum 5. UDP versus TCP
  • 3. © Peter R. Egli 2015 3/7 Rev. 3.50 UDP - User Datagram Protocol indigoo.com 1. UDP (RFC768) characteristics • No connection establishment/teardown; data is just sent right away. • No flow control / congestion control, sender can overrun receiver‘s buffer:  UDP is not suited for bulk data transfer.  For data transfer with UDP a lock-step protocol is required (to be implemented by the application). • No error control; corrupted data is not retransmitted (even though UDP header has a checksum to detect errors and report these to the application). Packet 4 is dropped (buffer overrun). Host 1 Host 2 Packet 1 is sent to the application. Packet 4 is missing. The packet loss needs to be handled by the application (detection, retransmission). 1 Packet 1 is stored in the receive queue. 1 2 1 2 1 2 3 4 3 1 2 3 5 Packet 2 is stored in the receive queue. Packet 3 is stored in the receive queue. 2 3 5 1 Host 1 sends packets.
  • 4. © Peter R. Egli 2015 4/7 Rev. 3.50 UDP - User Datagram Protocol indigoo.com 2. UDP service  UDP is basically a simple extension of the IP datagram service.  UDP adds multiplexing (on port number) to IP datagram service.  Application writes are mapped 1:1 to UDP datagrams; UDP passes these 1:1 to the IP layer. UDP layer Appl. IP packets Application sends packets (APDU’s) over the socket interface Socket interface IP layer 2500 300 500 150 TPDU’s (UDP datagrams) 2500 300 500 150 300 500 15015001000 IP layer 300 2500 500 150 UDP layer 300 2500 500 150 Appl. Application reads packets (APDU’s) from the socket interface TPDU’s (UDP datagrams) 2500byte packet is too big. IP layer fragments the UDP datagram.
  • 5. © Peter R. Egli 2015 5/7 Rev. 3.50 UDP - User Datagram Protocol indigoo.com 3. Typical UDP applications UDP is best suited for applications with short command-response type „transactions“ that do not justify the establishment / release prior to the data exchange. Host 1 Host 2 SNMP GET Request SNMP GET Response SNMP Host 1 Host 2 DNS Query DNS Response DNS Host 1 Host 2 Time request Time response SNTP Host 1 Host 2 DHCP Request DHCP Response DHCP/Bootp Host 1 Host 1 Host 2 RIP Route Update RIPHost 2 RADIUS Access Request RADIUS RADIUS Access Accept Host 1 Host 2 RPC Request RPC Reply RPC
  • 6. © Peter R. Egli 2015 6/7 Rev. 3.50 UDP - User Datagram Protocol indigoo.com 4. UDP checksum  UDP has a checksum too that provides minimal protection against transmission errors.  The checksum is optional; if it is not used it shall be set to 0.  Becaus the IP addresses are used in the UDP checksum calculation, UDP is tightly bound to the IP layer. Therefore UDP can only run on top of IP. Pseudo header The checksum is calculated over the pseudo header, UDP header and data (UDP payload). Source Port Destination Port Checksum Length Data UDP Length00000000 Protocol=17 UDP Length IP Destination Address IP Source Address UDP header
  • 7. © Peter R. Egli 2015 7/7 Rev. 3.50 UDP - User Datagram Protocol indigoo.com 5. UDP versus TCP TCP  Connection-oriented, point-to-point (unicast)  Reliable end-to-end: No bit errors due to checksum. Packet ordering preserved. No duplicates. No packet loss.  Stream-oriented (no message boundary preservation)  Has flow control to maximise throughput  Has congestion control to minimise packet loss  Analogon: phone Examples of application protocols using TCP: HTTP, SMTP, FTP, TELNET UDP  Connection-less, best-effort  Not reliable (no retransmissions)  Message boundary preservation  No flow control  No congestion control  Analogon: mail (snail mail) Examples of application protocols using UDP: SNMP, DNS, TFTP, RTP, DHCP, SNTP N.B.: It is possible to run application protocols over both TCP and UDP. E.g. DNS is normally run on UDP, but for zone transfers (higher data volume) DNS uses TCP. Actually there is a shift towards using TCP instead UDP since TCP can better provide security (SSL/TLS, simpler filtering in firewalls etc.).