Computer Networks · TEE · papers
Q1(d) · UDP applications
2023-11-22 · Final 2023-24 / Re-exam 2022-23
Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.
Q1(d). UDP would make a good candidate as a transport protocol if reliability is not of primary importance. Justify this statement with any 5 applications of UDP. [5 marks]
Answer
User Datagram Protocol (UDP) provides connectionless, message-oriented process delivery. One send creates a datagram; message boundaries are retained. UDP has an 8-byte header, carries ports and length, and offers checksum-based corruption detection. It does not itself guarantee delivery, ordering, duplicate suppression, retransmission, flow control or congestion control.
| UDP field | Width | Purpose |
|---|---|---|
| Source port | 16 bits | Sending endpoint; a zero value can indicate no reply port when unused |
| Destination port | 16 bits | Receiving application endpoint |
| Length | 16 bits | UDP header plus UDP payload; minimum 8 bytes |
| Checksum | 16 bits | Error detection over UDP and an IP pseudo-header; not retransmission |
Operation and services
- The application chooses the destination IP/port and supplies a message. UDP adds its header and passes the datagram to IP without a connection handshake.
- The receiving UDP layer validates the length/checksum as applicable and uses the destination endpoint to deliver the datagram.
- A corrupt or undeliverable datagram may be discarded; UDP does not recover it. Any reliability or rate-control policy must come from the application or a protocol above UDP.
- UDP checksum zero can mean checksum omitted in IPv4. IPv6 ordinarily requires the UDP checksum; specialized exceptions are outside this syllabus.
Yaad rakho: UDP datagram preserve; reliability automatic nahi.
Five suitable application examples
| Application | Why UDP can suit it |
|---|---|
| DNS queries | Small request/reply; application retries if necessary. DNS also supports TCP. |
| DHCP | A host without an assigned address can use UDP broadcasts to obtain configuration. |
| Real-time audio/video using RTP | Late packets are often less useful than timely packets; application handles loss/jitter. |
| Online game state updates | A newer position can replace a stale one; application-specific reliability can protect critical events. |
| NTP | Small timestamp exchanges; a fresh later measurement can replace a lost exchange. |
These are examples of applications that can use UDP, not a claim that every implementation of each application always uses UDP. Applications must still manage congestion responsibly.