Reading throught web, I often find recommendations that a subnet should not have many hosts, usually recommended number is 254, but without any explanation why.
I wanted to have multiple networks in class A address range (10.*.*.*
), one for example would be video network 10.10.0.0
with subnet 255.255.0.0
where i could do like that:
10.10.0.*
- some IP videocameras location X10.10.1.*
- some IP videocameras location Y10.10.2.*
- some IP videocameras location Z
Could anyone please explain me if having few hosts in a big network is likely to be a problem or not? If no then why those recommendations about 254 host subnets? Mabybe those are just old recommendations.
It isn't a bad decision, if you know why you did it, and understand what you have done.
Just by changing the third octet does not mean that each IP address is in a different subnet - the subnet for each individual host matters! So if each of your IP videocameras had subnets of 255.255.255.0, they would all be on different subnets, and require routing (not necesarily separate routers) to talk to other subnets, including the "parent" one. However, you could create a route to all of them using the 10.10.0.0/255.255.0.0 subnet, if that was appropriate.
Doing things in that way can be beneficial as it means the routing tables are smaller, using less memory on your routers.
However, it can also be confusing to inexperienced network admins - there seem to be plenty around that don't really understand subnets.
It might be wiser to create smaller subnets, as I doubt you'll ever actually be deploying the 65,534 possible hosts you could have on the 10.10.0.0/255.255.0.0 subnet. Getting subnet design right before you start deploying anything is a good idea - once things are out there in large numbers it is a bigger task to fix mistakes!
Measure many times, cut once! Read up on subnet design.
Using a subnet of 255.255.0.0 will mean that all of the IPs listed in your example will be on the same network. This is perfectly valid if you don't want to seperate the devices on the network, and is good to help you group addresses and identify devices.Nothing will be affected by that, unless you plan on using that network (10.10.x.x) for anything else later on. You can be as wasteful as you want with private networks, it's when you buy public IP addresses that you have to get really conservative and smart with your addressing.
Generally subnets are created for the following reasons(singularly or combination):
Performance
Geography
Security
Ownership
A good rule of thumb (as long as it is not in violation of the above) that I use is:
Take the largest number of hosts I think the network will ever have and multiply it by 4. Pick the /CIDR based on that number. So if I had a network that was 15, I would use 60 as the number of hosts. I would use a /26 for the network.
I do not do this for obvious cases, such as point-to-point links, where each of the two interfaces require an IP address.
As the other commenters already said, only a few hosts in a big subnet pose no problem at all. But in order to avoid confusion, I would never use those 10.0.0.0 adresses with a /16 subnet, only with a /8. This is simply because the RFCs always state 10.0.0.0 as a private Class A (aka /8) subnet.
If you want to use a Class B (aka /16) subnet, then you should use a net from the designated private Class B space (i. e. 172.16.0.0/12).
Again, from a technical perspective you do not need to do that, I would just see that as more compliant with best practices.