---
title: "Layered protocols, headers and trailers"
subject: "Computer Networks and Security"
chapter: 1
key: "semester_7/computer_networks_and_security:layered-protocols-headers"
source: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/layered-protocols-headers
site: BCT Engineering
---

# Layered protocols, headers and trailers

Computer Networks and Security · Chapter 1: Introduction to Computer Network

- Asked in: 2073 Chaitra, 3 marks; 2069 Chaitra, 6 marks (asked 2 times)
- Video: [What is OSI Model | Real World Examples](https://www.youtube.com/watch?v=0y6FtKsg6J4) — ByteByteGo
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/layered-protocols-headers
- Whole chapter: https://www.bctengineer.com/md/semester_7/computer_networks_and_security/chapter-1

## Question

What are the reasons for using layered protocols (need of networking software in the form of a hierarchy)?

## Short answer

Layering divides communication into manageable modules, enabling modularity, standardisation, easy troubleshooting, abstraction, and reuse. Each layer adds a header to data from above, and the peer layer removes it. The main drawback is added overhead from headers and some duplication.

## Answer

A layered protocol architecture splits the complex job of communication into smaller tasks, each handled by one layer. Network software is organised as a hierarchy (stack) of layers. Each layer offers services to the layer above and hides how they are done.

#### Reasons for using layered protocols
1. **Divide and conquer:** a big problem becomes several small, manageable ones.
2. **Modularity:** a layer can be changed (for example, Ethernet replaced by Wi-Fi) without changing other layers, as long as the interface is the same.
3. **Standardisation:** each layer has clear functions, so products from different vendors interoperate.
4. **Easy troubleshooting and testing:** a fault can be traced to one layer.
5. **Abstraction:** upper layers need not know details of lower ones (an email program does not care about cable type).
6. **Easy design and teaching:** the stack is simple to understand, and different teams can develop different layers independently.
7. **Reuse:** one layer, such as IP, can serve many upper protocols.

#### How layering works
Each layer on the sender adds its own control information (header) to the data from the upper layer. The peer layer on the receiver removes it and uses it.

```text
 Layer n+1 data --> [H_n | data] --> layer n
 (header added going down, removed going up)
```

**Drawback:** each layer adds header overhead and some duplication of functions, which slightly reduces efficiency.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What does modularity in layered protocols allow?
   A. Changing one layer (e.g. Ethernet to Wi-Fi) without changing other layers if the interface stays the same
   B. Removing the need for any interfaces
   C. Merging all layers into one
   D. Making all layers use the same protocol
   Answer: A. Layers are independent so one can be replaced as long as its interface to adjacent layers is unchanged. (Key point: Modularity)

2. Which example illustrates abstraction in layering?
   A. An email program must know the cable type
   B. An email program does not care about the type of cable used
   C. The physical layer reads the email text
   D. Routers edit the email body
   Answer: B. Upper layers need not know details of lower layers, so email software is independent of the cable. (Key point: Abstraction)

3. What is the main drawback of layered protocols?
   A. Cannot be standardised
   B. Header overhead and some duplicated functions reduce efficiency slightly
   C. Faults cannot be traced
   D. Products from different vendors cannot interoperate
   Answer: B. Each layer adds its own header and some functions repeat, which slightly lowers efficiency. (Key point: Drawback of layering)

4. How does layering help troubleshooting?
   A. It hides all faults
   B. A fault can be traced to one layer
   C. It removes the need for testing
   D. It makes all layers fail together
   Answer: B. With clear layer functions, a problem can be isolated to a particular layer. (Key point: Troubleshooting benefit)

## Related in Computer Networks and Security

- [Headers and trailers](https://www.bctengineer.com/question.md?key=semester_7%2Fcomputer_networks_and_security%3Aheaders-trailers-added-removed) — Computer Networks and Security, chapter 1, asked 2×

## Related in other subjects

- [Need for bus hierarchy](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Abus-hierarchy) — Computer Organization and Architecture, chapter 1
- [Layered approach to security](https://www.bctengineer.com/question.md?key=semester_8%2Finformation_system%3Alayered-security-throughput) — Information System, chapter 2
- [Energy needs in Maslow's hierarchy](https://www.bctengineer.com/question.md?key=semester_7%2Fenergy_environment_and_society%3Amaslow-energy-needs) — Energy Environment and Society, chapter 1, asked 2×
- [Motivation: Maslow's hierarchy and Herzberg's theory](https://www.bctengineer.com/question.md?key=semester_8%2Fconstruction_management%3Amotivation-maslow-herzberg) — Construction Management, chapter 10
