I'm trying to understand the factors that go into the decision-making process of designing the size of a subnet. According to this excellent cheat sheet:
- A /24 subnet mask gives you 65,536 subnets and 254 hosts
- A /18 subnet mask gives you 1,024 subnets and 16,382 hosts
So it apears that the two main factors for deciding subnet mask size (e.g. /24 vs /18) is: how many subnets do you want, and how many hosts do you want available for that subnet?
The latter factor makes sense to me: if I know I'm carving out a subnet for a medium-sized team that might have a half-dozen apps/services, where each one of these might have 3 - 6 nodes per environment, and might have 2 or 3 different environments (Dev, QA, Prod, etc.), then I know that team roughly needs ~90 hosts available in their subnet, so I might be inclined to give them a /25 (126 possible hosts) subnet mask.
However, I'm not understanding the first factor in this equation: the number of subnets each mask gives you. A /18 subnet mask gives you 1,024 subnets, whereas a /24 subnet mask gives you 65,536 subnets.
What does this even mean?! Just going on intuition, it sounds like it's possible for you to recursively carve subnets out of subnets out of subnets, etc. Yes? And if that's true, then maybe when designing a subnet you will sometimes know how many sub-subnets you're going to need your subnet to contain, and that might be an important factor in making your decision? Am I on track here or way off base?
Ultimately I'm just trying to understand the third column in that table ("Number of Subnets") and understand how/why that plays a role in determining the subnet mask/size you choose when creating a subnet.