0% found this document useful (0 votes)
79 views6 pages

UDP - User Datagram Protocol - RFC768

The document discusses the characteristics of UDP including that it does not establish connections, provide flow or error control, or guarantee delivery. It provides examples of typical UDP applications like DNS, DHCP, and describes how UDP provides multiplexing and checksums but is not as reliable as TCP.

Uploaded by

krul786
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views6 pages

UDP - User Datagram Protocol - RFC768

The document discusses the characteristics of UDP including that it does not establish connections, provide flow or error control, or guarantee delivery. It provides examples of typical UDP applications like DNS, DHCP, and describes how UDP provides multiplexing and checksums but is not as reliable as TCP.

Uploaded by

krul786
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

UDP - User Datagram Protocol - RFC768

Contents 1. UDP (RFC768) characteristics 2. UDP Service 3. Typical UDP applications 4. UDP Checksum 5. UDP versus TCP

indigoo.com

Peter R. Egli 2013

1 Rev. 3.30

UDP - User Datagram Protocol - RFC768


1. UDP (RFC768) characteristics

indigoo.com

No connection establishment/teardown; data is just sent right away. No flow control / congestion control, sender can overrun receivers 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).
Host 1 1 1 2 Host 1 sends packets. 2 1 3 2 1 3 2 1 5 3 2 Host 2 Packet 1 is stored in the receive queue. Packet 2 is stored in the receive queue. Packet 3 is stored in the receive queue.

Packet 4 is dropped (buffer overrun). Packet 1 is sent to the application.


1

Packet 4 is missing. The packet loss needs to be handled by the application (detection, retransmission).
2 Rev. 3.30

Peter R. Egli 2013

UDP - User Datagram Protocol - RFC768


2. UDP service

indigoo.com

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.
Appl.
300 2500 500 150 Application sends packets (APDUs) over the socket interface Socket interface Application reads packets (APDUs) from the socket interface

Appl.
150 500 2500

300

UDP layer
300 2500 500 150 TPDUs (UDP datagrams) TPDUs (UDP datagrams)

UDP layer
150 500 2500 300

2500byte packet is too big. IP layer fragments the UDP datagram.

IP layer
300
Peter R. Egli 2013

IP layer
1000 1500 500 150 IP packets
3 Rev. 3.30

UDP - User Datagram Protocol - RFC768


3. Typical UDP applications

indigoo.com

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

SNMP
SNMP GET Request

Host 2

Host 1

DNS
DNS Query

Host 2

Host 1

SNTP
Time request

Host 2

SNMP GET Response

DNS Response

Time response

Host 1

DHCP/Bootp
DHCP Request

Host 2

Host 1

RADIUS
RADIUS Access Request

Host 2

Host 1

RIP
RIP Route Update

Host 2

DHCP Response

RADIUS Access Accept

Host 1

RPC
RPC Request

Host 2

RPC Reply

Peter R. Egli 2013

4 Rev. 3.30

UDP - User Datagram Protocol - RFC768


4. UDP checksum

indigoo.com

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.

IP Source Address IP Destination Address The checksum is calculated over the pseudo header, UDP header and data (UDP payload). 00000000 Protocol=17 UDP Length UDP Length Destination Port Length Data Pseudo header

Source Port Checksum

UDP header

Peter R. Egli 2013

5 Rev. 3.30

UDP - User Datagram Protocol - RFC768


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.

indigoo.com

UDP Connection-less, best-effort

Not reliable (no retransmissions)

Stream-oriented (no message boundary preservation) Message boundary preservation Has flow control to maximise throughput Has congestion control to minimise packet loss Analogon: phone No flow control No congestion control Analogon: mail (snail mail) Examples of application protocols using UDP: SNMP, DNS, TFTP, RTP, DHCP, SNTP

Examples of application protocols using TCP: HTTP, SMTP, FTP, TELNET

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.).
Peter R. Egli 2013 6 Rev. 3.30

You might also like