IPv4 subnetting

During the preparation for the CCNA I had to brush up network subnetting. Finally I found a pretty straightforward way to calculate subnets. Here are some advices.

1. Finding subnet network, broadcast and last host

The simplest thing to do is to work with groups.

Prefix  /+1 /+2 /+3 /+4 /+5 /+6 /+7 +/8
Netmask 128 192 224 240 248 252 254 255
Group   128 64  32  16  8   4   2   1

If I get the IP address I know that the netmask is what means I need to look for groups of 16 according to the table. Now you need to find the closest group to that IP address.

Here are the groups of networks base on the previous group. In this case the is the closest one for the previous IP address.

Starting with up to Just moving on the third octed in groups of 16.

In order to find out the broadcast address and the last host available you just need to add the group number (16), trying to get the next subnet available which in this case would be

Broadcast address = Next Subnet - 1
Last host = Next Subnet - 2

From the previous example:


Last Host:


As you can see this is a very simple way to find out to what subnet an IP address belongs to.

2. Start splitting from higher prefix to lower

First and foremost, you need to know that subnetting is always done from higher to smaller prefix in order to avoid overlapping.

Assuming I want to split the next network in several subnets I should start with the next biggest prefix I can use, /25, then I take this one and I split it in lower subnets.

The problem is when you decide to get first a smaller subnet and later a bigger one. For example, Afterwards you start subnetting on what you think is the next subnet available which according with previous subnet you might think is .

As you already may notice, this is wrong and it would match the range of ip addresses - what actually includes the IP addresses inside

Nowadays I will normally use an IP calculator, however I find this an excellent work out for mental calculations.