Networking – Network addressing without wasting IP addresses

ipip addressnetworkingsubnet

I know how to do the classic "network addressing" when I am allowed to waste IP addresses. For example, if I need to hook up 9 computers, I could use a /28 subnet, which allows 16 hosts to be mapped within it see the Wikipedia article on CIDR for details.

But what if I am asked to minimize the number of wasted IP addresses?

For example in this case:

enter image description here

Imagine, there is a network 6 which has 8 computers.
We see that if the IP address wasting was not allowed, then the network 6 would use the unused range: 12.0.2.128 – 12.0.2.255

So, the network 6 would look like this:

  1. network address: 12.0.2.128
  2. subnet mask: 28
  3. 1st address of network: 12.0.2.129
  4. last address of network: 12.0.2.142
  5. broadcast: 12.0.2.143

What if there is additional network 7 with only 10 computers?

Am I limited to only one CIDR subnet / network for each free unused range, or am I allowed to "put" as many different subnets as can possibly fit within the free unused address range?

Best Answer

when I am allowed to waste IP address ranges

I'm taking this to mean you are required to pick the smallest subnet that will accomodate the number of nodes you want to put in it

we see that if the IP address wasting was not allowed, then the network number 5 would be different. It would use the unused range: 12.0.2.127 - 12.0.3.0

Network 5, if you really need to conserve addresses in this fashion - that'd be 12.0.2.129 - 12.0.2.254. with 12.0.2.255/25 being the broadcast address.

A network 6 with 10 computers require the "nearest greatest power of 2" bits for each to have an address, which is 16 (0-15). 0-15 wants 4 bits.

12.0.4.128/25 is the next available, so you could do 12.0.4.128/28. 12.0.4.129 is the first available address, and 12.0.4.143/28 is the broadcast address.

Related Question