Opscraft
Foundations: Linux, scripting, Git & networking

IP addressing & subnetting

Must-know9 lessons · 32 min · 3 tests ·

IP addressing questions are quick arithmetic once you can see addresses in binary, remember the class and private ranges, and use the block-size trick. Interviewers use them as a fundamentals check ("how many usable hosts in a /27?", "is this address in that subnet?"), and in AWS the same maths decides how you size VPCs and subnets — which matters a lot on EKS, where every pod consumes a VPC IP. This topic takes you from binary basics to planning IP space for a multi-account AWS organisation.

Stage 1 · Foundations

Know these first

After this topic you can

  • Read CIDR blocks and calculate subnet sizes
  • Plan non-overlapping VPC and subnet ranges
  • Explain private ranges, NAT and IPv6 basics

Lessons

  1. 1IPv4 structure and binary 3 min read
    • The address
    • Binary conversion
    • Network part and host part
  2. 2Classful addressing 3 min read
    • The five classes
    • Why classes were abandoned
  3. 3Private, special and reserved ranges 3 min read
    • RFC 1918 private ranges
    • Other special ranges
    • Public vs private
  4. 4CIDR notation and subnet masks 3 min read
    • Prefix lengths
    • The reference table
    • Wildcard masks
  5. 5Subnetting step by step 5 min read
    • The block-size method
    • Sizing a subnet for N hosts
    • Splitting a network (subnetting)
    • VLSM — variable-length subnets
    • Summarisation (supernetting)
    • Checking your work with tools
  6. 6IPv6 essentials 3 min read
    • Format
    • Address types
    • IPv6 in AWS and Kubernetes
  7. 7IP planning in AWS and EKS 6 min read
    • AWS rules
    • Planning for many accounts
    • EKS: pods eat IPs
    • Kubernetes CIDRs
  8. 8Overlaps and real-world gotchas 3 min read
  9. 9Interview questions and model answers 3 min read
    • "How many usable hosts in a /27? In a /20?"
    • "What's the network address of 192.168.10.77/27?"
    • "What are the IP classes and are they still used?"
    • "Why can't the internet reach my EC2 instance's private IP?"
    • "How would you size subnets for an EKS cluster?"
    • "You need to connect two VPCs that are both 10.0.0.0/16. What happens?"
    • "Summarise 10.1.0.0/24 and 10.1.1.0/24."