All subjects · Computer Science · WCP03 Advanced Principles of Computer Science
The OSI reference model, encapsulation and decapsulation
Edexcel IAL Computer Science · WCP03 Advanced Principles of Computer Science
Networks are built in layers so that each layer can be designed and changed independently. The OSI model has seven layers and gives everyone a common language for describing what happens to data on its journey.
The seven layers
From the top (closest to the user) down:
| No. | Layer | Job | Data unit / examples |
|---|---|---|---|
| 7 | Application | Network services for applications | HTTP, SMTP, DNS |
| 6 | Presentation | Data format, character encoding, compression, encryption | TLS encryption, JPEG |
| 5 | Session | Opens, manages and closes sessions (dialogues) between applications | Session checkpoints |
| 4 | Transport | End-to-end delivery; splits data into segments; ports; error recovery and flow control | Segments; TCP, UDP |
| 3 | Network | Logical addressing and routing between networks | Packets; IP, routers |
| 2 | Data link | Node-to-node delivery on one link; MAC addresses; error detection | Frames; Ethernet, Wi-Fi, switches |
| 1 | Physical | Transmits raw bits as signals | Bits; cables, radio, hubs |
Memory aid (top down): All People Seem To Need Data Processing
Why layers?
- Each layer provides services to the layer above and uses the layer below; it only needs to talk to its peer layer on the other device.
- A layer can be changed (for example, Wi-Fi instead of Ethernet) without changing the others.
- Vendors can build compatible products to agreed standards.
- Problems are easier to locate and teach.
Encapsulation and decapsulation
Encapsulation happens on the sending device as data moves down the layers: each layer adds its own header (and the data link layer also adds a trailer, often a checksum) around the data it receives from above.
Decapsulation happens on the receiving device as data moves up: each layer reads and removes its own header and passes the rest up.
In a diagram, the transport layer wraps the data into a segment; the network layer wraps the segment into a packet; the data link layer wraps the packet into a frame; the physical layer sends the frame as bits.
Worked example
A web page is sent from a server to your browser. Describe what happens at layers 4, 3 and 2 on the server.
- Layer 4 (transport): the data is split into segments, each with a header holding the source and destination port numbers and a sequence number.
- Layer 3 (network): each segment gets an IP header with source and destination IP addresses, making a packet.
- Layer 2 (data link): each packet gets a header with MAC addresses and a trailer for error checking, making a frame.
Answer: Segments, then packets, then frames: one header added per layer.
Check yourself
- How many layers does the OSI model have?
Show answer
7. Seven layers, from physical (1) to application (7).
- Which OSI layer is responsible for routing packets between networks using IP addresses?
- Data link layer
- Transport layer
- Session layer
- Network layer
Show answer
Network layer. Layer 3 handles logical addressing and routing.
- Which OSI layer deals with data format, encryption and compression?
- Physical layer
- Presentation layer
- Network layer
- Data link layer
Show answer
Presentation layer. Layer 6 presents data in a form both ends understand.
- At which layer are MAC addresses used to deliver frames on a local link?
- Application layer
- Transport layer
- Data link layer
- Presentation layer
Show answer
Data link layer. Layer 2 uses MAC addresses and frames.
- What is encapsulation?
- Each layer adds its own header to the data as it passes down the stack on the sending device
- Each layer removes its header on the receiving device
- Encrypting data with a public key
- Splitting a network into subnets
Show answer
Each layer adds its own header to the data as it passes down the stack on the sending device. Going down: wrap; going up: unwrap (decapsulation).
- On the receiving device, in which direction does data travel through the layers during decapsulation?
- Down, from the application layer to the physical layer
- Sideways, between peer devices only
- Up, from the physical layer to the application layer
- It skips straight to the application layer
Show answer
Up, from the physical layer to the application layer. Each layer removes its header and passes the rest upward.
- Which is a benefit of a layered model?
- One layer's protocol can be replaced without changing the other layers
- Data no longer needs addressing
- Every layer must be written by the same company
- It removes the need for error checking
Show answer
One layer's protocol can be replaced without changing the other layers. Layers are independent behind fixed interfaces.
Sources
- Pearson Edexcel International Advanced Subsidiary and Advanced Level in Computer Science specification (2026), Issue 1
- Pearson Edexcel IAL Computer Science sample assessment materials (Unit 3 paper, resource booklet and mark scheme)
Last updated 8 November 2026. Spotted a mistake? Tell us.