This is a three-part guide, with the first part giving you a brief introduction to binary and finishing with some basic easy subnetting. The second guide will introduce you to subnetting. And the third guide will introduce you to more advanced subnetting and VLSM. So take a deep breath and let’s get to it!
People are always advertising fancy tricks, tips, magic, etc. to make subnetting easier. The fact is, subnetting is only as difficult as you make it. The best way to learn subnetting is just to do it! Before long, it will become second nature.
Let’s start with binary. As you know, the entire internet communicates with electrical signals sent through copper, fiber, or even through the air. These signals are nothing more than a series of waves, pulses, or lights (depending on the medium) that indicate either on or off. For instance, if the medium is fiber optics, these are essentially blinking lights. They are blinking MUCH faster than we can perceive, but they are blinking. Each time the light is on, it signifies a 1 and when the light is off, it signifies a 0. Each 1 or 0 is called a bit. These bits stream together to form binary code. Binarystands for 2, which represents the 2 possible digits, 0 and 1. These signals are grouped together in predetermined lengths to indicate when the message stops and starts.
An IP address is 4 Bytes (4B) or 4 blocks of 8 bits (8b). Keep in mind that when abbreviating bits and Bytes, a Capital B signifies Bytes and a lowercase b signifies bits. I will capitalize Bytes throughout this guide to remind you of that fact. As an example, consider the binary representation of the IP address 192.168.0.1:
Each Byte in an IP address is also called an octet. The oct in octet refers to 8. Think octagon, octave, etc.
Still with me? Good! Think of this as a much more advanced Morse Code, where the dots are 0s and the dashes are 1s.
CREATING AN IP ADDRESS OUT OF BITS
Now that you know what bits and Bytes are, let’s discuss how to put them together to get larger numbers out of a series of 0s and 1s. In every Byte, each of the 8 bits represents a placeholder for a power of 2. It starts on the left, in the 8th position, at 2^7 and continues to the right to the last bit which is 2^0. Remember, everything in networking starts with 0. So, the full byte looks like this:
In this table, you can see that each bit represents a power of 2. So the first bit on the left is 7 2s multiplied together: 2*2*2*2*2*2*2 = 128 Or 2^7. Here is an example of all bits being “on” or set to 1 to equal 255:
As you can see, we add all of the values together to form 255. That is the highest number that can be used in an IPv4 address. Here is an example of all bits turned “off” to form 0:
Since every bit is a 0, we don’t add any numbers and just leave it at 0.
A Real IP Address!
Now that we’ve done that, let’s break the IP address 192.168.0.15 into binary!
First, we have the 192. Only the first 2 bits are on, which means we add 2^7(128) and 2^6(64), giving us 192.
168 has a few more bits that are on. For 168, we add 2^7 + 2^5 + 2^3.
Here is our 0, which has all bits set to 0, or off. There is nothing to add here.
And finally, our 15. For 15, we need to add 2^3 + 2^2 + 2^1 + 2^0 like so:
These four bytes of 0s and 1s come together to form the 4 octets that make up our IP address:
Try a few of your own until you get the hang of it! You will definitely want to be able to do this easily for the next section. There are binary calculators available as well as charts, but try your best to do this without referencing these things as it will help you in the long run. the guide.)
It might look difficult at first, but with lots of practice, binary will make perfect sense! Join me in my next guide and we will start subnetting!
(The solutions to the problems are below. Don’t peek!)
IP CONVERSION SOLUTIONS