A non-technical colleague at work asked me questions on subnetting, and why someone may want to optimize/reclaim the subnets assigned to a site where they have more unused IP addresses than needed.
Here’s my reply, which starts with an example:
Every customer network is assigned LAN IPs (subnets). Some sites have more available, unused IPs then they need.
Site A has 40 hosts, and 10.10.10.0/24 is assigned (which is 254 usable IP addresses). That leaves 200 additional IP addresses that are assigned only to Site A, and likely never to be completely used.
A /26 (62 usable) might make better use of the IP space for that site.. and then you have reclaimed additional addresses for use in other sites, etc…
To reduce the size of the subnet, it needs to be readdressed.
For this example we’ve decided to resize Site A from 10.10.10.0/24 which is user assignable IPs 10.10.10.1-10.10.10.254:
to 10.10.10.0/26 which then is user assignable IPs 10.10.10.1-10.10.10.62:
Site A now has 10.10.10.1-10.10.10.62 available for it’s 40 hosts. Assuming site a has 3 IPs used for routers/gateways (10.10.10.1-3) that still leaves 58 IPs for 40 hosts, 10.10.10.4-44 with 18 IPs for growth, etc…
By readdressing Site A, we have reclaimed of Site A’s old /24 subnet (.65- for use elsewhere. If there were other sites of similar size, they could use the additional reclaimed IP space as follows: 10.10.10.64/26 10.10.10.128/26 and 10.10.10.192/26
The free IP space made available by readdressing Site A is not limited to just 3 /26 subnets, it can be any range of allowed subnet combinations that do not overlap, for example the subnet’s free space could be divided up as follows (or in any other valid combination):
10.10.10.0/26 (62 useable IPs 10.10.10.1 – 10.10.10.62) Subnet ID 10.10.10.0, Broadcast Address 10.10.10.63)
10.10.10.64/27 (30 usable IPs 10.10.10.65 – 10.10.10.94) Subnet ID 10.10.10.64, Broadcast Address 10.10.10.95)
10.10.10.96/28 (14 usable IPs 10.10.10.97 – 10.10.10.111)Subnet ID 10.10.10.96, Broadcast Address 10.10.10.111)
10.10.10.112/29 (6 usable IPs, 10.10.10.113 – 10.10.10.118) Subnet ID 10.10.10.112, Broadcast Address 10.10.10.119)
10.10.10.120/30 (2 usable IPs, 10.10.10.121 – 10.10.10.122) Subnet ID 10.10.10.120, Broadcast Address 10.10.10.123)
10.10.10.124/30 (2 usable IPs, 10.10.10.125 – 10.10.10.126) Subnet ID 10.10.10.124, Broadcast Address 10.10.10.127)
10.10.10.128/25 (126 usable IPs, 10.10.10.129 – 10.10.10.254) Subnet ID 10.10.10.128, Broadcast Address 10.10.10.255)
As you consider IP address assignment and the amount of IPs needed, there are additional factors to consider. Routers and network devices like printers need IPs, along with users. You also want to consider potential growth a site may encounter.
For example , if a site has 30 users, you could not assign them a subnet with just 30 usable IPs (/27), as you want to leave some additional space for a default gateway, other network devices, site growth, etc…
Resources:
Here is a good way to type in IPs, CIDRs, subnet masks, and see corresponding subnetting information to help understand subnets in your network: https://www.subnet-calculator.com/
Also, Packetlife.net created an excellent cheat sheet (click image below for the full PDF from Packetlife) Note, usable IPs in a CIDR is n-2 So if you see 64 on the sheet for /26, you subtract 2 and are left with 62 useable IPs.
Packetlife_net_IPv4_Subnetting
.