Skip to content
AL-602 · Computer Networks/Quick Revision Short Notes

Computer Networks (AL-602) - Unit 5 Short Notes

How unit 5 is examined

Transport layer services, UDP and TCP (header, connection, flow and congestion control), then the application protocols and SNMP. Marks sit in TCP flow control, congestion control and header format, then design issues, SNMP, UDP and TCP connections.

Transport Layer: Design Issues

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>

Definition. The transport layer provides end-to-end, process-to-process communication between application processes on two hosts, hiding the network beneath it.

Key points.

  1. Addressing: a port number identifies the process, so an (IP address, port) pair, called a socket, names one end of a conversation.
  2. Multiplexing and demultiplexing: many applications share one network connection, and the transport layer delivers each segment to the right port.
  3. Segmentation and reassembly: application data is cut into segments that fit the network, and the receiver puts them back in order.
  4. Connection management: TCP sets up and releases a connection, while UDP is connectionless.
  5. Flow and error control are done end to end: the receiver's buffer is protected and lost or corrupted segments are retransmitted (TCP only).
  6. Congestion control keeps the sender from overloading the network (TCP).

Quality of service parameters. Each one tells the application what it can expect from the transport service.

QoS parameter Meaning and significance
Connection establishment delay Time from request to confirmation; short is needed for interactive use.
Throughput Bytes per second transferred; vital for file transfer and video.
Transit delay Time from send to receipt; vital for voice and games.
Residual error ratio Fraction of data lost or garbled; must be near zero for banking and files.
Jitter Variation in delay; critical for audio and video streaming.

Answer frame. Services question: open with the definition; list points 1-7; add a TCP versus UDP line (reliable, connection-oriented versus unreliable, connectionless); close by saying it is the first true end-to-end layer. QoS question: open with "QoS parameters describe the service the user requests"; give the table rows with an example (jitter for voice, error ratio for files); close with the note that applications choose parameters to match their needs.

Asked: [7 marks] (May 2024) What are the various parameters of quality of service offered by the transport layer? Discuss their significance. Asked: [7 marks] (Jun 2026) Explain the services and functions of the Transport Layer.

UDP: Header Format

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>

Definition. UDP (User Datagram Protocol) is a connectionless, unreliable transport protocol with a fixed 8-byte header of four 16-bit fields.

Bits 0-15 Bits 16-31
Source port Destination port
Length Checksum

Key points.

  1. Source port (16 bits) identifies the sending process and is optional, so it may be zero when no reply is needed.
  2. Destination port (16 bits) identifies the receiving process, for example 53 for DNS.
  3. Length (16 bits) gives the total size of header plus data in bytes, with a minimum of 8.
  4. Checksum (16 bits) detects errors in the header, data and a pseudo-header, and is optional in IPv4.
  5. UDP has no connection, acknowledgement or retransmission, so it is fast and light, and is used by DNS, streaming, VoIP and SNMP.

Asked: [7 marks] (Dec 2020) Explain the UDP packet format. Asked: [7 marks] (Dec 2024) Draw and explain the header format of a User Datagram Protocol (UDP).

Per-Segment Checksum

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. The checksum is a 16-bit error-detection field computed over each segment, the header, the data and a pseudo-header.

