@BloodrayneZA
Let's look at breaking down a class C subnet using a mask of 255.255.255.192; same process will apply for other masks like 255.255.255.240
For simplicity we'll breakdown the commonly used private class C i.e. 192.168.1.0
Let's start by Representing the subnet mask in binary.
Let's calculate a few values
- To determine the Mask bits; we simply sum up all the 1's i.e. 26
- To determine the number of devices per range;
- we take the total number of bits (4 octets * 4 = 8 * 4 = 32)
- and subtract the Mask bits (32 - 26) = 4 and then use that as an exponent of 2 i.e. 2^4 or 2 * 2 * 2 * 2 = 64
- finally we subtract 2; 1 for the network address and 2 for the broadcast address; leaving us 62 usable devices per subnet.
- To determine the number of subnets; we simply divide the sum of network portion's bits (in this case it's the last octet) i.e. 256 by the #devices per range + 2 i.e. 256 / 64 = 4
Finally we calculate the 4 subnet address ranges
The first range has an index of 0; we calculate as follows:
- Network Address -> index * by 2 ^ # of subnets i.e. 0 * 2 ^ 4 = 0 * 64 = 0 => 192.168.1.0
- Broadcast Address -> Network Address + # Devices / Range + 1 i.e. 192.168.1.0 + 62 + 1 => 192.168.1.63
- Usable Host Range is the addresses in between the Network and Broadcast Address
The only thing that change for the next subnet block is the index; from 0 to 1. We keep computing subnet ranges up to the # Subnets (4) minus 1; because our index starts at zero.
I'd suggest creating this in Excel for a bit of practice; by creating the formulas; you'll become more familiar with the calculations.
As another example; here is the result for a subnet mask of 255.255.255.240
See if that makes sense -- let me know if you need more clarity.
This can be computed manually; it just takes a little more time. Naturally you'd want to use a subnet calculator when dealing with much large networks i.e. when a subnet mask that stretches over to class B or class A masks. That certainly wouldn't be a practical question for any examination.