Knowledge Guide
HomeSystem DesignNetworking Fundamentals

IP Addressing, Subnets & CIDR

What an IP address is

An IP address is the network-layer identity of a host — the "where" that routing uses to move a packet across networks. Two versions coexist:

Public vs private addresses

Certain IPv4 ranges are reserved as private — routable only inside a local network, never on the public internet. A NAT gateway translates many private hosts behind one public address. Knowing these ranges on sight is genuinely useful when reading any cloud VPC config:

RangeCIDRSizeTypical use
10.0.0.0 – 10.255.255.25510.0.0.0/8~16.7MLarge private networks / cloud VPCs
172.16.0.0 – 172.31.255.255172.16.0.0/12~1MMid-size networks
192.168.0.0 – 192.168.255.255192.168.0.0/16~65KHome / small office
127.0.0.0/8127.0.0.1Loopback (localhost)

CIDR — how address blocks are sized

CIDR (Classless Inter-Domain Routing) notation appends a prefix length: 10.0.1.0/24. The number is how many leading bits are fixed (the network part); the remaining bits are host addresses. The rule of thumb:

Each step down in prefix length doubles the block. A /24 holds 2(32−24) = 256 addresses; a /16 holds 65,536.
CIDRHost bitsAddressesMnemonic
/3201A single host
/248256One "class C" subnet
/161665,536A large subnet / VPC
/82416,777,216A huge block

This is the math behind sizing a cloud subnet, writing a firewall/security-group rule, or reading a routing table. When you allocate 10.0.0.0/16 to a VPC and carve /24s out of it for each availability zone, you are just spending host bits.

Takeaways


Re-authored for this guide, with concepts and diagrams adapted from Karan Pratap Singh’s System Design (course, MIT licence) and the System Design Primer (CC BY 4.0). Diagrams © their respective authors.

🤖 Don't fully get this? Learn it with Claude

Stuck on IP Addressing, Subnets & CIDR? Open Claude, copy a block below, and it'll teach you this exact concept — visually and interactively.

🎨 Explain it visually

Build the mental picture, not memorization.

I just read a lesson on **IP Addressing, Subnets & CIDR** (System Design) and want to truly understand it. Explain IP Addressing, Subnets & CIDR from first principles using ONE vivid real-world analogy and a visual mental model — draw it as ASCII art or a clear step-by-step diagram — with a concrete example using real numbers. Then ask me one question to check I got the mental picture, and wait for my reply. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🤔 Walk me through it (interactive)

Socratic — adapts to where you're stuck.

Teach me **IP Addressing, Subnets & CIDR** interactively. Ask me ONE guiding question at a time, wait for my answer, and adapt to my confusion — build the idea with me step by step instead of explaining it all at once. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🧪 Quiz me & fix my gaps

Active recall exposes what you missed.

Quiz me on **IP Addressing, Subnets & CIDR** with 5 questions, easy to tricky, ONE at a time. Tell me if each answer is right; at the end, explain clearly what I got wrong and why. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🧠 Make it stick

Intuition + hook + flashcards for long-term memory.

Help me remember **IP Addressing, Subnets & CIDR** for the long term: give the one-sentence intuition, a memorable hook/mnemonic, a tiny worked example, and 3 active-recall flashcards (Q -> A). If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.

📝 My notes