Interactive IPv4 subnet mask visualizer
  • HTML 70.9%
  • JavaScript 29.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
zclaude b979c190c7 Never let a network grow past its home block (private/special block or classful network)
192.168.x.x can no longer be given a /8 (or anything shorter than /16): it would
swallow public 192.x space. Sliders and presets stop at the floor and explain why.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 15:06:30 -05:00
tests Never let a network grow past its home block (private/special block or classful network) 2026-11-12 15:06:30 -05:00
web Never let a network grow past its home block (private/special block or classful network) 2026-11-12 15:06:30 -05:00
.gitignore Subnet visualizer: bits, subnet/host counts, subnet list, mobile layout 2026-11-12 14:48:01 -05:00
README.md Never let a network grow past its home block (private/special block or classful network) 2026-11-12 15:06:30 -05:00

subnet-viz

Interactive IPv4 subnet visualizer: pick an address, a starting prefix and a subnet mask, and see the 32 bits (network / borrowed subnet / host), how many subnets are created (2^borrowed), usable hosts per subnet (2^host − 2, with /31 and /32 special-cased), where your subnet sits, and the full subnet list. Tap mask bits to move the mask, tap address bits to flip them. State lives in the URL hash (#ip/base/mask[/classful]) so setups can be shared.

Rules: classful mode (default) locks the starting network to the address class. In both modes a network can never be larger than the address's home block: its private/link-local/loopback block (10/8, 172.16/12, 192.168/16, 169.254/16, 127/8), else its classful network. So 192.168.x.x/8 is impossible: it would swallow public 192.x space.

Static single page: web/index.html, no build step. Live at https://apps.wizardhat.info/subnet-viz/

Test (headless Chrome over CDP; runs under node or deno):

CHROME=<chrome-headless-shell> deno run -A tests/browser_check.mjs web <shots dir>