Enter an IP address with CIDR prefix (e.g. 192.168.1.0/24) to get full subnet details.
| CIDR | Subnet Mask | Hosts | Common Use |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 | Class A |
| /16 | 255.255.0.0 | 65,534 | Class B |
| /24 | 255.255.255.0 | 254 | Home/Office LAN |
| /25 | 255.255.255.128 | 126 | Small subnet |
| /28 | 255.255.255.240 | 14 | VLAN segment |
| /30 | 255.255.255.252 | 2 | Point-to-point link |
Subnet basics: The prefix length (/24) indicates how many bits are used for the network. The remaining bits are for hosts. A /24 has 2^8 = 256 addresses, with 254 usable (excluding network and broadcast). Smaller prefix = larger network.
Subnetting divides a large IP network into smaller, more manageable subnetworks. It improves security (by isolating network segments), reduces broadcast traffic, and allows efficient use of IP address space. Every subnet is defined by an IP address and a subnet mask (or CIDR prefix notation like /24).
CIDR (Classless Inter-Domain Routing) notation expresses a subnet as an IP address followed by a slash and the number of network bits. Common subnets:
RFC 1918 defines three private IP ranges used for internal networks (not routable on the public internet): 10.0.0.0/8 (10.x.x.x), 172.16.0.0/12 (172.16–31.x.x), and 192.168.0.0/16 (192.168.x.x). Home routers typically use 192.168.0.x or 192.168.1.x. NAT (Network Address Translation) allows multiple devices on a private network to share one public IP address.
An IPv4 address is a 32-bit number typically written in dotted-decimal notation (e.g., 192.168.1.100). Each of the four octets represents 8 bits, ranging from 0 to 255. A subnet mask divides the IP address into two parts: the network portion (shared by all devices on the same network) and the host portion (unique to each device). The subnet mask 255.255.255.0 in binary is 11111111.11111111.11111111.00000000 — 24 network bits and 8 host bits, written in CIDR notation as /24. A /24 network contains 2⁸ = 256 addresses, but only 254 are usable — the first address is the network address and the last is the broadcast address, both reserved.
CIDR notation makes subnetting more readable than spelling out the full subnet mask. Common subnets: /30 (255.255.255.252): 4 addresses, 2 usable — point-to-point links between routers. /29 (255.255.255.248): 8 addresses, 6 usable — small server clusters. /28 (255.255.255.240): 16 addresses, 14 usable — small office floors. /24 (255.255.255.0): 256 addresses, 254 usable — standard home or small office network. /22 (255.255.252.0): 1,024 addresses, 1,022 usable — medium enterprise floor. /16 (255.255.0.0): 65,536 addresses — large enterprise or data center. Private address ranges (RFC 1918): 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 — these are routed only within private networks and never appear on the public internet.
Subnetting divides a larger network into smaller segments for security, performance, and management. In VLSM (Variable Length Subnet Masking), different subnets within the same organization get different sizes based on need — a floor with 200 users gets a /24 while a point-to-point WAN link gets a /30, conserving address space. The subnetting process: determine the number of hosts needed per subnet → choose the smallest subnet that fits (round up to next power of 2) → calculate the subnet mask → determine the network, first usable, last usable, and broadcast addresses for each subnet. For exam and practical purposes, memorize the magic number rule: 256 − subnet mask octet = block size. For 255.255.255.224 (/27): 256 − 224 = 32, so subnets increment by 32: .0, .32, .64, .96, etc., each with 30 usable hosts.