Accepted formats
10.0.0.1/22— IP & CIDR prefix10.0.0.1 255.255.252.0— IP & netmask10.0.0.1 0.0.3.255— IP & wildcard mask10.0.0.1— bare IP (uses default classful mask)
results
subnet mask reference (ipv4)
CIDR prefix mapped to netmask, wildcard mask and number of usable hosts.
| CIDR | Netmask | Wildcard | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,214 |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,574 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,534 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,094 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,022 |
| /23 | 255.255.254.0 | 0.0.1.255 | 510 |
| /24 | 255.255.255.0 | 0.0.0.255 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 * |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 * |
* /31 is a point-to-point link per RFC 3021 (2 usable). /32 is a single host route.
classful address ranges (legacy)
| Class | Range | Default mask | Use |
|---|---|---|---|
| A | 0.0.0.0 – 127.255.255.255 | /8 (255.0.0.0) | Large networks |
| B | 128.0.0.0 – 191.255.255.255 | /16 (255.255.0.0) | Medium networks |
| C | 192.0.0.0 – 223.255.255.255 | /24 (255.255.255.0) | Small networks |
| D | 224.0.0.0 – 239.255.255.255 | — | Multicast |
| E | 240.0.0.0 – 255.255.255.255 | — | Experimental / reserved |
frequently asked questions
What is a subnet mask?
A subnet mask is a 32-bit number that divides an IPv4 address into a network portion and a host portion. In dotted-decimal form (for example 255.255.255.0) the bits set to 1 mark the network part and the bits set to 0 mark the host part.
What is CIDR notation?
CIDR (Classless Inter-Domain Routing, RFC 4632) writes a subnet as an IP address followed by a slash and the number of consecutive 1-bits in the netmask. For example, 192.168.1.0/24 represents a network of 256 addresses with 254 usable hosts.
What is the difference between a netmask and a wildcard mask?
A netmask marks network bits with 1s and host bits with 0s (for example 255.255.255.0). A wildcard mask is its bitwise inverse (0.0.0.255) and is used by Cisco ACLs to match address ranges.
What are private IP addresses?
RFC 1918 reserves three IPv4 ranges for private internal use that are not routed on the public internet: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.
How many usable hosts are in a /24?
A /24 contains 256 total addresses, but the network address (.0) and the broadcast address (.255) are reserved, leaving 254 usable host addresses.
What is a /31 subnet used for?
RFC 3021 allows /31 prefixes for point-to-point links between two routers. Both addresses are usable, so a /31 provides exactly 2 hosts with no separate network or broadcast address.
What are IP address classes A, B, C, D and E?
Pre-CIDR classful addressing divided IPv4 into ranges by the high-order bits: Class A (0–127, default /8), Class B (128–191, /16), Class C (192–223, /24), Class D (224–239, multicast) and Class E (240–255, experimental). Modern routing is classless, but the labels are still used as a quick reference.
What is the difference between the network and broadcast address?
The network address is the first address in a subnet (host bits all 0) and identifies the subnet itself. The broadcast address is the last address (host bits all 1) and is used to send a packet to every host on the subnet.
standards & references
- RFC 791 — Internet Protocol (IPv4)
- RFC 950 — Internet Standard Subnetting Procedure
- RFC 1918 — Address Allocation for Private Internets
- RFC 3021 — Using 31-Bit Prefixes on Point-to-Point Links
- RFC 3927 — Dynamic Configuration of IPv4 Link-Local Addresses
- RFC 4632 — CIDR: address assignment and aggregation
- RFC 6598 — IANA-Reserved IPv4 Prefix for Shared Address Space (Carrier-Grade NAT)
- RFC 6890 — Special-Purpose IP Address Registries
recommended links
- SystemAdministration — sysadmin tutorials, guides and best practices
- Cloud News — cloud computing and infrastructure news
- Administración de sistemas — tutoriales, guías y buenas prácticas de sysadmin
- Revista Cloud — noticias de cloud computing e infraestructura
about ipcalc
ipcalc takes an IP address and netmask and calculates the resulting broadcast, network, Cisco wildcard mask and host range. By giving a second netmask you can design subnets and supernets. It is also a teaching tool that presents subnetting as easy-to-read binary values.
Enter your netmask in CIDR notation (/25) or dotted decimals (255.255.255.0). Inverse (wildcard) netmasks are recognized. If you omit the netmask, ipcalc uses the default netmask for the class of your network.
IPcalc is a free service hosted by Stackscale private cloud. Make your secure password.