Computer Networks · Revision notes

Transport Layer (TCP & UDP)

The transport layer provides process-to-process communication. This chapter compares UDP and TCP, explains ports and sockets, walks through the TCP three-way handshake and connection teardown, and gives an overview of flow control (sliding window) and congestion control (slow start, congestion avoidance).

Quick revision

  • Socket = IP + port; ports 0–1023 well-known
  • UDP: 8-byte header, no connection, no reliability
  • TCP: SYN → SYN+ACK → ACK; close with FIN/ACK each way
  • SYN and FIN each consume one sequence number
  • Stop-and-wait efficiency 1/(1+2a); window for 100% = 1+2a
  • GBN window 2^k - 1; SR window 2^(k-1)
  • Slow start doubles per RTT; AIMD; timeout → cwnd = 1, ssthresh = cwnd/2
Read the full Transport Layer (TCP & UDP) notes on Doubtclip →