# Subnetting in Decimal (Fast Way)

In the previous lesson I showed you a lot of binary numbers so let’s work some more with decimal numbers. We can do subnetting just by working with decimal numbers.

As you have seen in the binary examples, the rule of “powers of 2” is very useful. By taking an extra bit the decimal value doubles every time:

• For every host bit you borrow the number of subnets you can create doubles.
• Every host bit left doubles the size of the subnet.

Instead of thinking/working in binary, we’ll start thinking in “blocks”.

Take this 192.168.1.0 network with subnet mask 255.255.255.0 as an example:

We know because the subnet mask is 255.255.255.0 we have 8 bits left, and with 8 bits the highest “number” we can create is 256.

128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255.

Don’t forget about the 0! The 0 is being used so the highest value you can create is 256.

Visualize this as a block: We want to subnet our 192.168.1.0 network, so we’ll chop our “block” in two pieces.

When we chop this block in two pieces, this is what we get: So now we created 2 subnets out of our Class C network, the next questions are:

• What are the network addresses?
• What is the subnet mask?
• What are the usable host IP addresses?

We can write down the network addresses, they are both blocks of “128”. We’ll start at 192.168.1.0 and the second subnet will be 192.168.1.128 (.0 – .127 = 128)

• Subnet 1:
• Subnet 2:

The second question is: what are the broadcast addresses? We know that the broadcast address is the last address within a subnet, so we can just write those down:

• Subnet 1:
• Subnet 2:

The third question: what is the subnet mask?To solve this question I’ll teach you a new trick:

256 – “block size” = subnet mask.

So in our example that will be:

256 – 128 = 128.

The subnet mask will be 255.255.255.128

One question left: what are the usable host IP addresses?

• The first usable host IP address comes after the network address.
• Everything in between is a usable host IP address.

Let’s fill this in:

• Subnet 1:
• first host: 192.168.1.1
• last host: 192.168.1.126
• Subnet 2:
• first host: 192.168.1.129
• last host: 192.168.1.254

That was pretty fast right? We just subnetted this class C network, calculated the network address, broadcast address and the usable host IP addresses.

Let’s try one more!

We’ll take the 192.168.1.0 class C network but now we’ll chop it into four pieces so we get 4 “blocks”: We have the same set of questions to answer:

• What are the network addresses?
• What is the subnet mask?
• What are the usable host IP addresses?

Let’s write down the networks, all “blocks” of 64:

• Subnet 1:
• Subnet 2:
• Subnet 3:
• Subnet 4:

Now we know the networks we can write down the broadcast addresses:

• Subnet 1:
• Subnet 2:
• Subnet 3:
• Subnet 4:

256 – “block size” = subnet

In our example: 256 – 64 = 192

The subnet mask will be 255.255.255.192

One more step, we need to fill in the usable host IP addresses:

• Subnet 1:
• first host: 192.168.1.1
• last host: 192.168.1.62
• Subnet 2:
• first host: 192.168.1.65
• last host: 192.168.1.126
• Subnet 3:
• first host: 192.168.1.129
• last host: 192.168.1.190
• Subnet 4:
• first host: 192.168.1.193
• last host: 192.168.1.254

And that’s it. Once you understand the rules, calculating in decimal is a lot faster than doing it in binary.

Can we apply this same method for class B networks? Sure! The only difference with a class C network is we have more space because we are now playing with the third octet.

Let’s take the 172.16.0.0 network and create eight subnets.

We still have the same questions to answer:

• What are the network addresses?
• What is the subnet mask?
• What are the usable host IP addresses?

We start with our block of “256” but now we are playing with the third octet:

Tags:

## Forum Replies

1. talk2seeni says:

Hi Rene,
Very Good article for Beginners.

Thanks,
Srini

2. mulirowanjalageorge says:

Hello Rene, This is great work that you are doing and even if I find it difficult to grasp the concept, I have a feeling that something is happening to my understanding :). Your examples are clear to a point but when I try using my own values, ie other addresses I get lost rather fast :(.

For instance, I have the following address: 120.48.7.104 and 255.255.255.248. I am required to find out 1. Network address. 2.first and last usable addresses and the broadcast address. I figured out that the first address must be the following: 120.48.7.103 and 120.4.7.104 as

... Continue reading in our forum

3. ReneMolenaar says:

Hi George,

Let’s walk through this example together, that might help…

First we need to figure out the network address and to do that, we need to take a close look at the subnet mask:

255.255.255.248

The subnet mask defines how large each subnet is. You can do this in binary but I’ll use decimal since it’s faster. A quick method is to take the number 256 minus the subnet mask. We are looking at the 4th octet so that’s 248:

256 - 248 = 8

We now know that each subnet has 8 addresses. Let’s start counting from 0 to show you how it works:

Subnet #1 120.48.7.0
Subnet

... Continue reading in our forum

4. andrew says:

Ali,
You are correct, and I have corrected the error. Nice catch.

5. ReneMolenaar says:

Thanks for your kind words Umer! I’ll see if I can add some videos for subnetting.

5 more replies! Ask a question or join the discussion by visiting our Community Forum