What is the difference between a 'connection-oriented' service at Layer 4 (TCP) and a 'connectionless' service (UDP) in terms of the state maintained?
- A.TCP and UDP both maintain connection state; UDP state is stored in the IP header.
- B.TCP maintains state on both endpoints: sequence numbers, ACK numbers, window size, congestion window, timers, and socket state machine (LISTEN, SYN_SENT, ESTABLISHED, etc.). UDP maintains no per-connection state: each datagram is sent independently with only source/destination IP and port, length, and checksum.
- C.UDP maintains more state than TCP because each UDP datagram includes full session metadata.
- D.TCP is connectionless for data segments; only the three-way handshake uses connection state.
Why B is correct