MyMisPal
← Networking & security lessons
Lesson 3 of 12

The OSI and TCP/IP models

Sending a message across a network is complicated, so it was split into layers. Each layer has one job and serves the layer above it. Think of a shipping company: one team packs, another labels, another drives, and none needs the others' details.

OSITCP/IPExamples7 · Application6 · Presentation5 · Session4 · Transport3 · Network2 · Data link1 · PhysicalApplicationHTTP · DNSSMTP · SSHTransportTCP · UDPInternetIP · routerNetwork accessEthernet · Wi-FiMAC · switch

When you send data, each layer wraps it in its own header; this is called encapsulation. At the receiver, each layer removes its header until the message reaches the application.

7 · ApplicationWhat programs talk to: HTTP for the web, DNS, SMTP for email.
4 · TransportTCP (reliable, ordered) or UDP (fast, no guarantees). Ports live here.
3 · NetworkIP addresses and choosing a path. The router's job.
2 · Data linkMAC addresses and delivery within one network. The switch's job.
1 · PhysicalCables, fibre and Wi-Fi radio: the raw bits.
Watch outTo remember layers 1 to 7: Please Do Not Throw Sausage Pizza Away = Physical, Data link, Network, Transport, Session, Presentation, Application.

OSI is a teaching and reference model. The internet actually runs on the TCP/IP model with four layers: it merges OSI's top three into “Application” and the bottom two into “Network access”.

Watch outInterviews and certifications like Network+ and CCNA ask a lot about layers. And “it's a layer 1 problem” simply means: the cable is unplugged!
Spotted a mistake on this page, or have an idea to improve the site?