CIDR IPv4 Subnet Calculator
Rapidly calculate network boundaries, usable IP ranges, wildcard masks, and split networks into smaller VLSM subnets.
Network Address Parameters
| CIDR Notation | 192.168.1.0/24 |
| Netmask | 255.255.255.0 |
| Wildcard Mask | 0.0.0.255 |
| Network Address | 192.168.1.0 |
| Broadcast Address | 192.168.1.255 |
| Usable Host Range | 192.168.1.1 - 192.168.1.254 |
| Total Usable Hosts | 254 |
| IP Scope & Class | Class C • Private (RFC 1918) |
Binary Representation & Subnet Division
Next Subnet Divisions:
| Subnet CIDR | Usable Range | Broadcast | Hosts |
|---|
🌐 Master IPv4 Subnetting, CIDR Architecture & VLSM Engineering Guide
IPv4 subnetting is the foundational discipline of computer networking. It enables network engineers, cloud architects (AWS VPC, Azure VNet, GCP VPC), and sysadmins to partition large network address blocks into smaller, isolated, and routable segments to optimize routing tables, reduce broadcast storm domains, and enforce zero-trust security perimeters.
1. Complete IPv4 CIDR Prefix & Subnet Cheat Sheet (/8 to /32)
Use this engineering reference table to rapidly determine prefix lengths, subnet masks, total address capacity, and usable host interface ranges:
| CIDR Prefix | Subnet Mask | Total Addresses | Usable Host IPs | Wildcard Mask | Common Network Scope |
|---|---|---|---|---|---|
/32 |
255.255.255.255 |
1 | 1 | 0.0.0.0 |
Single host route, loopback interface, static firewall rule |
/31 |
255.255.255.254 |
2 | 2 (RFC 3021) | 0.0.0.1 |
Point-to-point router backbone link (no broadcast) |
/30 |
255.255.255.252 |
4 | 2 | 0.0.0.3 |
Legacy point-to-point links, WAN uplinks |
/29 |
255.255.255.248 |
8 | 6 | 0.0.0.7 |
Small DMZ, multi-homed ISP public IP block (/29) |
/28 |
255.255.255.240 |
16 | 14 | 0.0.0.15 |
Database cluster subnet, isolated Kubernetes node pool |
/27 |
255.255.255.224 |
32 | 30 | 0.0.0.31 |
Departmental VLAN, small office network segment |
/26 |
255.255.255.192 |
64 | 62 | 0.0.0.63 |
Mid-sized infrastructure tier, load-balanced web pool |
/25 |
255.255.255.128 |
128 | 126 | 0.0.0.127 |
Half-class C network, corporate branch office segment |
/24 |
255.255.255.0 |
256 | 254 | 0.0.0.255 |
Standard Class C LAN, default office subnet, WiFi guest network |
/23 |
255.255.254.0 |
512 | 510 | 0.0.1.255 |
High-density campus wireless network, VoIP telephony segment |
/22 |
255.255.252.0 |
1,024 | 1,022 | 0.0.3.255 |
Datacenter compute cluster, large container overlay network |
/20 |
255.255.240.0 |
4,096 | 4,094 | 0.0.15.255 |
Standard AWS VPC subnet, cloud infrastructure availability zone |
/16 |
255.255.0.0 |
65,536 | 65,534 | 0.0.255.255 |
Standard Class B private network (e.g. 172.16.0.0/16 or 10.100.0.0/16) |
/8 |
255.0.0.0 |
16,777,216 | 16,777,214 | 0.255.255.255 |
Entire Class A private block (10.0.0.0/8), national ISP backbone |
2. Variable Length Subnet Masking (VLSM) Best Practices
When designing multi-VLAN enterprise architecture, always follow hierarchical VLSM principles:
- Allocate Largest Subnets First: Begin subnetting from your largest host requirement (e.g., allocating a
/23for 400 user workstations) before carving out smaller utility blocks. This prevents address fragmentation. - Reserve Room for 50% Growth: Never size a production subnet to its exact current capacity. Dynamic DHCP leases and ephemeral containers will exhaust small subnets rapidly.
- Separate Out-of-Band (OOB) Management: Dedicated IPMI, iLO, and network switch management interfaces should always live in a dedicated, non-routable
/24or/26with strict firewall ACL ingress rules.
❓ IPv4 Subnetting & CIDR FAQ
Frequently asked questions about subnet calculation, CIDR notations, and IP allocation.
What is CIDR notation and how does prefix length define subnet masks?
Classless Inter-Domain Routing (CIDR) notation expresses an IP address and its associated routing prefix using a slash followed by a number (e.g., 192.168.1.0/24). The number represents the count of leading continuous '1' bits in the 32-bit subnet mask. A /24 prefix indicates that the first 24 bits belong to the network identifier (11111111.11111111.11111111.00000000 = 255.255.255.0), leaving the remaining 8 bits to address host interfaces.
Why do we subtract 2 from total IP addresses to determine usable hosts?
In standard IPv4 subnets, two addresses within every subnet boundary are permanently reserved by Internet Protocol standards (RFC 791). The first address (all host bits set to 0) represents the Network ID used by routing tables. The last address (all host bits set to 1) is the Broadcast Address used to transmit packets simultaneously to every device in that subnet. Therefore, the formula for usable hosts is 2^(32 - prefix) - 2. The only exceptions are point-to-point links (/31 per RFC 3021) and single-host loopbacks (/32).
What are the official RFC 1918 Private IP Address Spaces?
RFC 1918 defines three non-routable IP ranges reserved exclusively for private internal local area networks: Class A: 10.0.0.0/8 (10.0.0.0 to 10.255.255.255, offering 16,777,214 hosts for enterprise datacenters), Class B: 172.16.0.0/12 (172.16.0.0 to 172.31.255.255, offering 1,048,574 hosts), and Class C: 192.168.0.0/16 (192.168.0.0 to 192.168.255.255, providing 65,534 hosts commonly divided into /24 home/office subnets).
What is the difference between a /30 subnet and a /31 subnet in router links?
Traditionally, point-to-point links between two core routers used a /30 subnet (4 total IPs: 1 network, 1 broadcast, and 2 usable hosts), wasting 50% of the allocated address space. RFC 3021 introduced /31 subnets (2 total IPs), which eliminates both the network and broadcast addresses specifically for point-to-point interfaces, saving precious IPv4 address blocks in modern ISP and cloud provider backbones.
How is a wildcard mask calculated from a subnet mask?
A wildcard mask is the bitwise inverse of a subnet mask, primarily used in Cisco Access Control Lists (ACLs) and Open Shortest Path First (OSPF) routing configurations. To calculate it, subtract each octet of the subnet mask from 255. For a standard /24 subnet mask of 255.255.255.0, the wildcard mask is (255-255).(255-255).(255-255).(255-0) = 0.0.0.255.