Show understanding of the TCP/IP protocol suite

Published by Patrick Mutisya · 14 days ago

Cambridge A-Level Computer Science 9618 – 14.1 Protocols

14.1 Protocols – Understanding the TCP/IP Protocol Suite

1. Why Protocols Matter

A protocol defines the rules that allow two or more devices to communicate. In computer networks these rules cover:

  • Data format and representation
  • Addressing and routing
  • Error detection and correction
  • Sequencing and flow control
  • Connection establishment and termination

2. The TCP/IP Model

The TCP/IP suite is organised into four logical layers. Each layer provides services to the layer above it and uses the services of the layer below it.

Layer (TCP/IP)Corresponding OSI Layer(s)Primary FunctionsKey Protocols
ApplicationApplication, Presentation, SessionProvides network services to end‑user applications; data representation and encoding.HTTP, HTTPS, FTP, SMTP, DNS, POP3, IMAP, Telnet
TransportTransportEnd‑to‑end communication, reliability, flow control, multiplexing.TCP, UDP
InternetNetworkLogical addressing, routing of packets across multiple networks.IP (IPv4, IPv6), ICMP, IGMP
Link (Network Access)Data Link, PhysicalPhysical transmission of bits, framing, MAC addressing.Ethernet, Wi‑Fi (IEEE 802.11), PPP, ARP

3. Core Protocols

3.1 Internet Protocol (IP)

IP provides the fundamental addressing and routing service. Two versions are in use:

  • IPv4 – 32‑bit address space (≈ 4.3 × 10⁹ addresses). Header length is variable, typically 20 bytes.
  • IPv6 – 128‑bit address space (≈ 3.4 × 10³⁸ addresses). Fixed 40‑byte header, simplified processing.

Both versions use a best‑effort delivery model – they do not guarantee delivery, ordering or integrity.

3.2 Transmission Control Protocol (TCP)

TCP adds reliability to IP by providing:

  • Connection‑oriented communication (three‑way handshake)
  • Sequencing of bytes and reassembly
  • Retransmission of lost segments
  • Flow control using a sliding window
  • Congestion control (slow start, congestion avoidance)

Typical header size is 20 bytes (without options).

3.3 User Datagram Protocol (UDP)

UDP offers a lightweight, connectionless service:

  • No guarantee of delivery or ordering
  • Fixed 8‑byte header
  • Suitable for time‑critical applications (e.g., VoIP, online gaming, DNS queries)

3.4 Internet Control Message Protocol (ICMP)

ICMP is used for diagnostic and control messages, such as:

  • Echo request/reply (used by ping)
  • Destination unreachable, time‑exceeded, redirect messages

3.5 Address Resolution Protocol (ARP)

ARP maps an IPv4 address to a MAC address on a local network. The typical exchange is:

  1. Host A broadcasts an ARP request: “Who has 192.168.1.10?”
  2. Host B replies with its MAC address.

4. Example Communication Flow (TCP)

Consider a client retrieving a web page from a server using HTTP over TCP.

  1. Client initiates a TCP three‑way handshake (SYN, SYN‑ACK, ACK).
  2. Client sends an HTTP GET request as a TCP segment.
  3. Server acknowledges receipt and sends the requested HTML data in one or more TCP segments.
  4. Client acknowledges each segment; any lost segment is retransmitted.
  5. When the transfer is complete, the client initiates a graceful termination (FIN, ACK, FIN, ACK).

5. Comparison with the OSI Model

While the OSI model is useful for teaching, the TCP/IP suite is the practical standard. Key differences include:

  • TCP/IP combines OSI’s Application, Presentation and Session layers into a single Application layer.
  • TCP/IP’s Link layer merges OSI’s Data Link and Physical layers.
  • TCP/IP was defined by the protocols themselves; OSI was a theoretical reference model.

6. Summary of Key Points

  • The TCP/IP suite consists of four layers: Application, Transport, Internet, Link.
  • IP provides addressing and routing; TCP adds reliable, ordered delivery; UDP provides fast, connectionless delivery.
  • ICMP, ARP, and other auxiliary protocols support network management and address resolution.
  • Understanding the header fields and the sequence of messages (handshakes, acknowledgements, etc.) is essential for troubleshooting.

Suggested diagram: Layered view of the TCP/IP model with example protocols in each layer.