How CIDR Subnetting Works
CIDR (Classless Inter-Domain Routing) replaces old classful networks (Class A, B, C) with flexible prefix lengths. An address like 10.0.5.20/22 means the first 22 bits identify the network; the remaining 10 bits are for hosts.
To find the network address, bitwise-AND the IP with the subnet mask. To find the broadcast, OR the network with the inverted mask (wildcard mask).
Subnet Mask vs Wildcard Mask
The subnet mask uses 1s for network bits and 0s for host bits. A wildcard mask flips this — 0s where bits must match, 1s where bits are ignored. ACLs on Cisco gear use wildcard masks: 0.0.0.255 matches any host in the last octet.
IPv6 Prefixes
IPv6 subnets are almost always /64 on LANs — one subnet per interface with a vast address space. fc00::/7 is Unique Local (ULA, like private IPv4). fe80::/10 is link-local. Use the IPv6 tab above for prefix calculations.