If you have ever provisioned an AWS VPC /28 subnet expecting 14 usable IPs for a small microservice tier or NAT gateway—and watched deployment fail at host #12—you ran straight into the gap between textbook Ethernet subnetting and modern cloud networking.

1. Textbook RFC (-2) vs. Cloud VPC (-5 and -4)

Under standard RFC 4632 Ethernet rules, every subnet reserves 2 addresses:

  • The network identifier (all host bits 0)
  • The directed broadcast address (all host bits 1)

That gives the classic formula 2^(32 - prefix) - 2. For a /28 (16 total IPs), you expect 14 assignable hosts.

Public clouds reserve additional infrastructure addresses inside every single subnet:

Environment Reserved IPs What Gets Reserved Usable IPs in /28
Standard RFC Ethernet 2 .0 Network, .last Broadcast 14
AWS VPC & Azure VNet 5 .0 Network, .1 VPC Router, .2 Cloud DNS, .3 Future use, .last Broadcast 11
Google Cloud VPC 4 .0 Network, .1 Default Gateway, Penultimate IP, .last Broadcast 12

Because AWS reserves five addresses, the smallest legal VPC subnet is /28 (11 usable IPs), and a 12-host database or Kubernetes tier must step up to a /27 (27 usable IPs).

2. How to Compute Any Subnet Boundary in Seconds (The Magic Number Method)

Whether you are debugging an on-call routing outage or sitting a university / certification networking exam, converting all 32 bits to binary by hand is slow and error-prone. The Magic Number shortcut works on any prefix from /8 to /30:

  1. Find the interesting octet (the octet in the subnet mask that is neither 255 nor 0).
  2. Compute Block Size (Magic Number): 256 - mask_octet.
  3. Find the Network ID: Pick the largest multiple of the Magic Number that is <= the IP's value in that octet. Zero out any octets to the right.
  4. Find Broadcast: Add the Magic Number to get the next subnet, then subtract 1.

Worked Example: 10.24.16.45/28 in AWS VPC Mode

  • Mask for /28 is 255.255.255.240 → interesting octet is #4 (240).
  • Magic Number: 256 - 240 = 16.
  • Multiples of 16: 0, 16, 32, 48... → largest multiple <= 45 is 32.
  • Network Address: 10.24.16.32/28
  • Broadcast Address: 10.24.16.47 (48 - 1)
  • AWS Assignable Range (-5): 10.24.16.36 through 10.24.16.46 (11 usable hosts; .32, .33, .34, .35, and .47 are reserved).

3. Free Browser-Only Tools & Interactive Practice Lab

I built NetDevKit as a zero-backend, 100% client-side engineering workbench (everything runs locally in vanilla JavaScript—nothing pasted ever leaves your browser) with both a Production Engineer mode (default) and a Student & Exam Prep mode:

  • IPv4 & Cloud VPC Subnet Calculator — Supports RFC (-2), AWS/Azure (-5), and GCP (-4) modes, raw ip a / ifconfig terminal paste parsing, instant IP-in-Subnet membership verification, one-click ÷2 / ÷4 / ÷8 equal subnet splitting, Terraform cidrsubnet() generation, and an interactive 32-bit color-coded binary visualizer in Study mode.
  • Interactive Networking & Subnetting Practice Lab — Unlimited procedurally generated IPv4 subnetting, VLSM/AWS sizing, Cisco wildcard mask, IANA port security, and HTTP gateway triage drills with 32-bit binary proofs, keyboard shortcuts (1–4 / Enter), and a local Missed-Question Review Queue.
  • Complete IPv4 Binary & Magic Number Guide — Full reference table and step-by-step derivations.
  • Client-Side IP, HTTP/3, TLS 1.3 & WebRTC Leak Inspector — Audits your live HTTP/3 QUIC, post-quantum TLS 1.3 key exchange, local WebRTC ICE candidates, and browser fingerprint entropy without third-party trackers.

If you spot any cloud VPC or RFC edge case we should add to the calculator or practice lab, drop a comment below!