A Subnet IP Range Calculator helps determine the range of IP addresses in a subnet based on the given network address and subnet mask. Below is a breakdown of how it works:
How to Calculate Subnet IP Range
- Identify Network Address: This is the starting IP address of the subnet.
- Determine the Subnet Mask: This defines how many IPs are in the subnet.
- Calculate the Total Hosts: Total IPs=2^(32−subnet mask bits)
- Find the First and Last Usable IPs:
- The first usable IP is network address + 1.
- The last usable IP is broadcast address – 1.
- Find the Broadcast Address: The highest IP in the subnet.
Example Calculation
Given:
- IP:
192.168.1.0
- Subnet Mask:
/24
(255.255.255.0)
Step-by-Step Calculation:
- Total Hosts: 2^(32−24)=2^(8)=256 (includes network and broadcast IPs)
- Subnet Range:
- Network Address:
192.168.1.0
- First Usable IP:
192.168.1.1
- Last Usable IP:
192.168.1.254
- Broadcast Address:
192.168.1.255
- Network Address:
What does 32 mean after an IP address?
Generally speaking, /32 means that the network has only a single IPv4 address and all traffic will go directly between the device with that IPv4 address and the default gateway. The device would not be able to communicate with other devices on the local subnet.
- A
/24
IPv4 network has a subnet mask of1111.1111.1111.0000
, meaning the first 3 octets are the network ID and the last octet is used for assigning host IDs (256 available IDs, though usually some are reserved).
Quick Subnet Reference Table
Subnet Mask | CIDR | Total IPs | Usable IPs | Subnet Range Example |
---|---|---|---|---|
/32 | 1 | 0 | ||
255.255.255.252 | /30 | 4 | 2 | 192.168.1.0 – 192.168.1.3 |
255.255.255.248 | /29 | 8 | 6 | 192.168.1.0 – 192.168.1.7 |
255.255.255.240 | /28 | 16 | 14 | 192.168.1.0 – 192.168.1.15 |
255.255.255.224 | /27 | 32 | 30 | 192.168.1.0 – 192.168.1.31 |
255.255.255.192 | /26 | 64 | 62 | 192.168.1.0 – 192.168.1.63 |
255.255.255.128 | /25 | 128 | 126 | 192.168.1.0 – 192.168.1.127 |
255.255.255.0 | /24 | 256 | 254 | 192.168.1.0 – 192.168.1.255 |
Below is a table providing typical subnets for IPv4 before CIDR.
Prefix size | Network mask | Usable hosts per subnet |
/1 | 128.0.0.0 | 2,147,483,646 |
/2 | 192.0.0.0 | 1,073,741,822 |
/3 | 224.0.0.0 | 536,870,910 |
/4 | 240.0.0.0 | 268,435,454 |
/5 | 248.0.0.0 | 134,217,726 |
/6 | 252.0.0.0 | 67,108,862 |
/7 | 254.0.0.0 | 33,554,430 |
Class A | ||
/8 | 255.0.0.0 | 16,777,214 |
/9 | 255.128.0.0 | 8,388,606 |
/10 | 255.192.0.0 | 4,194,302 |
/11 | 255.224.0.0 | 2,097,150 |
/12 | 255.240.0.0 | 1,048,574 |
/13 | 255.248.0.0 | 524,286 |
/14 | 255.252.0.0 | 262,142 |
/15 | 255.254.0.0 | 131,070 |
Class B | ||
/16 | 255.255.0.0 | 65,534 |
/17 | 255.255.128.0 | 32,766 |
/18 | 255.255.192.0 | 16,382 |
/19 | 255.255.224.0 | 8,190 |
/20 | 255.255.240.0 | 4,094 |
/21 | 255.255.248.0 | 2,046 |
/22 | 255.255.252.0 | 1,022 |
/23 | 255.255.254.0 | 510 |
Class C | ||
/24 | 255.255.255.0 | 254 |
/25 | 255.255.255.128 | 126 |
/26 | 255.255.255.192 | 62 |
/27 | 255.255.255.224 | 30 |
/28 | 255.255.255.240 | 14 |
/29 | 255.255.255.248 | 6 |
/30 | 255.255.255.252 | 2 |
/31 | 255.255.255.254 | 0 |
/32 | 255.255.255.255 | 0 |
Ask a Question: