IPv4 Network Architecture, Binary Boolean Masking & VLSM Subnetting
In telecommunications and computer networking, the Internet Protocol Version 4 (IPv4) architecture structures communication over packet-switched networks using 32-bit logical addresses. Subnetting systematically partitions a monolithic network into smaller, topologically isolated routing domains—optimizing broadcast traffic containment, routing table convergence, and address allocation efficiency.
The 32-Bit Dual-Field Topology
An IPv4 address comprises 32 contiguous binary bits grouped into four 8-bit octets separated by decimal periods. A subnet mask divides this 32-bit vector into a Network Prefix of length $p$ bits (identifying the administrative routing domain) and a Host Field of length $32 - p$ bits (identifying discrete host network interfaces).
Boolean Algebraic Network & Broadcast Derivation
Routers identify the base Network Address by performing a bitwise logical AND operation ($\land$) between the 32-bit IP address vector and the Subnet Mask vector:
The Directed Broadcast Address (which addresses all hosts on the subnet simultaneously) is derived by setting all host field bits to binary 1, equivalent to a bitwise logical OR ($\lor$) with the bitwise NOT ($\neg$) of the mask:
Host Capacity & Usable Address Formulas
For a given Classless Inter-Domain Routing (CIDR) prefix length $p$ ($1 \le p \le 32$), the total address capacity $N_{\text{total}}$ and usable host address capacity $N_{\text{usable}}$ evaluate to:
The subtraction of $2$ accounts for the reserved base Network Address (all host bits $0$) and the Broadcast Address (all host bits $1$). Point-to-point links using $/31$ subnetting adhere to RFC 3021 which permits 2 usable hosts without broadcast reservation.
Classful IPv4 Boundaries vs. RFC 1918 Private Scopes
| Address Classification | Leading Bits / Range | Default Mask | RFC 1918 Private Non-Routable Range |
|---|---|---|---|
| Class A | $0\dots$ (1.0.0.0 – 126.255.255.255) | 255.0.0.0 (/8) | 10.0.0.0 /8 (10.0.0.0 – 10.255.255.255) |
| Class B | $10\dots$ (128.0.0.0 – 191.255.255.255) | 255.255.0.0 (/16) | 172.16.0.0 /12 (172.16.0.0 – 172.31.255.255) |
| Class C | $110\dots$ (192.0.0.0 – 223.255.255.255) | 255.255.255.0 (/24) | 192.168.0.0 /16 (192.168.0.0 – 192.168.255.255) |
| Class D (Multicast) | $1110\dots$ (224.0.0.0 – 239.255.255.255) | N/A (Group Address) | 239.0.0.0 /8 (Administratively Scoped) |
Step-by-Step Subnet Calculation Example
Analyze the host IP address 192.168.10.77 with CIDR prefix /26:
- Prefix & Subnet Mask: Prefix $p = 26$. The mask contains 26 consecutive ones followed by 6 zeros: $$11111111.11111111.11111111.11000000_2 = \mathbf{255.255.255.192}$$
- Wildcard Mask (Bit Inversion): $$255.255.255.255 - 255.255.255.192 = \mathbf{0.0.0.63}$$
- 4th Octet Boolean AND: $$77_{10} = 01001101_2, \quad 192_{10} = 11000000_2 \implies 01001101_2 \land 11000000_2 = 01000000_2 = 64_{10}$$ $$\mathbf{Network Address} = \mathbf{192.168.10.64}$$
- Broadcast Address Calculation: $$64 + 63 = 127 \implies \mathbf{Broadcast Address} = \mathbf{192.168.10.127}$$
- Usable Host Range: $\mathbf{192.168.10.65}$ through $\mathbf{192.168.10.126}$ ($2^{32-26} - 2 = 64 - 2 = \mathbf{62 \text{ usable hosts}}$).