Key points.

  1. The sender divides the data into 16-bit words, adds them with end-around carry (one's complement sum), and sends the complement of the sum.
  2. The receiver adds all words including the checksum, and the result must be all 1s, otherwise the segment is discarded.
  3. The pseudo-header (source IP, destination IP, protocol, length) catches misdelivered segments.
  4. It is mandatory in TCP and optional in UDP under IPv4.

Carrying Unicast/Multicast Real-Time Traffic

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. Real-time traffic such as voice and video is carried by RTP (Real-time Transport Protocol) running over UDP, with RTCP for control feedback.

Key points.

  1. RTP adds a sequence number and a timestamp so the receiver can reorder packets and play them with correct timing.
  2. UDP is used because retransmission would arrive too late, so occasional loss is preferred to delay.
  3. Unicast sends one stream per receiver, while multicast sends one stream to a group through IP multicast, saving bandwidth.

TCP: Connection Management

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>

Definition. TCP is connection-oriented: it establishes a connection with a three-way handshake and releases it with FIN segments.

Diagram. <figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u5-01" viewBox="0 0 424 338" width="424" height="338" role="img" aria-label="C = client, S = server; the client sends SYN, the server replies SYN+ACK, the client sends ACK"><style>#dsfig-u5-01 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u5-01 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u5-01 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u5-01 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u5-01 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u5-01 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u5-01 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u5-01 .t{fill:#16181D;font-weight:500}#dsfig-u5-01 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u5-01 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u5-01 .dot{fill:#16181D}#dsfig-u5-01 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u5-01 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u5-01 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u5-01 .ah{fill:#454C5A}#dsfig-u5-01 .ah.hi{fill:#2340B8}#dsfig-u5-01 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u5-01 .wl .t{font-size:12px;font-weight:700}#dsfig-u5-01 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u5-01 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u5-01 .e{stroke:#B1B7C3}html.dark #dsfig-u5-01 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u5-01 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u5-01 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u5-01 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u5-01 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u5-01 .t{fill:#E6E8ED}html.dark #dsfig-u5-01 .t.inv{fill:#0F1115}html.dark #dsfig-u5-01 .kd{stroke:#E6E8ED}html.dark #dsfig-u5-01 .dot{fill:#E6E8ED}html.dark #dsfig-u5-01 .ann{fill:#8FA3FF}html.dark #dsfig-u5-01 .lbl{fill:#858D9C}html.dark #dsfig-u5-01 .ptr{fill:#8FA3FF}html.dark #dsfig-u5-01 .ah{fill:#B1B7C3}html.dark #dsfig-u5-01 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u5-01 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u5-01 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u5-01 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah12" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh12" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M59,40 L363,40" marker-end="url(#ah12)"/><path class="e" d="M368.8,51.4 L56.8,285.4" marker-end="url(#ah12)"/><path class="e" d="M59,298 L363,298" marker-end="url(#ah12)"/><g class="wl"><rect x="170.9" y="31" width="82.2" height="18" rx="9"/><text class="t" x="212" y="40" dy=".35em" text-anchor="middle">SYN(seq=x)</text></g><g class="wl"><rect x="142.6" y="160" width="138.9" height="18" rx="9"/><text class="t" x="212" y="169" dy=".35em" text-anchor="middle">SYN+ACK(y,ack=x+1)</text></g><g class="wl"><rect x="163.7" y="289" width="96.6" height="18" rx="9"/><text class="t" x="212" y="298" dy=".35em" text-anchor="middle">ACK(ack=y+1)</text></g><circle class="n" cx="40" cy="40" r="18"/><text class="t" x="40" y="40" dy=".35em" text-anchor="middle">C</text><circle class="n" cx="384" cy="40" r="18"/><text class="t" x="384" y="40" dy=".35em" text-anchor="middle">S</text><circle class="n" cx="40" cy="298" r="18"/><text class="t" x="40" y="298" dy=".35em" text-anchor="middle">C2</text><circle class="n" cx="384" cy="298" r="18"/><text class="t" x="384" y="298" dy=".35em" text-anchor="middle">S2</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">C = client, S = server; the client sends SYN, the server replies SYN+ACK, the client sends ACK</figcaption></figure>

Key points.

  1. Establishment: the client sends SYN with its initial sequence number x, the server answers SYN+ACK with its own number y and ack x+1, and the client sends ACK y+1.
  2. The three-way handshake synchronises both sequence numbers and avoids duplicate old connections.
  3. Release: each direction is closed separately, so the closing side sends FIN, the other acknowledges it, then sends its own FIN, which is acknowledged (four segments).
  4. The side that closes last waits in TIME_WAIT for twice the maximum segment lifetime so delayed segments die out.
  5. Main states: CLOSED, LISTEN, SYN_SENT, SYN_RCVD, ESTABLISHED, FIN_WAIT, CLOSE_WAIT, TIME_WAIT.

Asked: [7 marks] (May 2022) Explain the connection establishment and connection release in Transport protocols.

Reliability of Data Transfers

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. TCP gives reliable delivery by numbering bytes, acknowledging them and retransmitting whatever is lost.

Key points.

  1. Every byte has a sequence number, and the acknowledgement number names the next byte expected.
  2. If an ACK does not arrive before the retransmission timer expires, the segment is sent again.
  3. Three duplicate ACKs trigger fast retransmit without waiting for the timer.
  4. The receiver uses sequence numbers to discard duplicates and reorder segments.

TCP Flow Control

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">High weight</span>

Definition. TCP flow control stops a fast sender from overflowing a slow receiver, using a sliding window whose size the receiver advertises.

Key points.

  1. The receiver states its free buffer space in the window field of every ACK, called the advertised window (rwnd).
  2. The sender may have at most rwnd unacknowledged bytes outstanding, and the window slides forward as ACKs arrive.
  3. If rwnd becomes 0, the sender stops and sends small probe segments (window probe) to learn when space returns.
  4. The window field is 16 bits, so the maximum window is 65535 bytes without the window-scale option.
  5. Throughput is limited to one window per round trip.
  6. It is end to end and protects the receiver, while congestion control protects the network.

Formula.

$$\text{Throughput}=\frac{\text{Window}}{RTT},\qquad RTT=2\times\text{one-way delay},\qquad \text{Efficiency}=\frac{\text{Throughput}}{\text{Bandwidth}}\times100\%$$

Example. Window 65535 B, bandwidth 1 Gbps, one-way delay 10 ms.

Step Working
RTT $2\times10=20$ ms $=0.02$ s
Window in bits $65535\times8=524280$ bits
Throughput $524280/0.02=26{,}214{,}000$ bps
Efficiency $26.214/1000\times100=2.62\%$

Maximum throughput = 26.214 Mbps; line efficiency = 2.62%. The bandwidth-delay product is 2.5 MB, far above the window.

<mark>Throughput is window divided by round-trip time, so a 65535-byte window on a 1 Gbps, 20 ms RTT link uses only 2.62% of the line.</mark>

Answer frame. Open with the definition; draw a sender window sliding over bytes (sent-acked, sent-unacked, allowed, not allowed); develop points 1-5; for the numerical write Given, formula, table above and the bold answer; close with the flow versus congestion line.

Pitfall: Convert bytes to bits (multiply by 8) and use RTT, not the one-way delay. Asked: [14 marks] (May 2024, Jun 2025) A TCP machine is sending windows of 65535 B over a 1 Gbps channel that has a 10 msec one way delay. a) What is the maximum throughput achievable? b) What is the line efficiency?

