RMS Meta

RMS Meta

Code to cloud for people & nature

Blog · Dec 25, 2025

OSI Layers and IP Address Classes: A Quick Primer

This primer covers the 7-layer OSI model and the classic IPv4 address classes you’ll encounter in networking basics.

The 7 OSI layers (top to bottom)

  1. Application (L7): User-facing protocols and services (HTTP, DNS, SMTP, SSH).
  2. Presentation (L6): Data format/encoding, encryption/decryption (TLS/SSL handling, serialization).
  3. Session (L5): Session setup/teardown, dialog control (RPC sessions, NetBIOS sessions).
  4. Transport (L4): End-to-end delivery and flow control (TCP, UDP). Ports live here.
  5. Network (L3): Logical addressing and routing (IP, ICMP). Routers operate here.
  6. Data Link (L2): Frames, MAC addresses, switching, VLANs (Ethernet, Wi‑Fi 802.11). Switches operate here.
  7. Physical (L1): Bits on wire/air (cables, radio, signaling).

Tip: “Please Do Not Throw Sausage Pizza Away” is a common mnemonic (Physical, Data link, Network, Transport, Session, Presentation, Application).

IPv4 address classes (historical view)

  • Class A: 0.0.0.0 – 127.255.255.255 (default mask /8). First octet 0–127.
  • Class B: 128.0.0.0 – 191.255.255.255 (default mask /16). First octet 128–191.
  • Class C: 192.0.0.0 – 223.255.255.255 (default mask /24). First octet 192–223.
  • Class D: 224.0.0.0 – 239.255.255.255 (multicast).
  • Class E: 240.0.0.0 – 255.255.255.255 (experimental).

Common private IPv4 ranges

  • 10.0.0.0/8 (Class A private)
  • 172.16.0.0/12 (Class B private)
  • 192.168.0.0/16 (Class C private)

Modern practice (CIDR)

Today, Classless Inter-Domain Routing (CIDR) is used instead of strict classful boundaries. Networks are defined by prefixes like /24, /20, /16 to size subnets as needed.

Quick takeaways

  • OSI helps map tech to layers: cables (L1), switches/VLANs (L2), IP/routing (L3), TCP/UDP (L4), TLS/HTTP/DNS (L5–L7 stack).
  • Classful addressing is historical; know it for private ranges and legacy context. Use CIDR in real designs.

With this, you can place protocols and devices on the OSI model and understand IP ranges you’ll see in labs and production.