[music]
Just to review, we know what a Subnet mask is. It's
a comparison tool. Now for us as humans, it's nice when
we see an IP address and a Subnet mask, and the Subnet
mask falls in a nice boundary of a byte like
255.000 or 25525500. Right that's real easy for us
using our eyeballs to do that comparison and say,
"Oh, okay clearly this octet and this octet belong to the
network. Everything else is host bits." Well I've been
trying to show you with some of these quiz questions here
is the Subnet mask gives you the ability to draw that
dividing line anywhere in that 32-bit IP address. It
doesn't have to fall right at the end of a byte. So,
for example, in this particular case it does fall
right at the end of a byte. Right? Right after the
second byte, our subnet mask ends. And so it says, Okay,
the first two bytes with the /16 belong to the network.
Another one where it falls right at the end. So in this
case, with the /24, that says the first three entire
bytes belong to the network. No problem, but you could
easily do it like this, /28 where you say, Okay, the
subnet mask extends all the way into the last octet.
Four bits of the last octet belong to the group. So in
that last example, example number three there, we've
only got four bits left for host. So let me ask you some
questions about what you see right here. Question number
one, what was the original classful network before any
subnet masks were applied? So forget about the /16,
/24, and /28. If we we're looking at this purely from
a classful network perspective, what would the
classful network have been? Go ahead and someone type
that into the question feed there and answer that for
me. Does anybody know what the original classful
network was? Well, the original classful network
was the 1 Network, right? With the first bit being a
0, that was a Class A, so we only looked at the first
byte. The first byte, if we translate that back to
decimals, the number 1. So that was the 1.0.0 network.
Next question. In all three of these examples, what is
the network address now that we've got /16, /24, and /28?
So in this first example here, example number one,
given the subnet mask - we're no longer doing
classful - what's the new network address based on
what you see right here? Well hopefully, it's pretty
easy. You just count up the red bits. The first byte is
1. The second byte is the number three, so this is the 1.3
network. And the second example, our network address
in now 1.3.192. And the third example, the network
address is 1.3.192.112. That one's a little bit tougher.
112 is the fourth octet. Of these three examples here
with these three different subnet masks, which one
provides for the greatest quantity of hosts?
Well hopefully, you very quickly said example number one
because example number one's got a whole lot of host
bits. The other two examples don't have as many. Last
question about this. If this company was originally given
the Class A network of 1.0.0.0, which of these
subnet masks would provide for the greatest quantity of
subnets? In other words, which of these subnet masks
would allow us to take that original network of 1.0.0.0
and carve it up into the most quantity of subnets
that we could? Give us the most variation. Well hopefully
you said example number three. With example number
three, I can't touch my original network of 1, but
with a /28, that means I've got 8, 16, 20 bits of
subnetting. That gives me 2 to the power of 20
combinations I can come up with. Tens of thousands of--
hundreds of thousands of networks I can come up with.
So why do we subnet? So we can divide a single
allocated network into multiple subnetworks. That's
the whole reason behind it. Minor loss of host space
available. So here's a practical example. Imagine
if you lease a network from your ISP for $100 a month.
The building here we see requires four networks. If
we used classful addressing, that right there would cost
us $400 a month because we had to purchase or lease
four unique networks. With subnetting, I can take just
one classful network, subnet it, I'm only paying $100 a
month. I'm only paying one fee for my 20.0.0.0 for my
ISP, but by extending those bits out with a subnet mask,
I have now given myself four unique networks but I'm only
paying for one of them. One of the key points I want you
to take away from this is that, as I take my original
network and I say, Okay, I'm now gonna take some of my host bits
and add them to that network - give me a little bit of
room to play and have variation. Well, the more
host bits you steal-- you'll see that term a lot,
stealing bits, which means you're taking your host bits
and you're stealing them for networking bits. You're
converting them into subnet bits. The more subnet bits I
have, there's pros and cons to that, right? The more subnet
bits I have available to me, the more networks I can come
up with. But, the more subnet bits I have, the less
host bits I have. And the fewer host bits I have, that
means that each subnet can't have as many hosts anymore.
The subnets are getting smaller and smaller. So
here's an example of that. So I got this class B from
my ISP, 180.1. That's the network. We know that those
original 16 bits are untouchable. Can't touch
those bits. So we ask ourselves, how many host
bits do I have? Well, in this case, I've got 16.
Sixteen bits I can play with on the back end of this
address. For every host bit that you convert into a
subnet bit, you've just gained two additional
networks. Two additional networks. For example, if
this is what I was given from my service provider -
let's say 1.0.2.3.4.5.6.7.8. 1,2,3,4,5,6,7,8. So that's
what I'm given from my ISP and I can't touch that.
Okay, there's my remaining 16 bits of host bits. If I say,
Well, here's what I'm going to do. I'm going to take
this bit right here and add it to my networking bits.
I'm going to say, Well, my group, my broadcast domain
is the first 17 bits. Well I know I can't touch this original
pattern of 16. That was purchased from my ISP. But
what can I do? I can say, Well, I've got one network,
that's 129.1 and then put a 0 right here. My only other
option is to put a 1 right there. I've just now taken
the one network I got from my ISP and subdivided into
two portions. One broadcast domain is a 17 bit group
number ending with 0. The other broadcast domain is a
17 bit number ending with a 1. You can see, if I move
it-- let's say I move that line. I say, Well, I'm
actually going to now take two of my host bits. Well,
now what can I have? Well, I can have one broadcast
domain that ends with 0.0. Another one that ends with
0.1. Another one that ends with 1.0. Another one that
ends with 1.1. So with two bits, I'm now just giving
myself four combinations. So what you're going to see
here is just basically boils down to this nice formula. 2
to the power of subnetting or 2 to the power of N, gives
you your quantity of subnets. In other words--
let's go back to my example here. I'm given this
original network of 16 bits and I say, Well, hmm, I need
let's say eight networks. Well if I use that formula
to 2 to the power of stolen bits, or 2 to the power of
subnetting bits, is it going to be greater than or equal
to the number of networks I need? So now I solve it. I
say, 2 to the power of SN subnetting bits is going to
be greater than or equal to 8, because I need 8
networks. So you say, "Oh, well, okay that would be the
number 3." If I have 2 to the power of 3, if I steal 3
bits, that will actually give me 8 combinations of
numbers: 000, 001, 010, 011, all the way up to 111 - 8
possible combinations. So you might get questions like
that on your CCNA or even in real life, if you're given
some based network, and you're told, "Okay, well you
need 15 networks, or you need 30 networks, how many
host bits do you need to re-purpose or re-convert in a
subnetting bits to give you enough variation for the 15
networks you need, or the 20 networks that you need?"
Based on that, let's do some-- oh, before we do
another quiz, one other key thing here - one other key
thing. Let's go back to this for a moment. In my example,
I said, "Well, I need to have 8 networks." You say,
"Oh, well-- okay, well, 2 to the power of 3 works, but
why don't I say, oh I don't know, why don't I steal this
many? That looks good. Why don't I steal 11 bits? Right?
Because 2 to the power of 11 is going to give me far more
that 8." "Yeah, but it'll give me the 8 you need,
right? Why not just use 8 networking bits? Subnet
bits?" Well, here's the thing. Remember, the further
you push this line to the right, the more bits you
steal, the less host space you have available. If I put
my line way out here, my broadcast domain is not
going to be able to have very many laptops and PCs
and printers in it, because I don't have very many
addresses left for host addresses. So when you're
doing subnetting in this way that we're doing right here,
the idea is push your line to the right, not as far as
you can go but as minimal as you can go. In other words,
you say, Okay, if I push it just one, will that be
enough? Ugh, it's not enough. If I push it two to the right,
is that enough? Ugh, it's not enough. Well, if I push
it three to the right, that's just barely going to
give me what I need. That's where you stop, where the
number you come up with here is just barely what you're
looking for but it just fits what you're looking for.
Sure, you could keep pushing it to the right if you wanted
to, but now you're sacrificing host space. So let's do some
examples of this. So you were leased the following
network from your ISP, the 45 network. If you convert
the first three host bits into subnetting bits, how
many total subnets will you have available? Okay, time's
up. If we use our formula of 2 to the power of subnetting
bits gives us our total quantity of subnets, well,
if we steal three bits, that's 2 to the power of 3, which gives
us the number 8. Robert, I see your question there.
When stealing, start stealing point, is it
connected to the classful network? So the question is,
where do you start stealing the bits from? You have to
ask yourself, Okay, what was I originally given? What was
I given from my service provider or from my regional
Internet registry? You know, of my 32-bit number that they gave
me, what amount of those bits do they consider
untouchable as the networking portion? Now they
may have given you a classful network, or they
may not. For example, your regional Internet registry
or your service provider could say, Okay, we're
giving you this, 140.55.64.0/18. So what that
means is, from the service provider's perspective, I am
not allowed to touch the first 18 bits. That is not a
classful mask, right? A classful network would be a /16
because 140 is a class B address. But here, my
service provider has given me a /18. So that means if
I'm going to take that one network and subdivide it
into subnets, I may have to go beyond /18. So in this
particular case of a /18, let me ask you this. If
they're giving me a /18, how many host bits do I have
available from this one network that I just
purchased from my service provider? How many host bits
are left? I've got 14 host bits left, right? I've got
14 host bits because my service provider is saying,
Look, as far as we're concerned, the first eight
bits here are networking bits, the first eight bits
here are networking bits, and the first two bits here
are networking bits. So that means of the third octet
I've got six host bits left, and then of the fourth octet
I've got eight host bits left. So I've got 14 host
bits available. One, two, three. So what this is
showing me in this particular case is, one,
two, three, four, five, six, seven, eight. One, two,
three, four, five, six, seven, eight. One, two. So I
can't touch those. So this is what they've given me
right here, so I'll just say this is untouchable. So now,
what's left over? One, two, three, four, five, six. One,
two, three, four, five, six, seven, eight. So now I'm
going to start stealing from right here. If I'm going to
start creating my subnets, I have to start from the right
of this line. So my subnets will be a /19, /20, /21, but
I can't go anything less than /18 because /18 is what
they gave me. And yes, Robert, that number that you
just did that this right here, I'll just put it right
there. That's how you determine your host
requirements. That's actually the next slide. So
right now we've just been focusing in on how many bits
do I need to steal to come up with a number of subnets
that I need. Here's another one. You are leased this
network from your service provider. If you convert the
first six host bits into subnetting bits, how many
total subnets will you have available? If we use that
same formula, 2 to the power of 6 gives me 64 subnets
available. That's right, 2 to the power of 6. Now let's
take it up a notch, make it a little bit more
complicated. You are leased the following network from
your service provider. If you convert the first three
host bits into subnetting bits, what will be the
subnet address of the fourth subnet? Some of you may have
been able to work this one through, some of you didn't.
Let's go ahead and look at the logic behind this. Okay,
so we're starting with 45. I cannot touch those first
eight bits, and we're saying I'm going to be subnetting
my next three bits. So that gives me these various
combinations. The fourth subnet? Well, the first one
is 000 and the next one is 001, so the fourth
combination I can come up with is 011. So if I take
all of my remaining host bits and convert them into
0s, I get that, and so my fourth subnet is the
45.96.00 network with the slash 11 mask. Start out as
slash 8 and then I added 3 bits to it making into a
slash 11, so another one of these. You release the
following network, 199.000/24. From the single
network you need to create 7 subnets. What will be your
new subnet mask? And the correct answer here was
255.255.255.2.24. Why is that? Well we need to create
7 subnets. So we know 2 to the power of our subnetting
bits must be greater than or equal or 7. So if we do 2 to
the power of 3 that gives us eight subnets, so three is
the minimum we can steal. So if we start out with a /24
and we add three more bits to that, that gives us a
/27. /27 means all eight bits of the first octet, all
eight bits of the second, all eight bits of the third,
and three bits, 111, three bits of the fourth octet are
subnetting bits. That would be our new subnet
mask. Let's do one more, and then we'll take a break.
You're leased the following network, 145.10 /19. Don't
let that throw you. Just remember, the first 19 bits
are untouchable. That's how you need to look at that.
From the single network, you need to create 58 subnets.
What will be your new subnet mask? Time's up. There is
your new subnet mask. So how did you come up with that?
How did we come up with that? So here's how we do
this. Well, 58 subnets. Let's see, 2 to the power of
1 is 2, 4, 8, 16, 32 - almost there - 64. So I need
to steal six bits. That'll give me up to 64 subnets. So
I need to add six bits to this. So 19 plus 6 is going
to be 25 or a /25. So that means here is my 24, and 128
gives me my 25th bit. So that's how you got that.
[music]