Skip to content
UoL CS Notes

Connection-less Transport (UDP)

COMP211 Lectures

These notes are low-effort, due to catching up in this module. See the videos and slides for more detail.

Connection-Less Transport

This means that there is:

  • No handshaking between sender, receiver.
  • Each UDP segment handled independently of others.

This saves time, is simpler and gives a small header size.

UDP Uses

UDP is used for the following:

  • Streaming multimedia apps (loss tolerant, rate sensitive).
  • DNS
  • SNMP
  • HTTP/3

If reliable transfer needed over UDP (HTTP/3):

  • Add needed reliability at application layer.
  • Add congestion control at application layer.

UDP Segment Header

A UDP segment is laid out like the following:

Source Port Destination Port
Length Checksum
Payload Payload
 

The segment is 32 bits wide.

Internet Checksum

Checksums are used to find flipped bits in transmission.

To calculate the internet checksum:

  1. Treat the whole contents of the UDP segment as a sequence of 16-bit integers.
  2. Complete a one’s complement sum of the integers.

    Wraparound the carry-out to the beginning of the addition.

  3. Put the checksum value in the UDP checksum field.

This only adds weak protection against single bit flips.