This question already has an answer here:
Lets say I have to create 256 subnets (it could be any number), how would I find the first and last (network/broadcast addresses) for a randomly chosen subnet? For instance, subnet 139.
I'll give an example. Network IP: 188.8.131.52/8 This IP needs to be subsetted into 300 subnets. Network mask: 255.0.0.0 Network address (first address):184.108.40.206/8 Broadcast address: 220.127.116.11/8 Number of hosts: 2^(32-8) = 16777216 Addresses/subnet: 65536 (16777216/256) Subnet mask: /16
I'm not really concerned about usable addresses, just trying to understand a concept.
The first subnet would be: Network address: 18.104.22.168/16 Broadcast Address: 22.214.171.124
So, is there a formula or method to finding a randomly picked subnet's network/broadcast address?