Lion Cipher Lab

Plan subnets with CIDR math, then hand out addresses with a dnsmasq DHCP server

Why it matters

Almost every device on a network gets its address from DHCP, and the address plan behind it decides how big each network can grow, where the firewall can draw lines and how many things will break when it fills up. A subnet that is too small runs out of leases at the worst moment; one that is too big wastes address space and puts everything in one blast radius. A DHCP server is also a trusted voice: whatever router and DNS it announces, clients believe. Planning the subnets and running a server yourself makes those trade-offs concrete, and shows what an administrator watches in the logs.

What you'll learn

Steps in this lab

  1. CIDR in five minutes: what the slash number means
  2. Plan the subnets for a small office
  3. Check your arithmetic with Python
  4. Build the staff network: a server namespace with a bridge
  5. Start dnsmasq as a DHCP-only server with a pool of two
  6. Give two clients a lease
  7. Run out of addresses on purpose
  8. Size the pool, and what a professional does differently
  9. Clean up

Open the full interactive lab →

Keep learning