OSI.md
 1  ## OSI Model (Open Systems Interconnection Model)
 2  
 3  **What it is:**
 4  The OSI model is a conceptual framework that standardizes communication between network devices. It divides the communication process into seven distinct layers, each with specific functions.
 5  
 6  **The Seven Layers:**
 7  
 8  | Layer | Name         | Function                                               | Example Protocols                          |
 9  | ----- | ------------ | ------------------------------------------------------ | ------------------------------------------ |
10  | 7     | Application  | User interface, data presentation                      | [[HTTP]], [[FTP]], [[SMTP]], [[DNS]]       |
11  | 6     | Presentation | Data formatting, encryption, compression               | [[SSL]]/[[TLS]], JPEG, ASCII               |
12  | 5     | Session      | Establishes, manages, and terminates sessions          | [[NetBIOS]], [[RPC]]                       |
13  | 4     | Transport    | End-to-end communication, flow control, error recovery | [[TCP]], [[UDP]]                           |
14  | 3     | Network      | Logical addressing, routing                            | [[IP]], [[ICMP Echo Requests \| ICMP]]     |
15  | 2     | Data Link    | Physical addressing, error detection                   | [[Ethernet]], [[Wi-Fi]], [[MAC addresses]] |
16  | 1     | Physical     | Transmission of raw bits over the physical medium      | Cables, connectors, wireless signals       |
17  
18  **Key Concepts:**
19  
20  - **Encapsulation:** Data is wrapped with headers and trailers at each layer as it travels down the model.
21  - **Decapsulation:** The reverse process occurs at the receiving end, with each layer removing its corresponding headers/trailers.
22  - **Peer-to-peer communication:**  Layers communicate logically with their counterparts on other devices.
23  
24  **Why it's important:**
25  
26  - **Standardization:** Provides a common language and framework for network communication.
27  - **Troubleshooting:** Helps isolate problems to specific layers.
28  - **Interoperability:** Enables devices from different vendors to communicate.
29  
30  **Note:** The OSI model is a theoretical framework. Real-world protocols may not strictly adhere to all its layers.