Easy Subnetting - Binary Fundamentals

March 4, 2019

One of the easiest things all networking students find trouble with is subnetting. The topic frustrates many until they have a system to understand and work through subnetworking problems.

A key to understanding subnetting is a strong base in the fundamentals of IPv4 addressing and computer logic. That's why today we're going to start off this exploration of subnetting with a look at binary numbers. As I'm sure you're aware, a typical IPv4 network addres looks like this:

192.168.10.0

To a human, this is perfectly understandable and relatively easy to remember. However, inside of a computer everything (yes, everything!) is represented by sequences of 1s and 0s.

There are four parts to every IPv4 address, known as octets. It is an octet because each is comprised of 8 binary digits, or 8 bits. (as an aside, sequences of 8 bits are known as bytes. So we can say that each IPv4 address is made up of 32 bits or 4 bytes.)

Our first octet of 192 rendered in binary would look like this:

11000000

When we inspect a binary number take note that binary is a base 2 counting system. This means that each place value from right to left is double its preceding neighbour. So, our binary digit starts at 1 on the far right and ends at 128 on the far left. To arrive at 192 we look at each 1 or "on bit" in the figure and ignore each 0 or "off bit". The value of each of our on bits from left to right is 128 and 64. If we add this together we get 192.

This limit of 8 bits means the maximum value per octet is 255 if all bits were switched on and our minimum value would be 0 if all were switched off.

Let's look at the rest of our address. Make sure you try this on your own for practice. Being able to go between decimal and binary is a useful skill to have. So, next we have 168. Our binary number would be:

10101000

With our 128, 32, and 8 bits turned on. Added together these values equal 168.

Our next value of 10 would be:

00001010

The 8 and 2 values switched on.

Finally, our octet of 0 would be:

00000000

An understanding of binary underpins an understanding of subnetting and leads to the ability subnet quickly and efficiently. Next time we'll discuss the fundamentals of IPv4 to see the role which subnetting plays in an efficient IPv4 network.