DEV Community4/12/2026

Understanding CIDR Notation

Azad Shukor
Understanding IPv4 CIDR Blocks A CIDR block looks like: 10.0.0.0/16 It has two parts: IP address → starting point Prefix (/16) → how many bits are fixed Core Idea (Memorize This First) IPv4 = 32 bits total CIDR /N = N bits are fixed (network) Remaining bits = host bits (free to change) Total addresses = 2^(32 - N) IPv4 Structure An IPv4 address: 10.0.0.0 Breakdown: 10 . 0 . 0 . 0 8 bits 8 bits 8 bits 8 bits Total = 32 bits Each block: 8 bits = values from 0 to 255 Ex