TopMyGrade

GCSE/Computer Science/AQA

CS5.6The 4-layer TCP/IP model: application, transport, network and link layers; what each layer does and example protocols

Notes

The 4-layer TCP/IP model

The TCP/IP model is the standard way to think about how networking software is structured. Splitting work into layers makes the system manageable: each layer has one job and talks only to the layers above and below.

The four layers

From top (closest to the user) to bottom (closest to the wire):

  1. Application layer — what the user-facing program produces.
  2. Transport layer — reliable end-to-end delivery between processes.
  3. Internet (Network) layer — addressing and routing across networks.
  4. Link (Network access) layer — physical wires, radios, frames, MAC addresses.

Each layer adds its own header to the data as it travels down the stack on the sender, and removes that header on the way up the stack at the receiver.

Layer 1: Application layer

Where user-facing protocols live: HTTP, HTTPS, FTP, SMTP, IMAP, POP3, DNS, SSH.

  • Generates the actual content (a web page request, an email).
  • Hands the data to the transport layer.

Layer 2: Transport layer

Provides end-to-end connection between processes on different hosts.

  • TCP for reliable, in-order delivery (HTTP, FTP, SMTP).
  • UDP for fast, connectionless delivery (DNS queries, streaming).
  • Adds port number to direct data to the right process (e.g. port 80 = HTTP, 443 = HTTPS, 25 = SMTP).

Layer 3: Internet (Network) layer

Routes packets across networks.

  • IP is the dominant protocol — adds source and destination IP addresses to each packet.
  • Routers operate at this layer, choosing the next hop toward the destination.

Layer 4: Link (Network access) layer

The lowest layer — physical and immediate-network details.

  • Ethernet, Wi-Fi — frame formats, MAC addresses for hop-by-hop delivery on a local link.
  • Hardware drivers, NICs (network interface cards).

Encapsulation — adding headers

When you send a web request, each layer wraps the data:

Application: "GET / HTTP/1.1\nHost: example.com\n..."
                ↓ (HTTP request)
Transport:    [TCP header | HTTP request]
                ↓
Internet:     [IP header | TCP header | HTTP request]
                ↓
Link:         [Ethernet header | IP header | TCP header | HTTP request | Ethernet trailer]
                ↓
Wire / Air

At the receiver, each layer reads (and removes) its own header before passing up.

Why layer at all?

  • Modularity — replace one layer (Wi-Fi instead of Ethernet) without changing others.
  • Abstraction — application programmers don't worry about radio frequencies; routing engineers don't worry about email format.
  • Standardisation — different vendors implement different layers and they still interoperate.

Mapping protocols to layers

LayerProtocols
ApplicationHTTP, HTTPS, FTP, SMTP, IMAP, POP3, DNS, SSH
TransportTCP, UDP
InternetIP (v4 and v6), ICMP
LinkEthernet, Wi-Fi (802.11), Bluetooth

Worked exampleWorked example — sending an email

You send an email from your laptop to your friend's mailbox:

  1. Application — your email client speaks SMTP to your mail server.
  2. TransportTCP chunks the SMTP exchange into reliable packets, port 25 (or 587).
  3. InternetIP addresses each packet (your laptop's IP → mail server's IP) and routes it.
  4. LinkWi-Fi frames carry packets to your home router, then Ethernet carries them onward.

At the mail server, each layer unwraps until SMTP arrives at the application.

Hardware that operates at each layer

  • Hub — link layer (forwards bits to all ports — obsolete).
  • Switch — link layer (forwards frames based on MAC address).
  • Router — internet layer (routes packets based on IP address).
  • Firewall / proxy — typically internet/transport, sometimes application.

Common mistakesPitfalls

  1. Confusing TCP/IP with OSI. OSI has 7 layers; TCP/IP has 4. Both teach the same idea — layering.
  2. Putting protocols on the wrong layer. SMTP is application; IP is internet. Memorise the table.
  3. Saying "the application layer is the application". It's the layer that handles application protocols, not the running app itself.
  4. Saying packets contain headers from one layer. They contain headers from every layer above the link.
  5. Calling Wi-Fi a transport-layer protocol. It's link layer.

Try thisQuick check

Match each to its layer:

  • TCP → transport.
  • HTTP → application.
  • IP → internet.
  • Ethernet → link.
  • DNS → application.
  • UDP → transport.

AI-generated · claude-opus-4-7 · v3-deep-computer-science

Practice questions

Try each before peeking at the worked solution.

  1. Question 14 marks

    Four layers

    Name the four layers of the TCP/IP model in order from top (application) to bottom (link).

    Ask AI about this

    AI-generated · claude-opus-4-7 · v3-deep-computer-science

  2. Question 24 marks

    Identify layer for protocols

    State which layer of the TCP/IP model each protocol belongs to:
    (a) HTTP
    (b) TCP
    (c) IP
    (d) Ethernet

    Ask AI about this

    AI-generated · claude-opus-4-7 · v3-deep-computer-science

  3. Question 32 marks

    Why layered?

    Explain two advantages of using a layered model for networking.

    Ask AI about this

    AI-generated · claude-opus-4-7 · v3-deep-computer-science

  4. Question 44 marks

    Application-layer role

    Describe the role of the application layer with two example protocols.

    Ask AI about this

    AI-generated · claude-opus-4-7 · v3-deep-computer-science

  5. Question 54 marks

    Transport vs internet layer

    Explain the difference between the transport layer and the internet layer.

    Ask AI about this

    AI-generated · claude-opus-4-7 · v3-deep-computer-science

  6. Question 64 marks

    Encapsulation

    Explain what is meant by encapsulation in the TCP/IP model.

    Ask AI about this

    AI-generated · claude-opus-4-7 · v3-deep-computer-science

  7. Question 73 marks

    Hardware per layer

    Match each device to the layer it primarily operates at:
    (a) Switch
    (b) Router
    (c) Web server

    Ask AI about this

    AI-generated · claude-opus-4-7 · v3-deep-computer-science

Flashcards

CS5.6 — The 4-layer TCP/IP model

12-card SR deck for AQA GCSE Computer Science topic CS5.6

12 cards · spaced repetition (SM-2)