TCP Congestion Control

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">High weight</span>

Definition. Congestion control limits the rate a sender injects data so that the network, not just the receiver, is not overloaded. TCP uses a congestion window (cwnd) and sends at most min(cwnd, rwnd).

Diagram. <figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u5-02" viewBox="0 0 561.6 329.4" width="561.6" height="329.4" role="img" aria-label="cwnd against time (rounds): exponential slow start to ssthresh, then linear growth, then on loss cwnd falls"><style>#dsfig-u5-02 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u5-02 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u5-02 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u5-02 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u5-02 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u5-02 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u5-02 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u5-02 .t{fill:#16181D;font-weight:500}#dsfig-u5-02 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u5-02 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u5-02 .dot{fill:#16181D}#dsfig-u5-02 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u5-02 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u5-02 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u5-02 .ah{fill:#454C5A}#dsfig-u5-02 .ah.hi{fill:#2340B8}#dsfig-u5-02 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u5-02 .wl .t{font-size:12px;font-weight:700}#dsfig-u5-02 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u5-02 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u5-02 .e{stroke:#B1B7C3}html.dark #dsfig-u5-02 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u5-02 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u5-02 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u5-02 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u5-02 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u5-02 .t{fill:#E6E8ED}html.dark #dsfig-u5-02 .t.inv{fill:#0F1115}html.dark #dsfig-u5-02 .kd{stroke:#E6E8ED}html.dark #dsfig-u5-02 .dot{fill:#E6E8ED}html.dark #dsfig-u5-02 .ann{fill:#8FA3FF}html.dark #dsfig-u5-02 .lbl{fill:#858D9C}html.dark #dsfig-u5-02 .ptr{fill:#8FA3FF}html.dark #dsfig-u5-02 .ah{fill:#B1B7C3}html.dark #dsfig-u5-02 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u5-02 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u5-02 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u5-02 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah13" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh13" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M57,280.9 L107.2,255.8" marker-end="url(#ah13)"/><path class="e" d="M140.8,234.5 L195.6,190.7" marker-end="url(#ah13)"/><path class="e" d="M225.4,164.2 L283.2,106.4" marker-end="url(#ah13)"/><path class="e" d="M316.2,86.1 L363.9,71.8" marker-end="url(#ah13)"/><path class="e" d="M402.2,60.3 L449.9,46" marker-end="url(#ah13)"/><path class="e" d="M476.7,57.8 L514.2,157.9" marker-end="url(#ah13)"/><g class="wl"><rect x="73.4" y="258.9" width="19.2" height="18" rx="9"/><text class="t" x="83" y="267.9" dy=".35em" text-anchor="middle">1</text></g><g class="wl"><rect x="159.4" y="203" width="19.2" height="18" rx="9"/><text class="t" x="169" y="212" dy=".35em" text-anchor="middle">2</text></g><g class="wl"><rect x="245.4" y="125.6" width="19.2" height="18" rx="9"/><text class="t" x="255" y="134.6" dy=".35em" text-anchor="middle">4</text></g><g class="wl"><rect x="331.4" y="69.7" width="19.2" height="18" rx="9"/><text class="t" x="341" y="78.7" dy=".35em" text-anchor="middle">5</text></g><g class="wl"><rect x="417.4" y="43.9" width="19.2" height="18" rx="9"/><text class="t" x="427" y="52.9" dy=".35em" text-anchor="middle">6</text></g><g class="wl"><rect x="475.4" y="99.8" width="40.8" height="18" rx="9"/><text class="t" x="495.8" y="108.8" dy=".35em" text-anchor="middle">loss</text></g><circle class="n" cx="40" cy="289.4" r="18"/><text class="t" x="40" y="289.4" dy=".35em" text-anchor="middle">A</text><circle class="n" cx="126" cy="246.4" r="18"/><text class="t" x="126" y="246.4" dy=".35em" text-anchor="middle">B</text><circle class="n" cx="212" cy="177.6" r="18"/><text class="t" x="212" y="177.6" dy=".35em" text-anchor="middle">C</text><circle class="n" cx="298" cy="91.6" r="18"/><text class="t" x="298" y="91.6" dy=".35em" text-anchor="middle">D</text><circle class="n" cx="384" cy="65.8" r="18"/><text class="t" x="384" y="65.8" dy=".35em" text-anchor="middle">E</text><circle class="n" cx="470" cy="40" r="18"/><text class="t" x="470" y="40" dy=".35em" text-anchor="middle">F</text><circle class="n" cx="521.6" cy="177.6" r="18"/><text class="t" x="521.6" y="177.6" dy=".35em" text-anchor="middle">G</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">cwnd against time (rounds): exponential slow start to ssthresh, then linear growth, then on loss cwnd falls</figcaption></figure>

