Back to the 2025 paper

Module 4: Transport Layer & Congestion Control

20257m

How is a TCP connection established in the transport layer? Describe with a diagram.

Worked SolutionAI Assisted

TCP Connection Establishment: Three-Way Handshake

TCP is connection-oriented, so both sides synchronize sequence numbers before data transfer using three segments.

SVGVector Architecture Diagram (SVG)
Client Server SYN, seq=x SYN+ACK, seq=y, ack=x+1 ACK, ack=y+1 SYN_SENT ESTABLISHED LISTEN SYN_RCVD ESTABLISHED

Steps

  1. SYN: the client (active open) sends a segment with SYN=1 and its initial sequence number xx.
  2. SYN + ACK: the server (passive open, in LISTEN) replies with SYN=1, ACK=1, its own initial sequence number yy and acknowledgement x+1x+1.
  3. ACK: the client sends ACK=1 with acknowledgement y+1y+1. Both sides are now in ESTABLISHED and data transfer begins.

Points to note

  • The SYN segment consumes one sequence number.
  • The handshake also negotiates parameters such as window size and MSS.
  • Using random initial sequence numbers protects against old duplicate segments and spoofing.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.