GCSE Revision Aid: This resource is designed to support your revision and may contain errors. If you find a discrepancy with your class teaching, your teacher is correct β€” please let us know at gcserevise@scott.scottrix.co.uk.

CS31: TCP/IP Model

Foundation Higher AQAEdexcelOCREduqas Networks

The four layers of the TCP/IP model, the function of each layer, and how data is encapsulated and passed between layers.

Fastmail

πŸ“‹ What is the TCP/IP Model?

Definition: The TCP/IP model is a conceptual framework that describes how data is transmitted over a network. It divides network communication into four layers, each with a specific role. Data passes down through the layers when being sent, and up through the layers when being received.

The TCP/IP model is the foundation of all internet communication. It was developed by the US Department of Defense and has become the standard model for network communication. Each layer handles a different aspect of getting data from one device to another, and the layers work together seamlessly.

🌐 The Four Layers

Layer Number Layer Name Key Protocols Main Function
4 (Top) Application HTTP, HTTPS, SMTP, IMAP, FTP Provides network services to applications
3 Transport TCP, UDP End-to-end delivery and reliability
2 Internet IP Addressing and routing across networks
1 (Bottom) Link Ethernet, Wi-Fi Physical transmission on local network

πŸ–₯️ Layer 4: Application Layer

Function: The application layer provides network services directly to user applications. It is the layer that users interact with most directly. It determines what data is sent and how it is formatted for the application.
Example

When you type a URL into your web browser, the browser uses HTTP (application layer) to format a request for the web page. The application layer doesn't care how the data gets to the server - it just prepares the request in the correct format.

🚚 Layer 3: Transport Layer

Function: The transport layer manages end-to-end communication between two devices. It ensures data is delivered reliably (TCP) or quickly (UDP), breaks data into segments, and handles flow control.

TCP vs UDP at the Transport Layer

Property TCP UDP
Connection Connection-oriented (establishes connection first) Connectionless (just sends data)
Reliability Reliable (acks, resends lost data) Unreliable (no guarantee of delivery)
Ordering Ordered (reassembles in sequence) Not ordered (arrives in any order)
Speed Slower (overhead of checks) Faster (no overhead)
Use case Web pages, email, file transfer Video streaming, online gaming, VoIP
When to Use Each

TCP: Downloading a file - every byte must arrive correctly, so reliability matters more than speed.

UDP: Live video call - a few dropped frames are acceptable, but delay (latency) is very noticeable, so speed matters more than guaranteed delivery.

πŸ—ΊοΈ Layer 2: Internet Layer

Function: The internet layer handles addressing and routing of data packets across networks. It adds IP addresses to identify the source and destination, and determines the best route for packets to take across interconnected networks.
Example

When you send data from London to Tokyo, the internet layer adds the destination IP address and routers at each network junction read this address to decide where to forward the packet next. The packet may pass through many routers, each making a forwarding decision based on the IP address.

πŸ”Œ Layer 1: Link Layer

Function: The link layer handles the physical transmission of data on a local network segment. It is responsible for getting data from one device to the next on the same network, using MAC addresses and physical media.
Example

When your laptop sends data over Wi-Fi, the link layer converts the data into radio waves transmitted through the air. When data arrives at your router via an Ethernet cable, the link layer converts the electrical signals back into data and passes it up to the internet layer.

πŸ“¦ Encapsulation

Definition: Encapsulation is the process where each layer adds its own header (control information) to the data as it passes down the layers. When data is received, each layer removes its header (decapsulation) as it passes up the layers.

Sending Data (Down the Layers)

  1. Application layer: Creates the data (e.g. HTTP request) and passes it down
  2. Transport layer: Adds transport header (port numbers, sequence numbers) β†’ creates a segment
  3. Internet layer: Adds IP header (source and destination IP addresses) β†’ creates a packet
  4. Link layer: Adds frame header (MAC addresses) and trailer (error checking) β†’ creates a frame

Receiving Data (Up the Layers)

  1. Link layer: Removes frame header/trailer, passes packet up
  2. Internet layer: Removes IP header, passes segment up
  3. Transport layer: Removes transport header, passes data up
  4. Application layer: Receives the data (e.g. displays the web page)
Encapsulation Example

Sending a web page request:

1. Application: HTTP request data "GET /index.html"

2. Transport: [TCP header | HTTP data] = segment

3. Internet: [IP header | TCP header | HTTP data] = packet

4. Link: [Frame header | IP header | TCP header | HTTP data | Frame trailer] = frame

Each layer wraps the data from the layer above with its own header information.

Encapsulation Summary:
Application: creates DATA
Transport: adds port/sequence β†’ SEGMENT
Internet: adds IP addresses β†’ PACKET
Link: adds MAC addresses + error check β†’ FRAME

Each layer adds a header; the link layer also adds a trailer

⚠️ Common Mistakes to Avoid

