IP Subnetting Demystified: From CIDR to Broadcast in 10 Minutes

A hands-on walkthrough of IPv4 subnetting using binary arithmetic. Practice with our free IP Subnet Calculator.

Subnetting is one of those skills that every network engineer learns, most forget, and everyone needs when something breaks at 2am. This guide gives you the mental model and the math β€” once, correctly.

What is CIDR?

CIDR (Classless Inter-Domain Routing) notation expresses an IP address and its associated routing prefix. 192.168.1.0/24 means the first 24 bits are the network portion, and the remaining 8 bits are for hosts.

The Binary Foundation

Every subnet calculation is binary arithmetic. A /24 network has a subnet mask of 11111111.11111111.11111111.00000000 in binary β€” or 255.255.255.0 in dotted-decimal.

IP Address:     192.168.1.100  β†’  11000000.10101000.00000001.01100100
Subnet Mask:    255.255.255.0  β†’  11111111.11111111.11111111.00000000
                                  ─────────────────────────────────────
Network Addr:   192.168.1.0    β†’  11000000.10101000.00000001.00000000
Broadcast:      192.168.1.255  β†’  11000000.10101000.00000001.11111111

The Three Key Calculations

  • Network Address = IP AND Subnet Mask (bitwise AND)
  • Broadcast Address = Network OR (NOT Mask) β€” all host bits set to 1
  • Usable Hosts = 2^(32βˆ’prefix) βˆ’ 2 (minus network and broadcast)

Common CIDR Reference

CIDRSubnet MaskTotal AddressesUsable HostsUse Case
/8255.0.0.016,777,21616,777,214Class A Enterprise
/16255.255.0.065,53665,534ISP Allocations
/24255.255.255.0256254Standard Office LAN
/28255.255.255.2401614Small Segments
/30255.255.255.25242Point-to-Point Links
/32255.255.255.25511Host Route

Variable Length Subnet Masking (VLSM)

VLSM allows you to split a network into subnets of different sizes β€” allocating address space efficiently. A /24 network can be split into multiple /26 networks (62 hosts each), /28 networks (14 hosts), and /30 point-to-point links β€” all without wasting address space.

Practice with Our Subnet Calculator

Rather than doing the binary math by hand, use our free IP Subnet Calculator to verify your work. Enter any IP and CIDR prefix to instantly get: Network Address, Broadcast, Subnet Mask, Wildcard Mask, Usable Hosts, and full binary notation.

"Every network problem eventually comes down to understanding where the packet is β€” and subnetting tells you if it should even be there."

Marcus Webb

// Network Engineer

Senior network engineer with 15 years designing enterprise LAN/WAN infrastructure. Specializes in MPLS, SD-WAN, and network security architecture.