# 1.6 Layering Principle

### Layering&#x20;

![](/files/-MgXG8vPVXlDtHKpgwoj)

* E.x. flights: google flights --> airlines (abstract the details of each airlines)&#x20;
* E.x. postal service&#x20;
  * Mail&#x20;
  * Postal service&#x20;
  * Medias&#x20;
  * Mailman&#x20;
* Can improve each layer independently over time (the interface is the same)
* E.x. computer system&#x20;
  * Breakdown into functional components, each with well-defined roles&#x20;
  * Clear separations of concerns&#x20;
  * Each can be improved, updated over time&#x20;

![E.x. computer system ](/files/-MgXH4hzOQTm-UKaO60k)

* Break the layers boundary only if needed&#x20;

### Reasons for layering&#x20;

![](/files/-MgXIHbF26usHlWYDukn)

* p2p: specific to layered communication systems&#x20;
  * 4-layer: each layer communicate with its peer on the another system, using the delivery service provided by the layers below&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sliu583.gitbook.io/blog/networking/index/computer-networking-a-top-down-approach/stanford-cs144/chapter-1/1.6-layering-principle.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
