Project: Build a Subnet Calculator
Stop reaching for an online subnet calculator — build your own. Write a Python tool that, given any CIDR, returns the network, broadcast, host range and usable count. Real code, graded on real output.
The brief
Every engineer subnets. The best ones automate it. Build a subnet calculator in real Python using the ipaddress module — the same logic behind every online tool, now yours.
For the block 192.168.1.0/26, fill in each value. Figure out the right ipaddress calls yourself; the hints point the way.
Subnet Calculator — Python 3
YOUR CODE (edit here, then press Run)
OUTPUT
Take it further
You just rebuilt a tool people pay for. Change the CIDR to /30, /22, or an IPv6 prefix and watch the numbers fall out of the same five lines — that’s the power of modelling the problem instead of memorising tables.