This flow shows how an IP address and CIDR mask combine to define a network and usable IP range.
Execution Sample
AWS
IP = 192.168.1.0/29# Calculate network and usable IPs
This example calculates the network and usable IP addresses for the CIDR block 192.168.1.0/29.
Process Table
Step
Action
Calculation/Condition
Result
1
Start with IP and CIDR
IP=192.168.1.0, Mask=/29
Given IP block
2
Calculate subnet mask
/29 means 29 bits for network
Subnet mask = 255.255.255.248
3
Calculate number of IPs
2^(32-29) = 8
Total IPs = 8
4
Calculate network address
IP & subnet mask
192.168.1.0
5
Calculate broadcast address
Network + total IPs - 1
192.168.1.7
6
Identify usable IPs
Exclude network and broadcast
192.168.1.1 to 192.168.1.6
7
Assign IPs to devices
Use usable IP range
Devices get IPs 192.168.1.1-192.168.1.6
8
End
All usable IPs assigned
Finished
💡 All usable IPs assigned, network and broadcast reserved
Status Tracker
Variable
Start
After Step 2
After Step 3
After Step 4
After Step 5
After Step 6
Final
IP
192.168.1.0/29
192.168.1.0/29
192.168.1.0/29
192.168.1.0
192.168.1.0
192.168.1.0
192.168.1.0
Subnet Mask
N/A
255.255.255.248
255.255.255.248
255.255.255.248
255.255.255.248
255.255.255.248
255.255.255.248
Total IPs
N/A
N/A
8
8
8
8
8
Network Address
N/A
N/A
N/A
192.168.1.0
192.168.1.0
192.168.1.0
192.168.1.0
Broadcast Address
N/A
N/A
N/A
N/A
192.168.1.7
192.168.1.7
192.168.1.7
Usable IP Range
N/A
N/A
N/A
N/A
N/A
192.168.1.1-192.168.1.6
192.168.1.1-192.168.1.6
Key Moments - 3 Insights
Why do we exclude the first and last IP addresses in the range?
The first IP is the network address and the last is the broadcast address, both reserved and not assignable to devices (see execution_table steps 4 and 5).
How do we calculate the total number of IPs from the CIDR mask?
Subtract the CIDR number from 32, then raise 2 to that power (2^(32 - CIDR)). For /29, 2^(32-29) = 8 (see execution_table step 3).
What does the subnet mask 255.255.255.248 mean in binary?
It means the first 29 bits are network bits (ones), and the last 3 bits are host bits (zeros), defining the size of the subnet (see execution_table step 2).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what is the broadcast address calculated at step 5?
A192.168.1.0
B192.168.1.6
C192.168.1.7
D192.168.1.1
💡 Hint
Check the 'Result' column at step 5 in the execution_table.
At which step do we find the number of total IP addresses in the block?
AStep 3
BStep 2
CStep 4
DStep 6
💡 Hint
Look for the calculation of 2^(32 - CIDR) in the execution_table.
If the CIDR was changed to /30, how would the total IPs change in the execution table?
ATotal IPs would be 8
BTotal IPs would be 4
CTotal IPs would be 16
DTotal IPs would be 2
💡 Hint
Recall the formula 2^(32 - CIDR) and apply it for /30.
Concept Snapshot
CIDR blocks define IP ranges using a mask.
CIDR /n means n bits for network, rest for hosts.
Total IPs = 2^(32 - n).
First IP = network address (not usable).
Last IP = broadcast address (not usable).
Usable IPs lie between these two.
Full Transcript
CIDR blocks combine an IP address with a mask to define a network range. The mask tells how many bits are for the network part. For example, /29 means 29 bits for network and 3 bits for hosts. We calculate total IPs by 2 raised to the power of (32 minus the mask). The first IP is the network address and the last is the broadcast address; both are reserved and cannot be assigned to devices. Usable IPs are those in between. This process helps assign IPs efficiently in cloud networks.