Key points.

  1. Slow start begins with cwnd = 1 MSS and doubles every round trip (it grows by 1 MSS per ACK) until it reaches ssthresh.
  2. Congestion avoidance starts at ssthresh, where cwnd grows by 1 MSS per round trip, that is, linearly (additive increase).
  3. On a timeout, ssthresh is set to half the current cwnd, cwnd is reset to 1 MSS, and slow start restarts (Tahoe).
  4. Fast retransmit: three duplicate ACKs show one segment was lost, so it is resent at once without waiting for the timer.
  5. Fast recovery (Reno): ssthresh becomes cwnd/2, cwnd becomes ssthresh (plus 3), and growth continues linearly with no restart from 1.
  6. This is additive increase, multiplicative decrease (AIMD), and packet loss is taken as the sign of congestion.
  7. Causes of congestion: too much traffic, slow links, small router buffers and retransmissions.
Basis Flow control Congestion control
Protects The receiver The network
Decided by Receiver (rwnd) Sender (cwnd, from loss)
Method Sliding window Slow start, AIMD, fast retransmit
Sending limit rwnd min(cwnd, rwnd)

Routing versus congestion control. Routing chooses the path for packets (shortest path, least cost, adaptive or non-adaptive). Congestion control keeps load below capacity. Open-loop control prevents congestion by design (admission control, traffic shaping, good policies). Closed-loop control watches the network, sends feedback (choke packets, ECN, loss) and adjusts the rate.

<mark>TCP grows cwnd exponentially in slow start, linearly in congestion avoidance, and on loss halves ssthresh: additive increase, multiplicative decrease.</mark>

Answer frame. Open with the definition of flow control (rwnd) then of congestion control (cwnd); draw the cwnd-time plot marking slow start, ssthresh, congestion avoidance, timeout and fast recovery; develop points 1-6 in order; add the comparison table; close with AIMD. For the routing question, define both, then give open loop versus closed loop and the causes in point 7.

Asked: [7 marks] (May 2022) Explain routing and congestion control. Asked: [7 marks] (May 2023, Jun 2026) Discuss the concept of TCP flow control and TCP congestion control. Asked: [14 marks] (Dec 2024) Write a short note on any two: a) TCP Congestion Control b) Aloha and Slotted Aloha c) Finite State Machine d) MLMA

TCP Header Format

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">High weight</span>

Definition. The TCP segment header carries control information for reliable, ordered, flow-controlled delivery; it is 20 bytes minimum (5 words) and 60 bytes maximum with options.

Diagram. Each row is 32 bits wide.

