The TCP/IP Model and Packet Switching
This lesson examines the TCP/IP model — the layered architecture that underpins all internet communication — and explains how data is divided into packets and transmitted using packet switching.
The TCP/IP Model
The TCP/IP model (also called the Internet Protocol Suite) organises network communication into four layers. Each layer has a specific job and uses particular protocols. The layers work together like a stack — data passes down through the layers when being sent, and up through the layers when being received.
The Four Layers
| Layer | Name | Purpose | Example Protocols |
|---|
| 4 | Application | Provides services directly to the user/application | HTTP, HTTPS, FTP, SMTP, IMAP, SSH, DNS |
| 3 | Transport | Breaks data into segments, ensures reliable delivery | TCP, UDP |
| 2 | Internet | Adds IP addresses and routes packets across networks | IP (IPv4/IPv6) |
| 1 | Network Interface (Link) | Handles the physical transmission of data over the network medium | Ethernet, Wi-Fi (802.11) |
How the Layers Work Together (Sending Data)
Imagine you are loading a web page:
- Application layer — Your browser creates an HTTP request for the web page.
- Transport layer — TCP breaks the request into numbered segments and adds port numbers (e.g. port 80 for HTTP, port 443 for HTTPS).
- Internet layer — Each segment is placed in an IP packet. The source and destination IP addresses are added.
- Network Interface layer — Each packet is placed in a frame with MAC addresses and transmitted as electrical signals, light pulses or radio waves.
How the Layers Work Together (Receiving Data)
The process is reversed:
- Network Interface layer — The frame is received and the MAC addresses are checked.
- Internet layer — The IP packet is extracted and the destination IP is verified.
- Transport layer — TCP reassembles the segments into the correct order, requesting retransmission of any missing segments.
- Application layer — The complete HTTP response is delivered to the browser, which renders the page.
Why Use Layers?
- Modularity — each layer can be developed and updated independently without affecting other layers.
- Standardisation — layers define clear interfaces, allowing hardware and software from different vendors to interoperate.
- Troubleshooting — problems can be isolated to a specific layer.
- Abstraction — each layer only needs to know how to communicate with the layers directly above and below it.
Packets
When data is sent across a network, it is not sent as one continuous stream. Instead, it is broken up into small pieces called packets. Each packet is typically between 500 and 1500 bytes.
Structure of a Packet
A packet consists of three parts:
| Part | Contents |
|---|
| Header | Source IP address, destination IP address, packet number (sequence number), protocol information, TTL (Time to Live) |
| Payload (Data) | A portion of the actual data being sent (e.g. part of a web page, email or file) |
| Trailer (Footer) | Error-checking data (e.g. checksum) to verify the packet was not corrupted in transit |
Why Break Data into Packets?
- Efficient use of the network — packets from different sources can share the same network links.
- Reliability — if one packet is lost or corrupted, only that packet needs to be retransmitted, not the entire message.
- Routing flexibility — different packets can take different routes, avoiding congested or broken links.
- Fairness — no single transmission monopolises the network; all users share bandwidth.
Packet Switching
Packet switching is the method by which packets travel across the internet. Each packet is independently routed from source to destination.
How Packet Switching Works
- The sending device breaks the data into packets and numbers them.
- Each packet is sent to the nearest router.
- The router examines the destination IP address in the packet header.
- The router consults its routing table and forwards the packet to the next router along the best available path.
- Each router the packet passes through repeats this process.
- Different packets may take different routes depending on network congestion and available links.
- Packets may arrive at the destination out of order.
- The receiving device uses the sequence numbers in the packet headers to reassemble the packets in the correct order.
- If any packets are missing or corrupted (detected via the checksum in the trailer), the receiving device requests retransmission from the sender.
Advantages of Packet Switching
- Resilience — if one route fails, packets can be rerouted via alternative paths.
- Efficient — network links are shared between many users simultaneously.
- No dedicated connection needed — unlike circuit switching (used in old telephone networks), no single path needs to be reserved.
- Scalable — works well for networks of all sizes, from small LANs to the global internet.
Packet Switching vs Circuit Switching
| Feature | Packet Switching | Circuit Switching |
|---|
| Connection | No dedicated path | Dedicated path for entire communication |
| Efficiency | High — links shared | Low — path reserved even during silence |
| Resilience | High — rerouting possible | Low — if path breaks, connection is lost |
| Order of arrival | Packets may arrive out of order | Data arrives in order |
| Example | Internet | Traditional telephone network |
Putting It All Together: A Web Request
When you type a URL into your browser:
- DNS resolves the domain name to an IP address.
- TCP establishes a connection with the web server (three-way handshake).
- The browser sends an HTTP GET request.
- The request is broken into packets by TCP and labelled with IP addresses by IP.
- Packets travel through multiple routers via packet switching.
- The web server receives the packets, reassembles them, and sends back the web page in the same way.
- Your browser reassembles the response packets and renders the page.
Summary
- The TCP/IP model has four layers: Application, Transport, Internet and Network Interface.
- Data is broken into packets containing a header, payload and trailer.
- Packet switching routes packets independently across the network.
- Packets may take different routes and arrive out of order; the receiving device reassembles them.
- TCP handles reliable, ordered delivery; IP handles addressing and routing.
Exam Tip: A common 6-mark question asks you to describe how data is transmitted from one device to another using packet switching. Structure your answer around: breaking data into packets, routing via routers, packets taking different paths, reassembly at the destination, and retransmission of lost packets.
Deeper dive: layered models and worked packet examples
The 4-layer TCP/IP model is the working model of the modern internet. The 7-layer OSI model is the older theoretical reference taught alongside it; AQA expects familiarity with the 4-layer version but you may encounter OSI-style questions that test understanding of layering as a concept.
The 4-layer TCP/IP model versus the 7-layer OSI model