Computer Networks · TEE · papers

Q1(d) · TCP flow control

2022-11-16 · AI-only Sem V

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

Q1(d). What is flow control in TCP and how is it implemented? [5 marks]

Answer

Transmission Control Protocol (TCP) provides reliable ordered byte-stream communication between two endpoints over an unreliable IP service. It repairs many network losses while the connection remains viable; a failed connection still must be handled by the application.

  • Connection-oriented: state is established between endpoints before ordinary data transfer.
  • Reliable, ordered byte stream: sequence numbers, acknowledgements and retransmission handle loss; application message boundaries are not preserved.
  • Full duplex: each direction has its own byte sequence and ACK information.
  • Receiver flow control: advertised receive window limits data the receiver can accept.
  • Congestion control: the sender also limits sending based on network conditions.
  • Checksum detects corruption; ports multiplex connections. Reliability does not equal encryption.
  • Segmentation divides stream bytes into transport segments; buffering and retransmission reconstruct the ordered stream.
Swipe across the diagram to read its labels ↔
TCP header: minimum 20 bytes
Diagram: TCP header: minimum 20 bytes. Labels: TCP header: minimum 20 bytes | TCP header: minimum 20 bytes | Source port · 16 | Destination port · 16 | Sequence number · 32 | Acknowledgement number · 32 | Offset / reserved / flags · 16 | Receive window · 16 | Checksum · 16 | Urgent pointer · 16 | Options + padding, if present | Data offset counts 32-bit words; minimum value 5.
TCP base header; optional fields follow the minimum 20 bytes.
FieldMeaning
Source/destination ports (16 each)Identify process endpoints
Sequence number (32)First data-byte number in this segment; SYN/FIN also occupy sequence space
Acknowledgement number (32)Next sequence number expected when ACK flag is set
Data offset (4)TCP header length in 32-bit words; minimum 5 → 20 bytes
FlagsSYN establishes; ACK validates acknowledgement; FIN closes a sending direction; RST aborts; others have defined purposes
Window (16 base field)Advertised receive window; scaling can be negotiated
Checksum (16)Covers TCP header/data and pseudo-header
Urgent pointer (16)Used with URG for the urgent indication
Options/paddingOptional features such as MSS; align header to 32-bit words

Yaad rakho: TCP bytes count karta hai; writes ke borders preserve nahi.

Mechanism: the receiver advertises free buffer space as rwnd. The sender limits outstanding unacknowledged bytes to the advertised window, subject also to congestion control. ACKs move the window; a zero window pauses ordinary sending, with persist probes to learn when space reopens. For example, with4000 free bytes and1000 already outstanding, at most3000 more bytes can be outstanding under flow control. Flow control protects the receiver; congestion control protects the network.