> For the complete documentation index, see [llms.txt](https://sliu583.gitbook.io/blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sliu583.gitbook.io/blog/networking/index/computer-networking-a-top-down-approach/stanford-cs144/chapter-1/1.6-layering-principle.md).

# 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;
