What is Binary Subnetting & CIDR Logic?
Mathematical Foundation
Laws & Principles
- The RFC 3021 Exception (/31): Historically, a /31 subnet yielded 0 usable hosts (2 - 2). RFC 3021 changed this specifically for point-to-point links (like router-to-router connections). It recognizes the network and broadcast addresses as usable in this extreme edgecase, yielding exactly 2 hosts.
- The Host Route (/32): A /32 subnet mask means every single bit is dedicated to the network prefix. It isolates a single specific computer without any sub-network. Usable hosts = 1.
- Network vs Broadcast Identifiers: The Network Address is the absolute bottom of the subnet boundary (all host bits are 0). It is used by upstream routers to identify the destination subnet. The Broadcast Address is the absolute top (all host bits are 1). Data sent to this IP is copied and blanket-messaged to every node currently alive on that exact subnet.
Step-by-Step Example Walkthrough
" A sysadmin is assigned the IP 192.168.1.50/24 and needs to find the broadcast address to configure a Wake-on-LAN server. "
- 1. Convert IP to Binary: 11000000.10101000.00000001.00110010.
- 2. Convert /24 Mask to Binary: 11111111.11111111.11111111.00000000 (24 ones, 8 zeroes).
- 3. Run Bitwise AND against IP and Mask to locate the Network Address: 192.168.1.0.
- 4. To find the Broadcast Address, take the 8 host bits (the zeroes in the mask) and flip them all to 1.
- 5. Binary Broadcast: 11000000.10101000.00000001.11111111.
- 6. Convert back to Decimal: 192.168.1.255.