Mistake Why It's Wrong How to Fix It
Confusing layer order Application is the TOP, Link is the BOTTOM Remember: Application (4) > Transport (3) > Internet (2) > Link (1)
Saying IP works at the link layer IP works at the Internet layer (it's in the name!) Internet Protocol = Internet layer
Forgetting encapsulation includes both headers AND trailer The link layer adds a frame trailer for error checking Link layer = header + data + trailer
Confusing MAC and IP addresses MAC = link layer (local); IP = internet layer (global) MAC = hardware address (local network); IP = logical address (across networks)
Saying UDP is unreliable so it's never used UDP is chosen deliberately for speed-critical applications UDP is appropriate for streaming, gaming where speed > reliability

❓ Practice Questions

Q1: Name the four layers of the TCP/IP model from top to bottom and state the main function of each.

Q2: Explain the difference between TCP and UDP at the transport layer. Give an example of when each would be used.

Q3: Describe the process of encapsulation as data is sent down the layers.

Q4: Which layer of the TCP/IP model handles routing of data across networks? Which protocol operates at this layer?

Q5: Explain why the TCP/IP model uses layers rather than having a single protocol handle everything.

βœ… Answers

  1. Application (top): provides network services to applications (HTTP, SMTP). Transport: manages end-to-end delivery, reliability, and segmentation (TCP, UDP). Internet: handles addressing and routing across networks (IP). Link (bottom): handles physical transmission on the local network (Ethernet, Wi-Fi).
  2. TCP is connection-oriented, reliable (uses acknowledgements and resends lost data), and ordered. UDP is connectionless, unreliable (no guarantees), and faster. TCP is used for web browsing and email where all data must arrive. UDP is used for live video streaming and online gaming where speed matters more than perfect delivery.
  3. Encapsulation: the application layer creates data and passes it down. The transport layer adds a header with port numbers (creating a segment). The internet layer adds an IP header with source and destination addresses (creating a packet). The link layer adds a frame header with MAC addresses and a frame trailer for error checking (creating a frame). Each layer wraps the data from above with its own control information.
  4. The Internet layer handles routing of data across networks. The Internet Protocol (IP) operates at this layer, adding source and destination IP addresses to packets and determining the best route for them.
  5. Layers allow each aspect of communication to be developed independently. A change at one layer (e.g. switching from Wi-Fi to Ethernet at the link layer) doesn't affect other layers. Layers make the model modular, easier to understand, and allow different technologies to work together. Without layers, a single protocol would need to handle everything from physical signals to application formatting, which would be extremely complex.

🎯 Exam Tips

⚠️ Common Errors

βœ— Confusing the TCP/IP model with the OSI model βœ“ TCP/IP has 4 layers (Application, Transport, Internet, Link). OSI has 7 layers. TCP/IP is the practical model used on the internet; OSI is the theoretical reference model.

βœ— Thinking data is sent as a single block across the network βœ“ Data is broken into packets, each with headers containing source/destination IP, port numbers, and sequence numbers. Packets may take different routes and are reassembled at the destination.

βœ— Forgetting that each layer adds its own header to the packet βœ“ As data passes down the layers, each layer encapsulates it with its own header (Application β†’ Transport β†’ Internet β†’ Link). At the destination, each layer strips its header going back up.

βœ— Believing the Internet layer handles physical transmission βœ“ The Internet layer handles logical addressing (IP addresses) and routing. The Link layer handles the actual physical transmission over the network medium (Ethernet frames, WiFi signals).

✍️ Model Answer

Full-Mark Response

Describe the four layers of the TCP/IP model, explaining the role of each layer and giving one protocol that operates at each layer. [4 marks]

Application layer: Provides the interface for user applications and handles high-level protocols. Formats data for the user and manages application-level communication. Protocol: HTTP (web browsing). Transport layer: Manages end-to-end communication between applications, ensuring data is delivered reliably or quickly depending on the protocol. Handles port addressing and error checking. Protocol: TCP (reliable delivery with error checking). Internet layer: Handles logical addressing (IP addresses) and routing of packets across networks. Determines the best path for data to travel from source to destination. Protocol: IP (Internet Protocol for addressing and routing). Link layer: Manages physical transmission of data over the network medium. Handles hardware addressing (MAC addresses), framing, and error detection at the physical level. Protocol: Ethernet (wired LAN transmission).

πŸ“Š AO Deep Dive

Assessment Objective Analysis

AO1 (Computational Thinking β€” 40%): Demonstrate knowledge and understanding of the principles and concepts of computer science, including the TCP/IP model and its four layers for AQA 8525, OCR J277 & Edexcel 1CP2.

AO2 (Application β€” 40%): Apply knowledge and understanding of computer science, including the TCP/IP model and its four layers to analyse problems in computational terms and to design, write and evaluate solutions.

AO3 (Evaluation β€” 20%): Evaluate the effectiveness, correctness and efficiency of computational solutions, including the TCP/IP model and its four layers, and make reasoned judgements about trade-offs.

πŸ“ Exam Technique

GCSE Computer Science Exam Tips:
4 TCP/IP layers (top to bottom): Application β†’ Transport β†’ Internet β†’ Link. Each layer has a specific role and uses specific protocols. Data is encapsulated going down, decapsulated going up. Packets contain headers from each layer. Application = user interface, Transport = delivery, Internet = routing, Link = physical. Know which protocols belong to which layer.

πŸ“ Exam Questions by Topic

🎬 Video Resources

Share this page

Ready to ace your GCSE Computer Science exams?

Get the best revision books and guides to boost your grades.