What is the OSI model and what happens at each layer?
The OSI model describes networking in seven layers, each serving the one above.
- 7. Application — protocols users interact with: HTTP, SMTP, DNS, FTP.
- 6. Presentation — encoding, encryption, and compression. TLS is usually placed here.
- 5. Session — establishing and managing connections between applications.
- 4. Transport — end-to-end delivery. TCP (reliable, ordered, connection-oriented) and UDP (fast, connectionless, no delivery guarantee). Ports live here.
- 3. Network — logical addressing and routing between networks. IP addresses, routers, and ICMP.
- 2. Data Link — delivery within a single network segment. MAC addresses, switches, and VLANs.
- 1. Physical — cables, connectors, radio, and electrical signalling.
Why it matters practically: it gives you a troubleshooting order. Work up from the bottom — is it physically connected, does it have an IP address, can it reach the gateway, does DNS resolve, does the application respond. Jumping to layer 7 when the cable is unplugged is the mistake the model prevents.
Note: The TCP/IP model is the one actually implemented, with four layers — Link, Internet, Transport, Application. OSI survives because it is a better teaching and diagnostic framework. Being able to say that shows understanding rather than memorisation.





