I had a question on the test yesterday that I am going to try and remember, but may screw it up. Maybe some others can remember a similar question and get it correct for me.
It have you an address and asked you that you needed to have 80 subnets with 4 usuable host addresses in each subnet with minimal amount of wasted addresses. Then if gave you some multiple choice options and it looked like, if I can remember the options resembled stuff like this:
Like I said, I am guessing at what the answers are, but I am looking for the theory on how to get this. Is it just straight up supernetting?
So would it just be like 192.168.2.0/23 or something like that.
This is straight subnetting. In fact, this subnetting assignment can be be approached from two perspectives.
Assume that the original network is 10.0.64.0/20. Now, if you are asked to create 80 subnets then - because you can't create exactly 80 subnets but only a power of two - what you really want to do is to create 128 subnets. To have 128 subnets, you need to borrow another 7 bits from the current host part which will carry the subnet ID (2^7=128). This will cause the mask to move from /20 to /27, creating the following subnets:
Each of these subnets has a mask of /27 meaning that it holds 32 addresses in total, 30 usable addresses. This approach allowed you to adapt to the required number of subnets but the size of the individual network simply resulted from the changed netmask.
Another approach is to focus not on the number of requested subnets but rather on their size. If a size of 4 usable addresses is required then the real network must have a size of 8 addresses in total (4 usable, 2 for network/bcast, totalling 6 addresses - and again, a size of a network is only a power of two, hence the increase to 8 addresses). A network that requires 8 addresses in total has a distinct netmask of /29. In other words, all subnets would be of the form
Now, because you have selected the mask of /29, you have borrowed additional 9 bits from the former host part of the address (recall that the original netmask was /20). Beause of this, you have created 2^9=512 subnets. So by this approach, you have focused on the requested size of a single network, and hence the number of created subnetwors simply resulted.
In certification exams, the requested size and the number of subnetworks are usually carefully chosen so that using either approach will yield identical results. In this example, requesting 8 subnets for 512 addresses in total would always lead to the selection of the netmask of /23 using either approach (8 subnets requires borrowing three bits, i.e. /20 -> /23; a network of the size of 512 addresses requires 9 bits in the host part, hence the /23 netmask).
I am not sure if this helped so please feel welcome to ask further!