How it works
From the bottom up, the seven layers are physical (cables and radio), data link (Ethernet and Wi-Fi between neighbouring devices), network (IP addresses and routing), transport (TCP and UDP), session, presentation and application (HTTP, DNS, SSH). Each layer relies only on the one below it, which is why a website works the same over Wi-Fi, fibre or a mobile network.
The internet actually runs on the simpler four-layer TCP/IP model, which merges the top three OSI layers into one application layer and the bottom two into a link layer. The OSI numbers survive as shorthand: a 'layer 2' switch moves Ethernet frames, a 'layer 4' load balancer routes by address and port, and a 'layer 7' firewall reads the requests themselves.
Related terms
More in Networking
Network basics