Cisco, Computers

IP Space and IPv4 Subnetting

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 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 which is user assignable IPs

to which then is user assignable IPs

Site A now has available for it’s 40 hosts.  Assuming site a has 3 IPs used for routers/gateways ( that still leaves 58 IPs for 40 hosts, 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: and

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):                     (62 useable IPs – Subnet ID, Broadcast Address                   (30 usable IPs – Subnet ID, Broadcast Address                   (14 usable IPs – ID, Broadcast Address                (6 usable IPs, – Subnet ID, Broadcast Address                (2 usable IPs, – Subnet ID, Broadcast Address                (2 usable IPs, – Subnet ID, Broadcast Address                (126 usable IPs, – Subnet ID, Broadcast Address

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…



Here is a good way to type in IPs, CIDRs, subnet masks, and see corresponding subnetting information to help understand subnets in your network:


Also, 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.