How to interpret Subnet Masks in Network Environments
How to interpret Subnet Masks in Network Environments
This content is from our CompTIA Network + Video Certification Training Course. Start training today!
We’re going to be talking about subnet masks.
A subnet mask goes hand in hand with an IP address. I often correlate it to this concept that in real life, human beings have been known to wear masks. You may imagine yourself as a kid on Halloween having a mask on, or if you go to a masquerade party, something like that. You’re wearing a mask. Or perhaps an unauthorized withdrawal from a lending institution, you might have a mask on.
In all those instances, the purpose of the mask was to conceal your identity. We get used to that. That’s our mindset when we think of masks. In this usage, we want to take that and actually flip it around.
In fact, I remember there was a super‑secret spy decoder kit toy that they had when I was a kid. It was really a piece of red paper with black writing on it, and then you had red plastic.
The instructions said take the mask ‑‑ which was the red plastic ‑‑ and lay it on top of the red paper. When you did that, it made it very obvious what the black writing was. It tended to cancel out the red paper.
That’s the mindset we want to have when we think about a subnet mask. Its purpose is not to hide anything. Its purpose is actually to reveal something, some piece of information.
Much like an IPv4 address, under the hood an IPv4 address is actually in binary. It’s 0s and 1s.
The dotted decimal notation, writing it in decimal format, that’s all for us human beings. Machines don’t care.
Take that and apply it to a subnet mask. A subnet mask is also under the hood, 0s and 1s. It can be either a 0 or a 1. Those are the only options. All I got to tell you to be able to decipher a subnet mask is what the zeros and the ones mean.
You have a subnet mask. If it has a 1 in it, that 1 indicates that that’s a network position or a network bit. If it has a 0 in it, that’s a host. You got network ID and you got a host.
Very much like the example earlier of a street, some name of a street, Elm. Then there’s a house on the street, 329 Elm. The 329 will be like the host, and then the Elm will be like the network ID.
You now have everything you need to be able to decipher or decode subnet mask.
Let’s take a look. We had a lesson previously where we talked about binary to decimal, decimal to binary. That helps us now because you realize 255, and we see that a lot. If you look at your PC at your home, you probably see 255, 255, 255, 0 in a subnet mask.
If you take that 255 and look at it in binary ‑‑ check it out ‑‑ all 1s.
I recommend always having this at the ready. These numbers down below are indicators of the values of those positions.
If I were to take those 1s and place them in the octet that we have here, notice that I have 8 1s, and I’m placing them here.
255, decimal is 8 1s. If we think about this, this is that red piece of paper. I’m going to lay that down on top of the IP address, and I’m seeing these are network bits. That’s the point we made earlier.
128 only has one 1, the rest are 0. The next one, 192, notice 2 1s. Then 224, 3 1s. and finally 240 has 4 1s.
The whole reason I did this all on one slide is so that it becomes very easy to see the progression. These values that I’m putting up, I didn’t just pick them out of a hat, those are subnet mask values.
Here’s a take‑away rule. Any subnet mask if you write it in binary, it’s an unbroken string of 1s until the string of 1s ends. There’s no holes in the middle where you’re going to find a 0.
Continuing on, we’re only halfway there. Look at my strings of 1s again. For the next one down, I have 5 1s. Then I have 6 1s. Again, the values on the side here, I got 248, 252. Those numbers are the only values that are valid as a subnet mask.
Almost there. Seven 1s, and then all the way across to 255.
It helps if I see them all together. OK, it’s just a string of 1s. It’s a subnet mask. That’s true, and they’re all that way.
You want to apply a mask to an address. It’s like laying that red plastic down on the red piece of paper.
What does it tell you when you do that? The secret message. It tells you is how much of the address you’re looking at belongs to the network. Back to our street example, it’s how much of this is Elm, and how much of this is 329? That’s the mindset.
We talk about routing and routing protocols. Routers need to know, Do I know how to get to this destination network? If I have an IP address and a mask, I immediately just by laying the mask on top, have just figured it out what’s the destination network.
Let’s see an example of this. We’ll see it in binary because 255s and 0s are easy. If I have 255 here, remember it’s 8 1s. If it’s a 1, it’s a network bit.
This whole octet is a network bit. Here it is again, 255. This whole octet is a network bit. Another 255.
Remember, there’s a 1 there, but in reality would like to look like this ‑‑ one, two, three, four, five, six, seven, and a 1.
That’s what this would be. Let me continue my arrow. That’s what the 1 would be. This whole thing is a network bit.
255, 255, 255 means the first three octets in their entirety represent the network portion of this address. Then I have 0s here. That’s a host. That’s like the 329. There could be other addresses on this network ID.
That’s a brief introduction, but a good way to look at subnet masks. Remember, they’re not designed to hide information. They’re designed to reveal information.
Until next time….
Video Certification Training: CompTIA Network +
You May Also Like
In this video, you will gain an understanding of Agile and Scrum Master Certification terminologies and concepts to help you make better decisions in your Project Management capabilities. Whether you’re a developer looking to obtain an Agile or Scrum Master Certification, or you’re a Project Manager/Product Owner who is attempting to get your product or … Continue reading Agile Methodology in Project Management
This is part 1 of our 5-part Office 365 free training course. In this Office 365 training video, instructor Spike Xavier introduces some of the most popular services found in Microsoft Office 365 including the Admin Portal and Admin Center. For instructor-led Office 365 training classes, see our course schedule: Spike Xavier SharePoint Instructor – … Continue reading An Overview of Office 365 – Administration Portal and Admin Center
In this Office 365 training video, instructor Spike Xavier demonstrates how to create users and manage passwords in Office 365. For instructor-led Office 365 training classes, see our course schedulle: Spike Xavier SharePoint Instructor – Interface Technical Training Phoenix, AZ 20347: Enabling and Managing Office 365