Bits 0-15 Bits 16-31
Source port Destination port
Sequence number (32 bits)
Acknowledgement number (32 bits)
HLEN (4) + reserved (6) + flags (6): URG ACK PSH RST SYN FIN Window size (16)
Checksum Urgent pointer
Options and padding (up to 40 bytes)

Key points.

  1. Source and destination ports (16 bits each) identify the sending and receiving processes.
  2. Sequence number (32 bits) is the number of the first data byte in the segment.
  3. Acknowledgement number (32 bits) is the next byte expected and is valid when the ACK flag is set.
  4. HLEN (4 bits) gives the header length in 32-bit words (5 to 15).
  5. Flags: URG (urgent data), ACK, PSH (push), RST (reset), SYN (open) and FIN (close).
  6. Window size (16 bits) is the receiver's advertised window for flow control.
  7. Checksum covers header, data and pseudo-header, and urgent pointer marks the end of urgent data.
  8. Options carry MSS, window scale and timestamps.

Comparison with UDP.

Basis TCP UDP
Header size 20-60 bytes 8 bytes
Fields 10 plus options 4 (ports, length, checksum)
Type Connection-oriented, reliable Connectionless, unreliable
Flow and congestion control Yes No

TCP fields missing in UDP, and why.

TCP-only field Reason UDP omits it
Sequence number No ordering or byte stream, each datagram is independent.
Acknowledgement number No acknowledgements or retransmission.
HLEN The header is fixed at 8 bytes.
Flags (SYN, FIN, RST...) No connection to open, close or reset.
Window size No flow control.
Urgent pointer No urgent data mechanism.
Options No extensions, keeps the header small.

<mark>TCP header is 20 to 60 bytes with sequence, acknowledgement, flags and window for reliability; UDP is a fixed 8 bytes because it is connectionless.</mark>

Answer frame. Open with the definition; draw the 32-bit-wide TCP header with all field names, then the UDP header beside it; explain fields in order 1-8; give the comparison table, then the missing-field table with reasons; close with connection-oriented versus connectionless design.

Asked: [14 marks] (Dec 2020) Write a short notes (any three): a) TCP Header format b) IP address c) MAC Sublayer d) Data link layer Asked: [14 marks] (May 2024, Jun 2025) Compare the TCP header and the UDP header. List the fields in the TCP header that are not part of the UDP header. Give reason for each missing field. Asked: [14 marks] (Jun 2025) Write a short notes (any three): i) TCP Header Format ii) TCP flow control iii) ICMP iv) Bellman Ford Algorithm

TCP Timer Management

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. TCP keeps timers to detect loss and stalls, the main one being the retransmission timer with timeout RTO.

Key points.

  1. Retransmission timer: if an ACK is not received within RTO, the segment is resent; RTO is set from the measured round-trip time (SRTT plus 4 times the deviation).
  2. Persistence timer: after a zero window, it triggers probes so a lost window update cannot deadlock the connection.
  3. Keepalive and time-wait timers check idle connections and hold closed ones for twice the maximum segment lifetime.

Application Layer: WWW and HTTP

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. The World Wide Web is a collection of linked pages served from web servers; HTTP (HyperText Transfer Protocol) is the request-response protocol the browser uses to fetch them.

Key points.

  1. The browser sends a request (GET, POST...) to a server at a URL, and the server returns a status code and the page.
  2. HTTP runs over TCP on port 80 (HTTPS uses 443), and is stateless, so cookies keep session data.
  3. Pages are written in HTML, and each resource is named by a URL.

FTP

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. FTP (File Transfer Protocol) copies files between hosts using TCP.

Key points.

  1. It uses two connections: a control connection on port 21 for commands, and a data connection on port 20 for the file.
  2. The user logs in with a name and password, so FTP sends them in plain text.
  3. Commands such as GET, PUT and LIST move and list files.

SSH

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. SSH (Secure Shell) gives encrypted remote login and command execution over TCP port 22.

Key points.

  1. It encrypts everything, which replaces insecure Telnet, rlogin and FTP.
  2. The server is authenticated with its host key, and the user by password or public key.
  3. Session keys come from a key exchange, so data has confidentiality and integrity.

Email (SMTP, MIME, IMAP)

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>

Definition. Electronic mail sends messages between users through mail servers, using a User Agent (UA) to compose and read, and Message Transfer Agents (MTA) to move mail.

