Computer Networks · TEE · papers
Q1(a) · TCP versus UDP
2024-02-06 · 2022-23
Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.
Q1(a). Differentiate between Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). (Any 5 points each) [5 marks]
Answer
| Point | UDP | TCP | SCTP |
|---|---|---|---|
| Service unit | Datagram; preserves messages | Byte stream; no message boundaries | Messages carried in chunks; preserves boundaries |
| Connection setup | No protocol handshake | Connection; usual three-way SYN exchange | Association; four-message cookie exchange |
| Reliability | No delivery/order guarantee | Reliable ordered stream | Reliable messages; ordered per stream by default, unordered option |
| Ordering scope | None supplied | One ordered byte stream per direction | Multiple streams; per-stream order avoids blocking every stream on one stream’s ordering gap |
| Flow control | Not supplied by UDP | Receiver-advertised window | Receiver flow control |
| Congestion control | Not supplied by UDP | Yes | Yes |
| Multihoming | No built-in association failover | Classic TCP uses one address pair | Association can bind multiple addresses; built-in path failover |
| Header | 8 bytes | Minimum 20 bytes | 12-byte common header plus chunks |
| Typical use | DNS, real-time applications with their own controls | Web over HTTP/1.1 or HTTP/2, reliable byte transfers | Telecom signalling and multi-stream message applications |
| Performance claim | Low protocol overhead, not automatically fastest overall | Recovery/ordering have costs and benefits | Extra capabilities; no universal speed ranking |
The correct protocol depends on application semantics and network conditions. “UDP is always faster” and “SCTP is always slower than TCP” are not defensible general rules. All three normally run above IP; security/encryption is a separate requirement.
Yaad rakho: UDP messages simple; TCP byte stream; SCTP reliable message streams.