3

I was reading How do you calculate the prefix, network, subnet, and host numbers?, and I noticed that he divided the network space into 4 subnetworks of 256 addresses, but he needed only 100 per subnet. If you have for example three contiguous static IP addresses, that means that you cannot separate them into different subnetworks considering also the broadcast and subnetwork IP addressess, right?

128.42.5.4/30
128.42.5.5/30
128.42.5.6/30
Ron Maupin
  • 102,040
  • 26
  • 123
  • 202
sotirios
  • 35
  • 4

2 Answers2

5

That depends. If you are looking for something like loopback addresses, you could have three /32 subnets. With point-to-point links, you could use /31 which is two addresses in the subnet. A /30 subnet also gives you two usable addresses, but you lose the subnet and broadcast from the four addresses.

Each one less in the CIDR notation gives you twice as many addresses in the host portion of the address. Except for /31 and /32, you lose two addresses from the number of addresses.

Edit:

Based on your edit to use /30, all three of the addresses you list, and 128.42.5.7/30, are in the subnet 128.42.5.4/30. The subnet address, 128.42.5.4/30, and the broadcast address, 128.42.5.7/30, are not usable for host addresses.

Ron Maupin
  • 102,040
  • 26
  • 123
  • 202
3

If it's a Private Network, it's better to have proper subnets with network address, Gateway and Broadcast address. Makes the network easier to troubleshoot