OSI & TCP/IP Model
The seven-layer OSI model and the practical four-layer TCP/IP model, what runs at each layer, and the three port ranges.
Neither model is a protocol. Both describe where a protocol's job starts and ends. OSI is the seven-layer teaching model. TCP/IP is the four-layer one networks are built on.
Knowing the layer points you at the right evidence. An ARP conflict is layer 2. A broken API response is layer 7. A stateless ACL only sees layers 3 and 4.
11 rows.
TCP/IP collapses some of these layers.
| Layer | Name | What it does |
|---|---|---|
| 1 | Physical | The physical medium and the raw signaling that carries bits across it: cabling, connectors, voltage levels, light pulses, and radio frequencies. Nothing at this layer has any concept of an address; it just moves an electrical, optical, or radio signal from one point to another. |
| 2 | Data Link | Packages raw bits into frames, adds physical (MAC) addressing, and governs how devices share access to the same local segment. This is where switching happens. |
| 3 | Network | Handles logical addressing and routing: how a packet gets addressed and forwarded across multiple networks toward a destination that isn't on the local segment. |
| 4 | Transport | Provides end-to-end delivery between two processes on two hosts: connection setup, reliability (retransmission and ordering), and flow control, or the deliberate absence of any of that. |
| 5 | Session | Establishes, maintains, and tears down the logical session between two communicating applications, tracking which packets belong to which ongoing exchange independently of the transport connection underneath it. |
| 6 | Presentation | Translates data between the format an application uses and a format suitable for the wire: character encoding, serialization, compression, and, in the model's classic telling, encryption. |
| 7 | Application | Where application protocols operate, along with the software people actually interact with. This is where recognizable, named protocols live. |
| Link | 1, 2 | Combines OSI's Physical and Data Link layers: everything involved in physically transmitting and locally addressing data on a single network segment. |
| Internet | 3 | Corresponds directly to OSI's Network layer: logical addressing and routing across networks. |
| Transport | 4 | Corresponds directly to OSI's Transport layer: end-to-end delivery between processes, reliable or not. |
| Application | 5, 6, 7 | Combines OSI's Session, Presentation, and Application layers into one. Session management, data formatting, and the application protocol itself are all just the application's problem in this model. |