Networking โ€ข Quick Reference

IPv4 Subnetting, CIDR & VLSM Quick Reference

Every IPv4 address is just 32 bits split into a Network part (the street) and a Host part (the house number). Here is your complete CIDR table, VLSM shortcut, and CLI toolkit.

โฑ๏ธ 8 min ref๐ŸŸข Beginner๐Ÿ“… Updated: Nov 2026

IPv4 32-Bit Anatomy

An IPv4 address has 4 octets (8 bits each = 32 bits total). The /prefix (CIDR notation) tells routers how many bits from the left belong to the network.

192.168.10.25 /24
Network Bits (24)192.168.10Identifies the subnet neighborhood
Host Bits (8).25Identifies the specific device
CIDR Prefix/24Mask: 255.255.255.0

Network Bits vs. Host Bits (Visualized)

Example: 192.168.10.25 /24 (Subnet Mask: 255.255.255.0) NETWORK PORTION โ€” 24 Bits (Locked by Mask = 1) HOST โ€” 8 Bits (0) 192 11000000 Mask: 255 168 10101000 Mask: 255 10 00001010 Mask: 255 25 00011001 Mask: 0 Network ID: 192.168.10.0 Usable: .1 โ€“ .254 (254 hosts) Broadcast: 192.168.10.255

Network bits (cyan) stay identical for every device on the subnet. Host bits (green) change for each device.

01 CIDR /8 to /32 Master Table

Use this master lookup table to convert any /prefix into its Subnet Mask, Wildcard Mask (used in router ACLs & OSPF), Total IPs, and Usable Hosts (Total - 2 for Network & Broadcast).

CIDR Subnet Mask Wildcard Mask Total IPs Usable Hosts Common Use
/8 255.0.0.0 0.255.255.255 16,777,216 16,777,214 Legacy Class A / RFC 1918 10/8
/9 255.128.0.0 0.127.255.255 8,388,608 8,388,606 Large ISP allocation
/10 255.192.0.0 0.63.255.255 4,194,304 4,194,302 CGNAT (100.64.0.0/10)
/11 255.224.0.0 0.31.255.255 2,097,152 2,097,150 Regional ISP block
/12 255.240.0.0 0.15.255.255 1,048,576 1,048,574 RFC 1918 172.16.0.0/12
/13 255.248.0.0 0.7.255.255 524,288 524,286 Large enterprise backbone
/14 255.252.0.0 0.3.255.255 262,144 262,142 Multi-region cloud VPC
/15 255.254.0.0 0.1.255.255 131,072 131,070 Large campus network
/16 255.255.0.0 0.0.255.255 65,536 65,534 Default Cloud VPC (AWS/Azure)
/17 255.255.128.0 0.0.127.255 32,768 32,766 Half of a /16
/18 255.255.192.0 0.0.63.255 16,384 16,382 Large data center zone
/19 255.255.224.0 0.0.31.255 8,192 8,190 Medium enterprise block
/20 255.255.240.0 0.0.15.255 4,096 4,094 Cloud Availability Zone
/21 255.255.248.0 0.0.7.255 2,048 2,046 University / Hospital Wi-Fi
/22 255.255.252.0 0.0.3.255 1,024 1,022 Corporate office building
/23 255.255.254.0 0.0.1.255 512 510 Double-LAN (2 ร— /24)
/24 255.255.255.0 0.0.0.255 256 254 Standard Home / Office LAN
/25 255.255.255.128 0.0.0.127 128 126 Half LAN / Department VLAN
/26 255.255.255.192 0.0.0.63 64 62 Small office / Server tier
/27 255.255.255.224 0.0.0.31 32 30 DMZ / Small public block
/28 255.255.255.240 0.0.0.15 16 14 Management / Bastion subnet
/29 255.255.255.248 0.0.0.7 8 6 Tiny ISP static IP block
/30 255.255.255.252 0.0.0.3 4 2 Router-to-Router Point-to-Point
/31 255.255.255.254 0.0.0.1 2 2* RFC 3021 P2P Link (no broadcast)
/32 255.255.255.255 0.0.0.0 1 1 Single Host / Firewall Allowlist

02 Private & Special IPv4 Ranges

Not all IPv4 addresses can be routed on the public internet. Memorize these reserved ranges so you can instantly spot local, ISP, or broken-DHCP traffic.

