Skip to main content
>_ supraj.dev
TOPIC NETWORKING
Subnets & CIDR what /24 really means
IN 10 SECONDS

Classless Inter-Domain Routing (CIDR) defines network sizes. A /24 subnet mask means the first 24 bits are the network address, leaving 8 bits (256 IPs) for host addresses.

GOTCHA AWS reserves the first 4 and the last 1 IP addresses in every subnet for its own use (e.g., DNS, router). A /28 subnet only has 11 usable IPs instead of 16.
HOW CIDR MASKING FLOWS
01 IP Address is represented as 32 binary bits.
02 Subnet Mask is applied using binary AND logic.
03 Network portion matches the mask bits (first 24 bits for /24).
04 Host portion is variable (last 8 bits). IPs .0 (network) and .255 (broadcast) are reserved.
POKE IT YOURSELF
ipcalc 192.168.1.0/24 — calculate IP ranges, masks, and hosts
nmap -sn 192.168.1.0/24 — scan active hosts in a subnet