At which OSI layer do common protocols and devices work?
MediumConceptOSI & TCP/IP Models
Answer
A device works at the highest layer whose header it reads to make its forwarding decision, and a protocol belongs to the layer whose service it provides.
| Layer | Protocols | Devices |
|---|---|---|
| 7 Application | HTTP, DNS, DHCP, SMTP, FTP, SSH | proxies, layer-7 load balancers |
| 6 Presentation | TLS encryption, ASCII, JPEG | none specific |
| 5 Session | RPC, NetBIOS | none specific |
| 4 Transport | TCP, UDP | layer-4 load balancers, stateful firewalls |
| 3 Network | IP, ICMP, OSPF, RIP | routers, layer-3 switches |
| 2 Data Link | Ethernet, Wi-Fi (802.11), PPP | switches, bridges, access points |
| 1 Physical | signalling, cables, connectors | hubs, repeaters |
- ARP is usually placed between layers 2 and 3, because it maps IP addresses to MAC addresses.
- Some protocols sit on top of others: DHCP and DNS travel over UDP, and BGP travels over TCP.
Example: A switch reads only the destination MAC address (layer 2), so it connects PCs within one LAN but cannot route between networks. A router reads the destination IP address (layer 3) and chooses a path between networks. A layer-7 load balancer reads the HTTP path, so it can send /api and /images to different servers.