In “Part 2”, we solved a subnet masking problem using binary. This time, we’ll look at some helpful shortcuts that can make solving such problems faster and easier for most people (and less error-prone, as well).

First, let’s summarize our findings from before. To subnet the 192.168.1.0/24 network into four subnets, each allowing at least fifty hosts, we determined that we need a mask of “/26”, or “255.255.255.192”. From this, we obtained the following subnets, ranges and broadcast addresses (these are the values in the last octet):

- Subnet: 0, Range: 1 – 62, Broadcast: 63
- Subnet: 64, Range: 65 – 126, Broadcast: 127
- Subnet: 128, Range: 129 – 190, Broadcast: 191
- Subnet: 192, Range: 193 – 254, Broadcast: 255

The first thing to notice is the correlation between the subnet mask and the increment. In this example, the octet of interest is the fourth, and the value of the mask in that octet is “192”. If you take the value of the mask (192) and subtract it from 256 (a magic number!), you get 64, the amount by which the subnets increment (0, 64, 128, 192).

Recall that the 1’s in a subnet mask indicate network-type info, and the 0’s indicate host info. Thus, with a subnet mask of 192 (in the fourth octet), which is “1100000” in binary, there are two subnet bits, and six host bits. Here’s the powers of two chart:

n = | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 |

2^{n} = |
256 | 128 | 64 | 32 | 16 | 8 | 4 | 2 |

Referring to the chart, we see that the value of the least-significant subnet bit is 64 (2^{6} = 64), so the subnets increment by 64. Also, since the mask is a “/26”, there are six host bits, and, as we know, 2^{6} = 64. The bottom line is that whether you look at the mask in decimal, binary or “slash” (bit-count or CIDR) notation, the subnets increment by 64.

In summary the subnet increment can be obtained three ways:

- From 256 minus the mask value (256 – 192 = 64)
- From the value of the least-significant subnet bit (2
^{6}= 64) - From the number of host bits (there are six host bits, and 2
^{6}= 64)

Also note that the last subnet is equal to the value of the mask (in this case, 192). What this means is that once you have the mask, you can calculate the subnets in decimal, without using binary. Just start with the network (192.168.1.0), and increment the last octet (you could also start with the last subnet and work your way down, but most people find it easier to work their way up). Either way, using a mask of “/26”, the subnets are:

- 192.168.1.0/26
- 192.168.1.64/26
- 192.168.1.128/26
- 192.168.1.192/26.

Next, let’s examine the broadcast addresses (in a “real-world” design problem, the broadcast addresses are generally not required, but CCNA exams may inquire about them). Note that in each case, the subnet’s broadcast address is equal to the value of the next subnet minus one. For example, on the 192.168.1.0 subnet, the broadcast address is 192.168.1.63, which is one less than the value of the next subnet (192.168.1.64). The exception is the last subnet, for which the broadcast address is always “255” (which is 256 minus 1). Thus, subnets and their broadcast addresses are:

- 192.168.1.0, Broadcast 192.168.1.63 (one less than next subnet)
- 192.168.1.64, Broadcast 192.168.1.127 (one less than next subnet)
- 192.168.1.128, Broadcast 192.168.1.191 (one less than next subnet)
- 192.168.1.192, Broadcast 192.168.1.255 (the last one is always 255)

Finally, let’s look at the ranges of legal host addresses. In each case, the range begins with one more than that of the subnet itself, and ends with two less than the next subnet (which is one less than the subnet’s broadcast address). The exception is the last subnet, for which the last address is always “254” (256 minus 2). Therefore, the subnets and their ranges are:

- 192.168.1.0, Range 1 – 62 (one more to two less)
- 192.168.1.64, Range 65 – 126 (one more to two less)
- 192.168.1.128, Range 129 – 190 (one more to two less)
- 192.168.1.192, Range 193 – 254 (last subnet, one more to 254)

Putting it all together, then, the algorithm is:

- Using the powers of two chart, determine the required subnet mask
- Using the mask, determine the increment
- Using the increment, determine the subnets
- Using the subnets, determine the broadcast addresses (if needed)
- Using the subnets, determine the ranges

Five easy steps … and no binary required! Next time, we’ll use this method to solve several problems.

Author: Al Friebe

Khalil Senghori

Above in the text that starts out with,”

First, let’s summarize our findings from before. To subnet the 192.168.1.0/24 network into four subnets, each allowing at least fifty hosts, we determined that we need a mask of “/26”, or “255.255.255.192”. From this, we obtained the following subnets, ranges and broadcast addresses (these are the values in the last octet):

· Subnet: 0, Range: 1 – 62, Broadcast: 63

· Subnet: 64, Range: 65 – 126, Broadcast: 127

· Subnet: 128, Range: 129 – 190, Broadcast: 191

· Subnet: 192, Range: 193 – 254, Broadcast: 254 ”

the very last example statement should have broadcast IP of 255 not 254.

Al Friebe

Khalil –

You’re absolutely right. The editor and I will get this fixed ASAP. Thanks for pointing it out.

– Al