9 hours 49 minutes
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.
Remember, the network idea is going to be what narrows us down from anywhere in the world.
Basically, what's that going to do is allow traffic to get to your local router.
Once traffic find your local router,
then traffic has to find you specifically.
That's what the host portion of the address is.
So the network portion gets traffic near you. The host portion gets traffic to you.
You can't say that one is more important than the other. We need both of them.
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.
The only purpose of a sub net mask is to tell you what network portion is and tell you what host portion is.
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,
so let's take a basic I p address. Let's take this 114.25. 0.37 point eight
that I've used here
and say that I tell you to use a class A sub net mask.
Classy sub net mask 255.0 point 0.0.
What that tells me is the first octet of the I P address is network portion,
while the remaining zeros are host abortions.
For now, you can think of it as when there is a 255 that's part of the network ID.
And where there's a zero, it's part of the host ID.
So if I look at this I, p address and the subnet mask together,
the sub net mask tells me that the first octet is part of the network ID.
Everything else is to identify hosts.
So my network idea or network address in this case is 114.0 point 0.0.
The remainder the 25.37 point eight
is unique to the host.
Now, if I change the sub net mask, your network ID versus host ID is going to change.
So on Class B
255.255 point 0.0 you've got 114.25 point 00 as your network ID,
and then the remainder. The host ID is 37.8 is unique to the specific host.
255.255 point 255.0 1st three octaves of the I P address our network ID
so 114.27 point 37.0 and all that's left is for the host address is 0.8.
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.
These are classical masks,
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
so It's either 255 or zero
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.
Each octet is eight bits separated by a dot.
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,
the value for that is 255
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
where there are portions of binary zeros. That's the host ID,
but we'll look at how to convert it to binary in just a minute.
When we look at binary addressing, I want you to disregard was on the screen and just think back to how you learn math
The way we use math and the numbering system we use is the decimal system. It's based on tense.
So at some point in time, your teacher probably came in, wrote a number on the board and said,
Here's how many ones you have here is how many times you have. Here's how many hundreds and thousands you have.
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.
Those are units of 10,
but with binary were based on to each value is either one or zero.
So let's focus on what's in pink. In this chart.
If we're looking to express one byte of data, which is what we have here, if you count the individual rectangles and pink,
we have eight of them from one all the way to 1 28.
So we're showing what can be expressed in a byte of data.
So we start over to the far right with the Ones column.
The reason we start with ones is we start out with two to the power of zero.
Anything to the power of zero is one.
So the first place holder is one.
Then we go to the power of one, which is to
to the power of two is four to the power of three is eight.
The power of four is 16.
I think you can see we continue to the power of 56 and seven.
That's our framework for converting to decimal.
So let's see how this works.
Let's take the number 156.
We see that in decimal.
I want to figure out what it looks like in binary.
So when I convert to binary, I have to remember the fact that one means yes, zero means no,
we can think about it that way.
So I have to ask myself, Well, the number 1 28 fit into 1 56 and the answer is yes.
And if so, I have to account for that.
So I subtract out 1 28 and that leaves me with the remainder of 28.
Well, 64 fit into 28. No.
So that's zero.
Well, 32 fit? No. So that's zero.
Well, 16 ft? Yes. So we have one
28 minus 16 leaves me with 12.
Eight, will fit into 12 with the remainder of four,
or will fit into four. And there's nothing left over, so you finish it out with zeros.
So when I look at the number 1 56 in binary,
Let's do another one.
Let's go down to the number 99
with the number 99. If we look at that in binary, 128 won't fit into 99.
So we get zero.
64 will fit. So we get one.
Subtract 64 we're left with 35.
Well, 30 to fit into 35.
Yes. So one
that leaves me with the remainder of three.
So 16, 8 and four won't fit.
But to will
we get a one for the to value? We have one left over.
So one in the ones place.
So 99 binary
Okay, so let's look at 255 in binary
255 in binary. If you go through the same process, you'll see 255 in binaries all once
that becomes important later, because what we're going to find is 255 or zero. That's too much all or nothing.
So what we'll do is take that number 255 for the sub net mask.
And rather than using all the bits as binary one,
I'm going to play around with that so that we would get a more efficient usage of our I p address space.
So for now, think about the classical I P addresses in the sub net masks Sub net Mask A, B and C.
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.