Diagram. <figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u5-03" viewBox="0 0 561.6 80" width="561.6" height="80" role="img" aria-label="UA = user agent, MS = mail server (MTA); sender pushes with SMTP, the receiver pulls with POP3 or IMAP"><style>#dsfig-u5-03 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u5-03 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u5-03 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u5-03 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u5-03 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u5-03 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u5-03 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u5-03 .t{fill:#16181D;font-weight:500}#dsfig-u5-03 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u5-03 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u5-03 .dot{fill:#16181D}#dsfig-u5-03 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u5-03 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u5-03 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u5-03 .ah{fill:#454C5A}#dsfig-u5-03 .ah.hi{fill:#2340B8}#dsfig-u5-03 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u5-03 .wl .t{font-size:12px;font-weight:700}#dsfig-u5-03 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u5-03 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u5-03 .e{stroke:#B1B7C3}html.dark #dsfig-u5-03 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u5-03 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u5-03 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u5-03 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u5-03 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u5-03 .t{fill:#E6E8ED}html.dark #dsfig-u5-03 .t.inv{fill:#0F1115}html.dark #dsfig-u5-03 .kd{stroke:#E6E8ED}html.dark #dsfig-u5-03 .dot{fill:#E6E8ED}html.dark #dsfig-u5-03 .ann{fill:#8FA3FF}html.dark #dsfig-u5-03 .lbl{fill:#858D9C}html.dark #dsfig-u5-03 .ptr{fill:#8FA3FF}html.dark #dsfig-u5-03 .ah{fill:#B1B7C3}html.dark #dsfig-u5-03 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u5-03 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u5-03 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u5-03 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah14" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh14" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M59,40 L173.8,40" marker-end="url(#ah14)"/><path class="e" d="M213.8,40 L345.8,40" marker-end="url(#ah14)"/><path class="e" d="M385.8,40 L500.6,40" marker-end="url(#ah14)"/><g class="wl"><rect x="97" y="31" width="40.8" height="18" rx="9"/><text class="t" x="117.4" y="40" dy=".35em" text-anchor="middle">SMTP</text></g><g class="wl"><rect x="260.4" y="31" width="40.8" height="18" rx="9"/><text class="t" x="280.8" y="40" dy=".35em" text-anchor="middle">SMTP</text></g><g class="wl"><rect x="406.2" y="31" width="75.9" height="18" rx="9"/><text class="t" x="444.2" y="40" dy=".35em" text-anchor="middle">POP3/IMAP</text></g><circle class="n" cx="40" cy="40" r="18"/><text class="t" x="40" y="40" dy=".35em" text-anchor="middle">UA1</text><circle class="n" cx="194.8" cy="40" r="18"/><text class="t" x="194.8" y="40" dy=".35em" text-anchor="middle">MS1</text><circle class="n" cx="366.8" cy="40" r="18"/><text class="t" x="366.8" y="40" dy=".35em" text-anchor="middle">MS2</text><circle class="n" cx="521.6" cy="40" r="18"/><text class="t" x="521.6" y="40" dy=".35em" text-anchor="middle">UA2</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">UA = user agent, MS = mail server (MTA); sender pushes with SMTP, the receiver pulls with POP3 or IMAP</figcaption></figure>

Key points.

  1. SMTP (port 25) is a push protocol that sends mail from the user agent to its server and between servers.
  2. POP3 (port 110) downloads mail to the user's machine and usually deletes it from the server.
  3. IMAP (port 143) keeps mail on the server, so folders can be managed and read from many devices.
  4. MIME extends mail beyond ASCII text, adding attachments, images and non-English text through headers and encoding such as base64.
  5. Webmail uses HTTP in a browser to reach the mail server, so no mail client is needed.
  6. Steps: compose in UA, send to the sender's server by SMTP, relay by SMTP to the receiver's server, then the receiver fetches it by POP3, IMAP or webmail.

Asked: [7 marks] (May 2023) What is Electronic Mailing. What are different ways of sending electronic mail (E-mail)? Discuss in detail.

DNS

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. DNS (Domain Name System) is a distributed database that translates host names such as www.example.com into IP addresses.

Key points.

  1. Names are organised as a hierarchy: root, top-level domains (.com, .in), then subdomains.
  2. A resolver asks a local name server, which queries root, TLD and authoritative servers if needed, and caches the answer.
  3. It normally uses UDP port 53, and TCP for zone transfers.

Network Management (SNMP)

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>

Definition. SNMP (Simple Network Management Protocol) is an application-layer protocol, running over UDP ports 161 and 162, that monitors and manages devices on an IP network.

