Connection-less Transport (UDP)
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:
- Treat the whole contents of the UDP segment as a sequence of 16-bit integers.
-
Complete a one’s complement sum of the integers.
Wraparound the carry-out to the beginning of the addition.
- Put the checksum value in the UDP checksum field.
This only adds weak protection against single bit flips.