Why Do We Use a Layered Model?
Every time you open a web page, send an email, or stream a video, your data undertakes an extraordinary journey. It starts as human-readable information on your screen, gets transformed into electrical signals or radio waves, travels through cables, routers, and potentially undersea fibre-optic lines, arrives at a server on the other side of the world, and then makes the return trip — all in a fraction of a second.
This process is staggeringly complex. So how do engineers make it manageable? The answer is layers. Instead of building one giant, monolithic system that handles everything, network communication is divided into distinct layers, each responsible for a specific part of the job. This approach is called a layered model.
A layered model is a way of organising the functions of a network into separate levels. Each layer has a clearly defined role and communicates only with the layer directly above and below it. Think of it like a factory assembly line: each station does its specific job and passes the product to the next station, without needing to understand how the other stations work.
Why Use Layers?
- Abstraction: Each layer hides its internal complexity from the other layers. A web browser does not need to know how electrical signals travel through copper cables — it just needs to know how to request a web page. This separation of concerns makes the system far easier to understand and work with.
- Modularity: Because each layer is independent, one layer can be changed or upgraded without affecting the others. For example, you can switch from a wired Ethernet connection to Wi-Fi without any changes to your web browser or email client. The physical layer changes; everything above it stays the same.
- Easier troubleshooting: When something goes wrong, engineers can isolate the problem to a specific layer. Is it a physical cable issue? A routing problem? A software bug? Layers make it possible to diagnose faults systematically rather than searching through the entire system.
- Different teams can work on different layers: Hardware engineers can focus on cables, signals, and network cards. Software developers can focus on protocols and applications. Neither team needs to fully understand the other’s work — they just need to agree on the interface between layers.
- Hardware independence: The upper layers (applications and transport) work the same regardless of the underlying hardware. Whether your data travels over copper, fibre optics, Wi-Fi, or a 4G mobile connection, the application layer behaves identically. This is what allows the same web browser to work on a desktop PC, a laptop on Wi-Fi, and a smartphone on mobile data.
In this topic you will learn:
- The four layers of the TCP/IP model and the role of each layer
- Key protocols at each layer: HTTP, FTP, SMTP, DNS, TCP, UDP, IP, Ethernet
- How data is encapsulated as it travels down the layers, and de-encapsulated as it travels up
- The difference between TCP and UDP and when each is used
- A real-world analogy to help you remember the process
The Four Layers of the TCP/IP Model
The TCP/IP model divides network communication into four layers. Each layer has a specific role and adds its own information to the data as it is prepared for transmission. The layers, from top to bottom, are:
| Layer Number | Layer Name | Role |
|---|---|---|
| 4 (Top) | Application Layer | User-facing applications and protocols that format data for the user |
| 3 | Transport Layer | Breaks data into segments, ensures reliable or fast delivery, adds port numbers |
| 2 | Internet Layer | Addresses packets with IP addresses and routes them between networks |
| 1 (Bottom) | Network Access Layer | Handles physical transmission of data over hardware (cables, Wi-Fi) |
Let us examine each layer in detail.
Layer 4: Application Layer
The Application Layer is the topmost layer — the one closest to the user. This is where user-facing applications and network protocols operate. When you type a web address into your browser, compose an email, or download a file, the Application Layer is where that interaction begins.
The Application Layer is responsible for:
- Formatting data so that the user can read and interact with it (e.g., displaying a web page with text, images, and links)
- Providing protocols that define how specific types of data are requested, sent, and received
- Interfacing with the user through software applications like web browsers, email clients, and file transfer programs
Key Protocols at the Application Layer
- HTTP / HTTPS (HyperText Transfer Protocol / Secure) — Used by web browsers to request and receive web pages. When you visit a website, your browser sends an HTTP request to a web server, which responds with the HTML, CSS, images, and other files that make up the page. HTTPS adds encryption for security.
- FTP (File Transfer Protocol) — Used to transfer files between computers. Often used by web developers to upload website files to a server, or by organisations to share large files.
- SMTP (Simple Mail Transfer Protocol) — Used to send emails. When you click “Send” in your email client, SMTP handles the delivery of that email to the recipient’s mail server.
- IMAP / POP3 — Used to receive and retrieve emails from a mail server. IMAP keeps emails on the server (so you can access them from multiple devices), while POP3 downloads them to one device.
- DNS (Domain Name System) — Translates human-readable domain names (like
www.google.com) into IP addresses (like142.250.180.14) so that computers can locate each other on the network.
Examples of Application Layer Software
- Web browsers (Chrome, Firefox, Edge, Safari)
- Email clients (Outlook, Thunderbird, Gmail web interface)
- File transfer tools (FileZilla, WinSCP)
- Messaging applications and video calling software
Layer 3: Transport Layer
The Transport Layer sits below the Application Layer and is responsible for end-to-end communication between the sending and receiving devices. Its main jobs are to break data into manageable chunks called segments, add port numbers to identify which application should receive the data, and ensure the data arrives correctly (or quickly, depending on the protocol used).
The Transport Layer uses two main protocols: TCP and UDP.
TCP — Transmission Control Protocol
TCP is a connection-oriented protocol. Before any data is sent, TCP establishes a connection between the sender and receiver using a process called the three-way handshake (SYN → SYN-ACK → ACK). This ensures both sides are ready to communicate.
- Reliable: TCP guarantees that all data arrives at the destination. If a segment is lost or corrupted during transmission, TCP detects the error and retransmits the missing segment.
- Error checking: Each segment includes a checksum that the receiver uses to verify the data has not been corrupted. If it has, the segment is discarded and resent.
- Ordered delivery: TCP numbers each segment so the receiver can reassemble them in the correct order, even if they arrive out of sequence.
- Flow control: TCP adjusts the rate of data transmission so the sender does not overwhelm a slower receiver.
- Used for: Web browsing (HTTP/HTTPS), email (SMTP, IMAP), file transfer (FTP) — any application where accuracy is more important than speed.
UDP — User Datagram Protocol
UDP is a connectionless protocol. It does not establish a connection before sending data — it simply sends the data and hopes it arrives. There is no handshake, no acknowledgement, and no retransmission.
- Faster: Because UDP skips the connection setup, error checking, and retransmission, it has much less overhead and is significantly faster than TCP.
- No error correction: If a packet is lost or corrupted, UDP does not resend it. The data is simply gone.
- No guaranteed order: Packets may arrive in any order, and UDP does not reorder them.
- Used for: Live video/audio streaming, online gaming, voice calls (VoIP), DNS lookups — any application where speed is more important than perfection. If one video frame is lost during a live stream, it is better to skip it and keep playing than to pause and wait for a retransmission.
Layer 2: Internet Layer (Network Layer)
The Internet Layer is responsible for addressing and routing data packets across networks. This is the layer that makes it possible for data to travel from your device, through multiple intermediate networks and routers, to reach a server on the other side of the world.
The Internet Layer is responsible for:
- Adding IP addresses: Each packet is given a source IP address (where the packet came from) and a destination IP address (where it needs to go). These addresses uniquely identify devices on the network.
- Routing: Determining the best path for each packet to travel from source to destination. Packets may pass through many different routers and networks on their journey, and the Internet Layer decides the route at each hop.
- Packet forwarding: Passing packets from one network to the next until they reach their destination.
The IP Protocol
The main protocol at this layer is IP (Internet Protocol). IP is responsible for addressing and routing. There are two versions in use today:
- IPv4: Uses 32-bit addresses written as four numbers separated by dots (e.g.,
192.168.1.1). Supports about 4.3 billion unique addresses — which is no longer enough for all devices worldwide. - IPv6: Uses 128-bit addresses written in hexadecimal (e.g.,
2001:0db8:85a3::8a2e:0370:7334). Supports a virtually unlimited number of addresses to accommodate the growing number of internet-connected devices.
Devices at the Internet Layer
Routers operate at the Internet Layer. A router examines the destination IP address of each packet and decides which path to forward it along. Routers connect different networks together and are the devices responsible for directing traffic across the internet.
Layer 1: Network Access Layer (Link Layer)
The Network Access Layer is the bottom layer of the TCP/IP model. It is responsible for the physical transmission of data — actually getting the bits (0s and 1s) from one device to another across a physical medium such as a cable or wireless signal.
The Network Access Layer is responsible for:
- Handling hardware: This layer deals with the physical components of the network — Network Interface Cards (NICs), Ethernet cables, fibre-optic cables, Wi-Fi radio signals, and other transmission media.
- Adding MAC addresses: Each frame is given a source MAC address and a destination MAC address. A MAC (Media Access Control) address is a unique hardware identifier burned into every network interface card by the manufacturer. It identifies devices on the local network.
- Converting data to signals: Data is converted into the appropriate format for the physical medium — electrical signals for copper cables, light pulses for fibre optics, or radio waves for Wi-Fi.
- Error detection at the hardware level: Checking for errors that occur during physical transmission (e.g., signal interference or cable faults).
Technologies and Standards
- Ethernet (IEEE 802.3): The standard for wired LANs. Defines how data is formatted into frames and transmitted over copper or fibre-optic cables.
- Wi-Fi (IEEE 802.11): The standard for wireless LANs. Defines how data is transmitted over radio waves.
- Network Interface Cards (NICs): Hardware components (built into computers, phones, and other devices) that provide the physical connection to the network. Every NIC has a unique MAC address.
Encapsulation and De-encapsulation
One of the most important concepts in the TCP/IP model is encapsulation — the process by which data is wrapped with additional information (headers) as it passes down through each layer. At the receiving end, the reverse process, de-encapsulation, strips away each header as the data passes back up through the layers.
How Data Travels Down the Layers (Encapsulation)
When you send data (for example, requesting a web page), the data passes through each layer from top to bottom. At each layer, a header is added to the front of the data. This header contains the control information that layer needs to do its job. Think of it as putting a letter into a series of envelopes, each one adding a new label.
| Step | Layer | What Happens | Data Unit Name |
|---|---|---|---|
| 1 | Application Layer | The application (e.g., web browser) creates the data — such as an HTTP request for a web page. The application protocol formats this data. | Data |
| 2 | Transport Layer | The data is broken into segments. A header is added containing port numbers (to identify which application should receive the data), sequence numbers, and error-checking information. TCP or UDP is selected. | Segment |
| 3 | Internet Layer | Each segment is placed into a packet. A header is added containing the source IP address and destination IP address. This tells routers where to send the packet. | Packet |
| 4 | Network Access Layer | Each packet is placed into a frame. A header (and trailer) is added containing the source MAC address and destination MAC address. The frame is then converted into bits (electrical signals, light pulses, or radio waves) and transmitted across the physical medium. | Frame → Bits |
How Data Travels Up the Layers (De-encapsulation)
At the receiving end, the process is reversed. The data arrives as bits at the Network Access Layer and passes upward through each layer. At each step, the relevant header is removed (stripped off) and the remaining data is passed up to the next layer. By the time the data reaches the Application Layer, all the networking headers have been removed and the original data (e.g., the web page content) is delivered to the user’s application.
- Network Access Layer: Receives bits, reconstructs the frame, reads and removes the MAC address header, passes the packet up.
- Internet Layer: Reads and removes the IP address header, checks the destination IP, passes the segment up.
- Transport Layer: Reads and removes the port number header, reassembles segments into the complete data, passes it up.
- Application Layer: Receives the original data and presents it to the user (e.g., displays the web page in the browser).
TCP vs UDP — Detailed Comparison
Understanding the difference between TCP and UDP is essential for your GCSE exam. This table summarises all the key differences:
| Feature | TCP (Transmission Control Protocol) | UDP (User Datagram Protocol) |
|---|---|---|
| Connection type | Connection-oriented — establishes a connection before sending (three-way handshake) | Connectionless — sends data without establishing a connection first |
| Reliability | Reliable — guarantees all data is delivered | Unreliable — no guarantee that data will arrive |
| Error checking | Yes — detects errors and retransmits lost or corrupted segments | Basic checksum only — does not retransmit lost data |
| Ordering | Ordered — segments are numbered and reassembled in the correct order | Unordered — packets may arrive in any order |
| Speed | Slower — the overhead of error checking, acknowledgements, and retransmission adds delay | Faster — minimal overhead means lower latency |
| Flow control | Yes — adjusts transmission speed to avoid overwhelming the receiver | No — sends data at whatever rate it chooses |
| Use cases | Web browsing (HTTP), email (SMTP), file transfer (FTP), loading web pages | Live streaming, online gaming, VoIP (voice calls), DNS lookups, video conferencing |
| Analogy | Sending a recorded delivery letter — you get confirmation it was received | Shouting a message across a room — fast, but no guarantee it was heard |
Real-World Analogy: The Postal System
A helpful way to understand the TCP/IP model is to compare it to sending a letter through a postal system. Imagine a large company where different departments handle each stage of delivering a letter:
- Application Layer = The Writer: You write your letter. You decide what to say, format it neatly, and address it to the right person. This is like an application creating the data — the content is prepared in a form the recipient will understand.
- Transport Layer = The Office Manager: The office manager takes your letter and puts it in an internal envelope. They add a reference number (port number) so the recipient knows which department should handle it. If the letter is very long, they might split it into multiple pages, numbering each one (segmentation). They also arrange for a confirmation receipt (TCP) or just drop it in the outbox without tracking (UDP).
- Internet Layer = The Address Department: The address department puts the internal envelope into a larger postal envelope. They write the sender’s address (source IP) and the recipient’s address (destination IP) on the outside. They decide which postal route the letter should take to reach the destination city — just like a router choosing the best path.
- Network Access Layer = The Delivery Van: The delivery van picks up the physical envelope and transports it. The driver only cares about getting the envelope to the next sorting office or the final delivery point. They add a local delivery label (MAC address) for the immediate next stop. This is the physical, hands-on part of the process — the actual movement of the letter from place to place.
At the receiving end, the process is reversed. The delivery van drops off the envelope. The address department checks the address and removes the outer envelope. The office manager checks the reference number and reassembles any multi-page letters. Finally, the letter is delivered to the correct person, who reads the original content.
Test Your Knowledge
Try these interactive exercises to check your understanding of the TCP/IP model. Read each question carefully and select the correct answer.
Exercise 1: Layer Identifier
Read the description below and identify which TCP/IP layer it refers to.
Exercise 2: TCP vs UDP — Which Protocol?
Read the scenario below and decide whether TCP or UDP would be the better protocol to use.
Exercise 3: Encapsulation Challenge
During encapsulation, what information is added at each layer? Match the description to the correct layer.
Practice Questions
Click on each question to reveal the answer. Try to answer in your head or on paper first before checking!
Answer: From top to bottom: (1) Application Layer, (2) Transport Layer, (3) Internet Layer, (4) Network Access Layer. The Application Layer is closest to the user, while the Network Access Layer handles physical transmission.
Answer: The Transport Layer is responsible for end-to-end communication between devices. Its main functions are: (1) breaking data into segments for transmission, (2) adding port numbers so the receiving device knows which application the data is for, and (3) managing delivery — either reliably using TCP (with error checking, acknowledgements, and retransmission of lost data) or quickly using UDP (without guaranteed delivery). It ensures data from the Application Layer is prepared for transmission across the network.
Answer: (1) Reliability: TCP is reliable — it guarantees that all data arrives at the destination and retransmits lost segments. UDP is unreliable — it does not guarantee delivery and does not retransmit lost data. (2) Connection: TCP is connection-oriented — it establishes a connection using a three-way handshake before sending data. UDP is connectionless — it sends data without first establishing a connection. Other valid differences include: TCP is slower due to overhead, UDP is faster; TCP guarantees correct ordering, UDP does not.
Answer: UDP is preferred for live video streaming because speed and low latency are more important than perfect accuracy. During a live stream, if a video frame or audio packet is lost, it is better to skip it and continue playing rather than pause the stream to wait for the lost data to be retransmitted (as TCP would do). The viewer would rather see a brief quality drop than experience buffering and freezing. TCP’s overhead (connection setup, acknowledgements, retransmission) adds delay that is unacceptable for real-time content. UDP’s minimal overhead delivers data with the lowest possible latency.
Answer: Encapsulation is the process of adding headers at each layer as data passes from the Application Layer down to the Network Access Layer. (1) The Application Layer creates the original data (e.g., an HTTP request). (2) The Transport Layer breaks the data into segments and adds a header containing port numbers and sequence numbers. (3) The Internet Layer places each segment into a packet and adds a header containing the source and destination IP addresses. (4) The Network Access Layer places each packet into a frame and adds a header containing the source and destination MAC addresses. The frame is then converted into bits (electrical signals, light pulses, or radio waves) and transmitted physically. Each layer wraps the data from the layer above with its own header, like putting a letter into progressively larger envelopes.
Answer: IP addresses are added at the Internet Layer (Layer 2 of TCP/IP). Their purpose is to uniquely identify devices on a network so that data can be routed to the correct destination. Each packet is given a source IP address (identifying the sender) and a destination IP address (identifying the recipient). Routers read these IP addresses to determine the best path to forward each packet through the network. There are two versions: IPv4 (32-bit, e.g., 192.168.1.1) and IPv6 (128-bit, much larger address space for the growing number of devices).
Answer: (1) Modularity: Each layer is independent and can be changed or upgraded without affecting the other layers. For example, you can switch from a wired Ethernet connection (Network Access Layer) to Wi-Fi without changing anything in the Application, Transport, or Internet layers. This makes the system flexible and easier to develop. (2) Easier troubleshooting: When a network problem occurs, engineers can isolate the fault to a specific layer and focus their investigation there. For example, if web pages load but are very slow, the problem likely lies at the Network Access or Internet layer rather than the Application layer. This systematic approach is far more efficient than searching through the entire system.
Answer: (1) Application Layer (HTTP/HTTPS): The student’s web browser creates an HTTP (or HTTPS) request for the web page. This request contains the URL and any other necessary information. The application protocol formats the request. (2) Transport Layer (TCP): The HTTP request is passed to the Transport Layer, which uses TCP (because web pages require reliable, accurate delivery). TCP breaks the data into segments, adds port numbers (port 80 for HTTP, port 443 for HTTPS), and sets up a connection with the web server via a three-way handshake. (3) Internet Layer (IP): Each segment is placed into a packet. The IP protocol adds the student’s computer’s source IP address and the web server’s destination IP address to the packet header. (4) Network Access Layer (Ethernet / Wi-Fi): Each packet is placed into a frame. The source MAC address (the student’s NIC) and destination MAC address (the local router’s NIC) are added. The frame is then converted into bits and transmitted as electrical signals (Ethernet), light pulses (fibre), or radio waves (Wi-Fi) across the physical network. The data travels through routers and networks to reach the web server, where the process is reversed (de-encapsulation) to deliver the HTTP request to the server’s web application.
Key Vocabulary
This table summarises the essential terms for this topic. Use it for revision and to check your understanding.
| Term | Definition |
|---|---|
| TCP/IP Model | A four-layer model that defines how data is transmitted across the internet, from application to physical transmission |
| Layered Model | A way of organising network functions into separate levels, each with a specific role, providing modularity, abstraction, and easier troubleshooting |
| Application Layer | The top layer where user applications and protocols (HTTP, FTP, SMTP, DNS) operate and data is formatted for the user |
| Transport Layer | The layer responsible for end-to-end delivery, breaking data into segments, adding port numbers, and using TCP or UDP |
| Internet Layer | The layer that adds IP addresses and routes packets across networks; routers operate here |
| Network Access Layer | The bottom layer handling physical transmission; adds MAC addresses and converts data to signals via hardware (NICs, cables, Wi-Fi) |
| Encapsulation | The process of adding headers at each layer as data passes down the TCP/IP model before transmission |
| De-encapsulation | The reverse process at the receiving end: headers are removed at each layer as data passes up the model |
| TCP | Transmission Control Protocol — a reliable, connection-oriented Transport Layer protocol with error checking and retransmission |
| UDP | User Datagram Protocol — a fast, connectionless Transport Layer protocol with no guaranteed delivery or retransmission |
| HTTP / HTTPS | HyperText Transfer Protocol (Secure) — Application Layer protocol used by web browsers to request and receive web pages |
| FTP | File Transfer Protocol — Application Layer protocol for transferring files between computers |
| SMTP | Simple Mail Transfer Protocol — Application Layer protocol for sending emails |
| DNS | Domain Name System — Application Layer protocol that translates domain names into IP addresses |
| IP Address | A unique numerical address (IPv4 or IPv6) assigned to a device on a network, used for routing packets at the Internet Layer |
| MAC Address | Media Access Control address — a unique hardware identifier assigned to every NIC, used at the Network Access Layer for local delivery |
| Port Number | A number added by the Transport Layer to identify which application on the receiving device should handle the data (e.g., port 80 for HTTP) |
| Segment | The data unit at the Transport Layer — data broken into chunks with port numbers and sequence information added |
| Packet | The data unit at the Internet Layer — a segment wrapped with source and destination IP addresses |
| Frame | The data unit at the Network Access Layer — a packet wrapped with source and destination MAC addresses |
| Router | A device that operates at the Internet Layer, reading IP addresses to forward packets along the best route between networks |
| NIC | Network Interface Card — hardware that provides the physical connection to a network; every NIC has a unique MAC address |
| Three-way Handshake | The process TCP uses to establish a connection: SYN → SYN-ACK → ACK, ensuring both sender and receiver are ready |
How to Succeed in the Exam
Past Paper Questions
Try these exam-style questions, then click to reveal the mark scheme answer.
Name the four layers of the TCP/IP model. [2] marks
Mark scheme:
- Application layer (½)
- Transport layer (½)
- Internet layer (½)
- Network Interface (Link) layer (½)
(all four correct for 2 marks, 2–3 correct for 1 mark)
Explain the role of the Transport layer in the TCP/IP model. [2] marks
Mark scheme:
- The Transport layer breaks data into packets / segments (1)
- It ensures reliable delivery by checking all packets arrive and requesting retransmission of lost packets / handles error checking and flow control (1)
Explain why a layered model is used for network communication. [2] marks
Mark scheme:
- Each layer has a specific function and can be developed/updated independently without affecting other layers (1)
- It allows different hardware and software manufacturers to create products that work together / ensures interoperability through standardised protocols (1)
The TCP/IP Model in Your Daily Life
Now that you understand the four layers of the TCP/IP model, take a moment to think about how this model is working behind the scenes every time you use the internet:
- When you search on Google: Your browser creates an HTTPS request (Application Layer). TCP breaks it into segments and adds port number 443 (Transport Layer). IP adds your computer’s IP address and Google’s IP address (Internet Layer). Your NIC puts it into a frame with MAC addresses and sends it as Wi-Fi signals to your router (Network Access Layer). The process reverses when Google’s response arrives.
- When you stream music on Spotify: The initial connection and authentication uses TCP for reliability. But the actual audio streaming likely uses UDP for speed — a dropped audio sample is barely noticeable, but buffering ruins the experience.
- When you play an online game: UDP carries your real-time inputs (character movements, actions) because low latency is critical. Your game client sends dozens of small UDP packets per second. If one is lost, the game interpolates — it is better to keep playing smoothly than to freeze while waiting for retransmission.
- When you send a message: Your message is encapsulated layer by layer at your device, travels through routers (Internet Layer) across potentially multiple networks, and is de-encapsulated layer by layer at the recipient’s device. All four layers work together seamlessly.
The beauty of the TCP/IP model is that you never need to think about it as a user. The layered design means each layer handles its own job invisibly. You just click, type, and stream — while four layers of networking protocols work silently beneath the surface to make it all possible.
Challenge yourself: The next time you use a website, send an email, or stream a video, try to mentally trace the journey of your data through all four TCP/IP layers. Think about which protocols are being used at each layer, what headers are being added, and how the data is physically travelling from your device to its destination. This mental exercise will help you truly understand and remember the model for your exam.