Diagram. <figure class="ds-fig" style="margin:1.4rem 0;overflow-x:auto"><svg xmlns="http://www.w3.org/2000/svg" id="dsfig-u5-04" viewBox="0 0 381 286.4" width="381" height="286.4" role="img" aria-label="M = manager (NMS), A = agent on a router or switch; each agent keeps a MIB"><style>#dsfig-u5-04 .e{stroke:#454C5A;stroke-width:1.4;fill:none}#dsfig-u5-04 .e.hi{stroke:#2340B8;stroke-width:2.6}#dsfig-u5-04 .n{fill:#FFFFFF;stroke:#16181D;stroke-width:1.4}#dsfig-u5-04 .n.hi{fill:#E3E9FC;stroke:#2340B8;stroke-width:2.2}#dsfig-u5-04 .n.rb-b{fill:#16181D;stroke:#16181D}#dsfig-u5-04 .n.rb-r{fill:#BD3227;stroke:#BD3227}#dsfig-u5-04 text{font-family:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;font-size:13px}#dsfig-u5-04 .t{fill:#16181D;font-weight:500}#dsfig-u5-04 .t.inv{fill:#FFFFFF;font-weight:700}#dsfig-u5-04 .kd{stroke:#16181D;stroke-width:1.2}#dsfig-u5-04 .dot{fill:#16181D}#dsfig-u5-04 .ann{fill:#2340B8;font-size:11px;font-weight:700}#dsfig-u5-04 .lbl{fill:#6F7787;font-family:system-ui,-apple-system,sans-serif;font-size:12px;font-weight:700}#dsfig-u5-04 .ptr{fill:#2340B8;font-size:12px;font-weight:700}#dsfig-u5-04 .ah{fill:#454C5A}#dsfig-u5-04 .ah.hi{fill:#2340B8}#dsfig-u5-04 .wl rect{fill:#FFFFFF;stroke:#DCE0E7}#dsfig-u5-04 .wl .t{font-size:12px;font-weight:700}#dsfig-u5-04 .wl.hi rect{fill:#2340B8;stroke:#2340B8}#dsfig-u5-04 .wl.hi .t{fill:#FFFFFF}html.dark #dsfig-u5-04 .e{stroke:#B1B7C3}html.dark #dsfig-u5-04 .e.hi{stroke:#8FA3FF}html.dark #dsfig-u5-04 .n{fill:#161920;stroke:#E6E8ED}html.dark #dsfig-u5-04 .n.hi{fill:#1E2748;stroke:#8FA3FF}html.dark #dsfig-u5-04 .n.rb-b{fill:#E6E8ED;stroke:#E6E8ED}html.dark #dsfig-u5-04 .n.rb-r{fill:#FF7E71;stroke:#FF7E71}html.dark #dsfig-u5-04 .t{fill:#E6E8ED}html.dark #dsfig-u5-04 .t.inv{fill:#0F1115}html.dark #dsfig-u5-04 .kd{stroke:#E6E8ED}html.dark #dsfig-u5-04 .dot{fill:#E6E8ED}html.dark #dsfig-u5-04 .ann{fill:#8FA3FF}html.dark #dsfig-u5-04 .lbl{fill:#858D9C}html.dark #dsfig-u5-04 .ptr{fill:#8FA3FF}html.dark #dsfig-u5-04 .ah{fill:#B1B7C3}html.dark #dsfig-u5-04 .ah.hi{fill:#8FA3FF}html.dark #dsfig-u5-04 .wl rect{fill:#161920;stroke:#2A2E37}html.dark #dsfig-u5-04 .wl.hi rect{fill:#8FA3FF;stroke:#8FA3FF}html.dark #dsfig-u5-04 .wl.hi .t{fill:#0F1115}</style><defs><marker id="ah15" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah" d="M0,1 L9,5 L0,9 z"/></marker><marker id="ahh15" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path class="ah hi" d="M0,1 L9,5 L0,9 z"/></marker></defs><path class="e" d="M59.9,136.4 L321.1,46.8" marker-end="url(#ah15)" marker-start="url(#ah15)"/><path class="e" d="M61,143.2 L320,143.2" marker-end="url(#ah15)" marker-start="url(#ah15)"/><path class="e" d="M323,240.2 L59.9,150" marker-end="url(#ah15)"/><g class="wl"><rect x="163.4" y="82.6" width="54.3" height="18" rx="9"/><text class="t" x="190.5" y="91.6" dy=".35em" text-anchor="middle">GetSet</text></g><g class="wl"><rect x="163.4" y="134.2" width="54.3" height="18" rx="9"/><text class="t" x="190.5" y="143.2" dy=".35em" text-anchor="middle">GetSet</text></g><g class="wl"><rect x="170.1" y="185.8" width="40.8" height="18" rx="9"/><text class="t" x="190.5" y="194.8" dy=".35em" text-anchor="middle">Trap</text></g><circle class="n" cx="40" cy="143.2" r="18"/><text class="t" x="40" y="143.2" dy=".35em" text-anchor="middle">M</text><circle class="n" cx="341" cy="40" r="18"/><text class="t" x="341" y="40" dy=".35em" text-anchor="middle">A1</text><circle class="n" cx="341" cy="143.2" r="18"/><text class="t" x="341" y="143.2" dy=".35em" text-anchor="middle">A2</text><circle class="n" cx="341" cy="246.4" r="18"/><text class="t" x="341" y="246.4" dy=".35em" text-anchor="middle">A3</text></svg><figcaption style="font-size:.82em;opacity:.72;margin-top:.45rem">M = manager (NMS), A = agent on a router or switch; each agent keeps a MIB</figcaption></figure>