RFC 1918 โ€” Class A
10.0.0.0/8
10.0.0.0 โ€“ 10.255.255.255
Enterprise LANs, Cloud VPCs, Kubernetes
RFC 1918 โ€” Class B
172.16.0.0/12
172.16.0.0 โ€“ 172.31.255.255
Docker bridge networks, corporate VPNs
RFC 1918 โ€” Class C
192.168.0.0/16
192.168.0.0 โ€“ 192.168.255.255
Home routers & small office networks
Range (CIDR) Address Span Name / RFC What It Means in Real Life
127.0.0.0/8 127.0.0.1 โ€“ 127.255.255.254 Loopback (RFC 1122) "Talk to myself" โ€” local machine testing (localhost). Never leaves the NIC.
169.254.0.0/16 169.254.0.1 โ€“ 169.254.255.254 APIPA / Link-Local (RFC 3927) Auto-assigned when DHCP fails. Also used for AWS/Azure metadata (169.254.169.254).
100.64.0.0/10 100.64.0.0 โ€“ 100.127.255.255 CGNAT (RFC 6598) Carrier-Grade NAT shared by ISPs, plus mesh VPNs like Tailscale.
0.0.0.0/8 0.0.0.0 Unspecified / "This Network" In servers: "listen on all interfaces." In routing: default route (0.0.0.0/0).
224.0.0.0/4 224.0.0.0 โ€“ 239.255.255.255 Multicast (RFC 5771) One-to-many traffic (OSPF 224.0.0.5, mDNS 224.0.0.251).

03 VLSM & Magic Number Memory Trick

VLSM (Variable Length Subnet Masking) means carving a big network into different-sized pieces so you don't waste IPs (e.g., /26 for 50 users, /30 for a 2-router link). Always allocate the largest subnet first.

๐Ÿง  The Magic Number Trick: 256 - Interesting Octet

Want to find the block size of any subnet in 3 seconds? Subtract the non-255, non-0 octet of the subnet mask from 256!

Example: Mask 255.255.255.192 (/26) โ†’ Interesting octet is 192 โ†’ 256 - 192 = 64.
Your subnets jump by 64: .0, .64, .128, .192!

Quick Subnet Calculator CLI Commands

ipcalc 192.168.10.45/26 Linux / macOS
Show network, broadcast & usable host range
Instantly prints Network (.0), Broadcast (.63), HostMin (.1), HostMax (.62), and Hosts (62).
sipcalc 10.20.30.40/22 Linux / BSD
Detailed CIDR & binary breakdown
Displays wildcard mask, usable range, and binary representation of the IP and mask.
ipcalc 172.16.0.0/24 -s 60 20 2 Linux (ipcalc VLSM)
Auto-split a /24 into VLSM subnets
Carves 172.16.0.0/24 into blocks for 60 hosts (/26), 20 hosts (/27), and 2 hosts (/30).
python3 -c "import ipaddress; n=ipaddress.ip_network('192.168.1.0/24'); print(list(n.subnets(new_prefix=26)))" Cross-Platform (No Install)
Split a subnet using built-in Python
Works offline on any machine with Python 3โ€”no extra packages needed.

04 Binary Powers of 2 Quick Table (20โ€“28)

Every subnetting calculation boils down to powers of 2. Keep this chart handy to convert binary bits to decimal octets and calculate host counts (2h - 2).

Power Value (2n) Bit Position (Octet) Cumulative Subnet Mask Usable Hosts (if h = n)
20 1 00000001 (8th bit) 255 (8 bits on) /32 โ†’ 1 host
21 2 00000010 (7th bit) 254 (7 bits on) /31 โ†’ 2* (P2P)
22 4 00000100 (6th bit) 252 (6 bits on) /30 โ†’ 2 hosts
23 8 00001000 (5th bit) 248 (5 bits on) /29 โ†’ 6 hosts
24 16 00010000 (4th bit) 240 (4 bits on) /28 โ†’ 14 hosts
25 32 00100000 (3rd bit) 224 (3 bits on) /27 โ†’ 30 hosts
26 64 01000000 (2nd bit) 192 (2 bits on) /26 โ†’ 62 hosts
27 128 10000000 (1st bit) 128 (1 bit on) /25 โ†’ 126 hosts
28 256 Full Octet (Magic #) 0 (0 bits on) /24 โ†’ 254 hosts

05 Danger Zone: Subnetting Mistakes

โš ๏ธ Common Traps That Break Routing
1. Assigning .0 (Network ID) or .255 (Broadcast) to a Host: In a /24, 192.168.1.0 names the network and 192.168.1.255 shouts to everyone. Assigning either to a server or gateway causes silent packet drops. (Note: in a /23 like 192.168.0.0/23, 192.168.0.255 and 192.168.1.0 are valid host IPs!)
2. Creating Overlapping Subnets: Assigning 10.0.1.0/24 to Office A and 10.0.0.0/22 to Office B means Office B swallows Office A's range. VPN tunnels and cloud VPC peering will fail or misroute traffic.
3. Confusing /32 with /24 in Firewall Rules: Allowing 203.0.113.15/24 opens SSH/RDP to 254 strangers in that block. Always use /32 for a single IP address.
4. Forgetting Network & Broadcast in Cloud Subnets: AWS, Azure, and GCP reserve 5 IPs per subnet (first 4 + last 1), not just 2. A /28 (16 IPs) only gives you 11 usable cloud IPs.