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

PointUDPTCPSCTP
Service unitDatagram; preserves messagesByte stream; no message boundariesMessages carried in chunks; preserves boundaries
Connection setupNo protocol handshakeConnection; usual three-way SYN exchangeAssociation; four-message cookie exchange
ReliabilityNo delivery/order guaranteeReliable ordered streamReliable messages; ordered per stream by default, unordered option
Ordering scopeNone suppliedOne ordered byte stream per directionMultiple streams; per-stream order avoids blocking every stream on one stream’s ordering gap
Flow controlNot supplied by UDPReceiver-advertised windowReceiver flow control
Congestion controlNot supplied by UDPYesYes
MultihomingNo built-in association failoverClassic TCP uses one address pairAssociation can bind multiple addresses; built-in path failover
Header8 bytesMinimum 20 bytes12-byte common header plus chunks
Typical useDNS, real-time applications with their own controlsWeb over HTTP/1.1 or HTTP/2, reliable byte transfersTelecom signalling and multi-stream message applications
Performance claimLow protocol overhead, not automatically fastest overallRecovery/ordering have costs and benefitsExtra 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.