Key points.

  1. The manager (network management station) sends requests and collects data for the administrator.
  2. The agent runs on each managed device, such as a router, switch or server, and answers the manager.
  3. The MIB (Management Information Base) is the database of managed objects on the agent, each named by an object identifier (OID) defined by SMI.
  4. GetRequest reads a value, SetRequest changes a value (configuration), and GetNext walks a table.
  5. Trap is an unsolicited message from the agent to the manager reporting an event such as a link failure.
  6. Functions: monitoring performance, configuration management, and fault management, plus accounting and security.
  7. Working: the manager polls with Get, the agent returns the MIB value, and a fault makes the agent send a Trap.

Answer frame. Open with the definition; draw the manager-agent-MIB figure; develop points 1-5 and the message types; list functions (point 6); close with the note that SNMP is simple and widely used because it needs little overhead.

Asked: [7 marks] (Dec 2024, Jun 2026) Explain Simple Network Management Protocol (SNMP) and its functions; Explain the architecture and working of SNMP.

Last-minute revision

  • TCP header is 20-60 bytes; UDP is 8 bytes.
  • Three-way handshake: SYN, SYN+ACK, ACK; release uses FIN in each direction.
  • Flow control uses the receiver's advertised window (rwnd); the window field is 16 bits, so at most 65535 B.
  • Throughput = window / RTT; 65535 B, 1 Gbps, 10 ms one way gives 26.214 Mbps and 2.62% efficiency.
  • Slow start doubles cwnd every RTT up to ssthresh; congestion avoidance adds 1 MSS per RTT.
  • Timeout: ssthresh = cwnd/2 and cwnd = 1; three duplicate ACKs: fast retransmit and fast recovery.
  • Flow control protects the receiver; congestion control protects the network.
  • SMTP sends, POP3 and IMAP fetch mail; MIME allows attachments.
  • SNMP: manager, agent, MIB; Get, Set, Trap; ports 161 and 162.

Memory hooks

  • "SSA": Slow start, then Avoidance (linear), then loss halves it: AIMD.
  • SYN, SYN-ACK, ACK: "knock, answer, confirm".
  • UDP = 4 fields x 2 bytes = 8 bytes; "SDLC": Source, Destination, Length, Checksum.
  • Flow control = "receiver says how much"; congestion control = "network says how fast".
  • SNMP: "MAT": Manager, Agent, Trap.

Coverage checklist

  • Transport Layer: Design Issues: QoS parameters (May 2024), services and functions (Jun 2026).
  • UDP: Header Format: UDP packet format (Dec 2020), draw UDP header (Dec 2024).
  • Per-Segment Checksum: not asked; definition and method covered.
  • Carrying Unicast/Multicast Real-Time Traffic: not asked; covered.
  • TCP: Connection Management: connection establishment and release (May 2022).
  • Reliability of Data Transfers: not asked; covered.
  • TCP Flow Control: window/throughput numerical (May 2024, Jun 2025).
  • TCP Congestion Control: routing and congestion control (May 2022), flow plus congestion (May 2023, Jun 2026), short note (Dec 2024).
  • TCP Header Format: short notes (Dec 2020, Jun 2025), TCP versus UDP header (May 2024, Jun 2025).
  • TCP Timer Management: not asked; covered.
  • Application Layer: WWW and HTTP: not asked; covered.
  • FTP: not asked; covered.
  • SSH: not asked; covered.
  • Email (SMTP, MIME, IMAP): electronic mail and ways of sending (May 2023).
  • DNS: not asked; covered.
  • Network Management (SNMP): SNMP and functions (Dec 2024, Jun 2026).
Go to where you left off?

Quick Add to Notes

Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.

Create free account

Have an account? Log in