# Classful Subnet Masks and Binary Addressing

Video Activity

Join over 3 million cybersecurity professionals advancing their career

Sign up with

Required fields are marked with an *

or

Already have an account? Sign In »

Video Transcription

00:05

So in our previous section, we talked about the fact that there has to be a means of separating out the network ID from the host ID.

00:12

Remember, the network idea is going to be what narrows us down from anywhere in the world.

00:17

Basically, what's that going to do is allow traffic to get to your local router.

00:22

Once traffic find your local router,

00:24

then traffic has to find you specifically.

00:27

That's what the host portion of the address is.

00:30

So the network portion gets traffic near you. The host portion gets traffic to you.

00:36

You can't say that one is more important than the other. We need both of them.

00:40

The way that we determine what the network portion is from the host portion is we use something referred to as a sub net mask.

00:47

The only purpose of a sub net mask is to tell you what network portion is and tell you what host portion is.

00:54

A sub net mask is worthless without an I p. An I P address is worthless without a sub net mask. The two of them work together,

01:03

so let's take a basic I p address. Let's take this 114.25. 0.37 point eight

01:11

that I've used here

01:12

and say that I tell you to use a class A sub net mask.

01:15

Classy sub net mask 255.0 point 0.0.

01:21

What that tells me is the first octet of the I P address is network portion,

01:26

while the remaining zeros are host abortions.

01:29

For now, you can think of it as when there is a 255 that's part of the network ID.

01:34

And where there's a zero, it's part of the host ID.

01:38

So if I look at this I, p address and the subnet mask together,

01:42

the sub net mask tells me that the first octet is part of the network ID.

01:47

Everything else is to identify hosts.

01:49

So my network idea or network address in this case is 114.0 point 0.0.

01:57

The remainder the 25.37 point eight

02:00

is unique to the host.

02:04

Now, if I change the sub net mask, your network ID versus host ID is going to change.

02:09

So on Class B

02:12

255.255 point 0.0 you've got 114.25 point 00 as your network ID,

02:21

and then the remainder. The host ID is 37.8 is unique to the specific host.

02:28

Class C

02:29

255.255 point 255.0 1st three octaves of the I P address our network ID

02:36

so 114.27 point 37.0 and all that's left is for the host address is 0.8.

02:46

So where you see a 255 opted in the sub net masks tells you what to isolate from I p address as the network ID.

02:53

These are classical masks,

02:55

and you can see a Class A addresses this a Class B address? Is this a Class C address or C sub net mask? Is this

03:04

so It's either 255 or zero

03:07

in a little while, we'll look at this, but what you'll see is for separate Oct. It's whereas in reality, your system sees that as 32 bits.

03:16

Each octet is eight bits separated by a dot.

03:20

If we get into binary, what we'll see in a few minutes is that when you all have binary ones in a bit of data,

03:27

the value for that is 255

03:29

So what we really want to move towards thinking is that it's not so much to 55 is magical, but where there are binary ones, that's a portion of network ID

03:39

where there are portions of binary zeros. That's the host ID,

03:44

but we'll look at how to convert it to binary in just a minute.

03:50

When we look at binary addressing, I want you to disregard was on the screen and just think back to how you learn math

03:55

The way we use math and the numbering system we use is the decimal system. It's based on tense.

04:01

So at some point in time, your teacher probably came in, wrote a number on the board and said,

04:06

Here's how many ones you have here is how many times you have. Here's how many hundreds and thousands you have.

04:12

The reason we use a numbering system that starts with one then 10, then 101,000 and so on is because we're based on 10.

04:20

Those are units of 10,

04:23

but with binary were based on to each value is either one or zero.

04:30

So let's focus on what's in pink. In this chart.

04:33

If we're looking to express one byte of data, which is what we have here, if you count the individual rectangles and pink,

04:40

we have eight of them from one all the way to 1 28.

04:44

So we're showing what can be expressed in a byte of data.

04:46

So we start over to the far right with the Ones column.

04:50

The reason we start with ones is we start out with two to the power of zero.

04:55

Anything to the power of zero is one.

04:58

So the first place holder is one.

05:00

Then we go to the power of one, which is to

05:02

to the power of two is four to the power of three is eight.

05:06

The power of four is 16.

05:09

I think you can see we continue to the power of 56 and seven.

05:14

That's our framework for converting to decimal.

05:15

So let's see how this works.

05:18

Let's take the number 156.

05:21

We see that in decimal.

05:24

I want to figure out what it looks like in binary.

05:27

So when I convert to binary, I have to remember the fact that one means yes, zero means no,

05:33

we can think about it that way.

05:35

So I have to ask myself, Well, the number 1 28 fit into 1 56 and the answer is yes.

05:43

And if so, I have to account for that.

05:45

So I subtract out 1 28 and that leaves me with the remainder of 28.

05:50

Well, 64 fit into 28. No.

05:54

So that's zero.

05:55

Well, 32 fit? No. So that's zero.

05:59

Well, 16 ft? Yes. So we have one

06:01

now

06:02

28 minus 16 leaves me with 12.

06:05

Eight, will fit into 12 with the remainder of four,

06:09

or will fit into four. And there's nothing left over, so you finish it out with zeros.

06:15

So when I look at the number 1 56 in binary,

06:17

it's

06:18

10011100

06:24

Let's do another one.

06:25

Let's go down to the number 99

06:28

with the number 99. If we look at that in binary, 128 won't fit into 99.

06:33

So we get zero.

06:35

64 will fit. So we get one.

06:39

Subtract 64 we're left with 35.

06:43

Well, 30 to fit into 35.

06:45

Yes. So one

06:46

that leaves me with the remainder of three.

06:49

So 16, 8 and four won't fit.

06:53

But to will

06:55

we get a one for the to value? We have one left over.

06:59

So one in the ones place.

07:01

So 99 binary

07:03

01100011

07:08

Mhm.

07:09

Okay, so let's look at 255 in binary

07:13

255 in binary. If you go through the same process, you'll see 255 in binaries all once

07:19

that becomes important later, because what we're going to find is 255 or zero. That's too much all or nothing.

07:28

So what we'll do is take that number 255 for the sub net mask.

07:31

And rather than using all the bits as binary one,

07:34

I'm going to play around with that so that we would get a more efficient usage of our I p address space.

07:42

So for now, think about the classical I P addresses in the sub net masks Sub net Mask A, B and C.

07:48

Remember for later that 255 when it's used to indicate a network portion of an I P address, that number is special because of the fact that it's all binary ones.

Up Next

Similar Content