00:00:01
Welcome to Jeremy’s IT Lab.
00:00:03
This is a free, complete course for the CCNA.
00:00:07
If you like these videos, please subscribe
to follow along with the series.
00:00:11
Also, please like and leave a comment, and
share the video to help spread this free series
00:00:16
of videos.
00:00:17
Thanks for your help.
00:00:20
In this video, we’ll continue to learn about
subnetting.
00:00:24
Last video I introduced why subnetting is
necessary, and walked through a few examples.
00:00:30
In this video, I’ll try to give some more
clear steps for solving subnetting problems.
00:00:35
I’ve also decided to make one more video
on subnetting, so this will be a three-video
00:00:40
series.
00:00:42
So, what exactly will we cover in this video?
00:00:46
We’ll start with some subnetting practice
questions, specifically for class C networks,
00:00:51
like last video.
00:00:52
We’ll start, of course, with the solution
to last video’s quiz question.
00:00:58
After that we’ll look at subnetting class
B networks.
00:01:02
The process is exactly the same, no matter
what class of address you’re subnetting,
00:01:06
but it can be a little bit more difficult with
larger networks.
00:01:10
Class A networks will be covered in the next
video, by the way.
00:01:15
So let’s take a look at how to solve last video’s
quiz question.
00:01:18
I asked you to divide the 192.168.1.0/24 network
into four subnets that can accommodate 45
00:01:27
hosts each.
00:01:29
We found that a /26 subnet is the right size
to fit 45 hosts, so we assigned the
00:01:35
block 192.168.1.0/26 to subnet 1.
00:01:41
If you don’t remember how we determined
that /26 is the correct size, take a minute
00:01:46
to review the end of the last video.
00:01:48
So, I asked you to find the remaining subnets.
00:01:51
I also gave you this hint.
00:01:54
If you find the broadcast address of subnet
1, the next address after that will be the
00:01:59
network address of subnet 2.
00:02:03
So the network address for subnet 1 is 192.168.1.0/26.
00:02:10
Here’s 192.168.1.0 written in binary.
00:02:15
Blue is the network portion, red is the host
portion, and purple is the part we ‘BORROWED’
00:02:21
from the host portion to add to the network
portion.
00:02:24
This allows us to divide the larger /24 network
into multiple, smaller, subnets.
00:02:31
To find the broadcast address for this subnet,
which is the highest address in the subnet’s
00:02:36
address range, set all of the bits in the
host portion to 1.
00:02:40
Next let’s convert this to dotted decimal.
00:02:44
It becomes 192.168.1.63.
00:02:48
That’s the broadcast address.
00:02:50
So, the address range for subnet 1 is 192.168.1.0
through 192.168.1.63.
00:03:00
The network address of subnet 2 will be 1
higher than the broadcast address.
00:03:05
So, that means that subnet 2 will be 192.168.1.64/26.
00:03:13
That’s the network address, and here it
is in binary.
00:03:18
Notice that we changed one of the bits we
borrowed from the host portion to a 1.
00:03:22
So, the network address is now 192.168.1.64,
with all of the host bits set to 0.
00:03:30
Now lets find the broadcast address.
00:03:32
Change all of the host bits to 1, and now
let’s convert it to dotted decimal.
00:03:37
So, the broadcast address is 192.168.1.127.
00:03:42
So, that’s the range for subnet 2.
00:03:45
Add 1 to the broadcast address and we’ll
get the network address for subnet 3.
00:03:51
So, that means subnet 3 is 192.168.1.128/26.
00:03:58
Here is the network address in binary, again
notice we changed one of the borrowed purple
00:04:03
bits to 1, but the host bits are all 0.
00:04:07
Change them to 1, and here’s the broadcast
address.
00:04:10
So, the address range for this subnet is 192.168.1.128
through 192.168.1.191.
00:04:20
Now we can find the last subnet, subnet 4.
00:04:24
Subnet 4 is 192.168.1.192/26.
00:04:30
Here is the network address in binary, this
time the borrowed bits are all 1, so this
00:04:35
is our last subnet, we don’t have any room
for more.
00:04:39
Change the host bits to 1, and here’s the
broadcast address.
00:04:43
So, the address range for subnet 4 is 192.168.1.192
through 192.168.1.255.
00:04:52
Okay, we’ve found the answer to the quiz.
00:04:57
You may notice something about these numbers.
00:04:59
0 plus 64 equals 64.
00:05:03
64 plus 64 equals 128, and 128 plus 64 equals
192.
00:05:11
I said last video that I would just show you
the basics of subnetting, not any special subnetting tricks,
00:05:16
but let me show you just one that can help
you figure things out faster.
00:05:20
So, we found that a /26 subnet mask is appropriate.
00:05:24
That’s because there are 6 host bits, which
allows 62 hosts.
00:05:28
Let’s draw this line here.
00:05:31
On the left side is the network portion, and
on the right side is the host portion.
00:05:36
Since we’re just looking at the last octet,
let me make it bigger.
00:05:40
Okay, so I’ve put the binary for just the
last octet down here.
00:05:45
Again, the red part is the host portion, and
the purple part is the bits we borrowed to
00:05:50
expand the network portion.
00:05:52
You should remember the value of each binary
bit, but let me put them up here anyway.
00:05:56
From the right, 1, 2, 4, 8, 16, 32, 64,
and 128.
00:06:06
Notice that the LAST bit of the network portion
is 64.
00:06:09
This means that, to find the next subnet,
we just have to add 64.
00:06:14
Let’s see.
00:06:16
Add 64, and we get 192.168.1.64, which is
the network address of subnet 2.
00:06:23
Add 64 again and we get 192.168.1.128, which
is the network address of subnet 3.
00:06:31
Finally, add 64 again and we get 192.168.1.192,
which is the network address of subnet 4.
00:06:40
So, as you can see, by adding 64 each time,
we were able to find the network addresses
00:06:45
of each subnet.
00:06:48
Now let’s try another similar exercise.
00:06:51
We have been given the 192.168.255.0/24 network,
and have been asked to divide the network
00:06:57
into five subnets of equal size.
00:07:01
In this case, the number of hosts in each
subnet hasn’t been specified, so let’s
00:07:05
make five subnets that are as large as they
can be.
00:07:09
So, all we have to do to solve this problem
is find how many bits we have to ‘borrow’
00:07:13
from the host portion.
00:07:15
Currently, we are borrowing 0 bits from the
host portion.
00:07:20
That means that we can’t make any subnets,
we just have one network, 192.168.255.0/24.
00:07:28
If we borrow one bit, it now becomes a /25
network.
00:07:33
Borrowing one bit also means we can make 2
subnets.
00:07:37
Why is that?
00:07:38
Well, all of the original network bits, the
blue bits, cannot be changed.
00:07:42
That is the network we received.
00:07:45
Howevever the purple bit, the bit we borrowed
from the host portion, we can change, and
00:07:49
it can be either 0 or 1.
00:07:52
If its 0 we have the 192.168.255.0/25 network,
If its 1 we have the 192.168.255.128/25 network.
00:08:04
The formula for the number of subnets is 2
to the power of X, and X is the number of
00:08:10
borrowed bits.
00:08:12
This is similar to calculating the number
of hosts in a subnet, which is 2 to the power
00:08:17
of N -2 , and N is the number of host bits.
00:08:22
We subtract 2 for the network address and
broadcast address, which cant be assigned
00:08:27
to hosts.
00:08:28
However, when calculating the number of subnets,
we dont have to subtract 2, so its simply
00:08:34
2 to the power of X, the number of borrowed
bits.
00:08:37
Anyway, we need 5 subnets, so borrowing 1
bit isnt enough.
00:08:43
What if we borrow 2 bits, like this?
00:08:45
Well, 2 to the power of 2 is 4, so borrowing
2 bits allows us to make 4 subnets.
00:08:52
Still not enough, we need 5.
00:08:54
So lets borrow another bit.
00:08:57
If we borrow 3 bits, how many subnets can
we make?
00:09:00
2 to the power of 3 is 8, so we can make 8
subnets.
00:09:05
So, this is our answer.
00:09:07
It’s more subnets than we need, we need just 5, but if we borrow only 2 bits and use
00:09:12
a /26 mask we won’t have enough.
00:09:16
As I said in the last video, you can’t always
make the numbers exactly match the number
00:09:20
of subnets or number of hosts you need.
00:09:24
So, our first subnet will be 192.168.255.0/27.
00:09:30
Here it is written in binary.
00:09:32
Here’s the network portion, and here’s
the host portion.
00:09:36
Let’s look at just the last octet once more.
00:09:39
Here’s just the last octet.
00:09:41
What’s the value of the last bit of the
network portion?
00:09:45
It’s 32.
00:09:46
So, using the trick I introduced before, we
should be able to calculate the other subnets
00:09:51
now.
00:09:53
As I said before, subnet 1 is 192.168.255.0/27.
00:09:59
Add 32, and we get subnet 2, which is 192.168.255.32/27.
00:10:07
Add 32 again, and we get subnet 3, 192.168.255.64/27.
00:10:14
Subnet 4 is 192.168.255.96/27, and subnet
5 is 192.168.255.128/27.
00:10:25
Okay, we’ve made up 5 subnets, as our requirements
were to divide the network into 5 subnets.
00:10:31
However, our /27 prefix length allows up to
8 subnets to be made from the address range.
00:10:38
These three remaining subnets are 192.168.255.160,
.192, and .224,/27.
00:10:48
Here’s another type of subnetting question
you might find.
00:10:53
What subnet does host 192.168.5.57/27 belong
to?
00:11:00
So, we have the IP address of a host, 192.168.5.57,
and don’t know the network address of the
00:11:08
subnet.
00:11:09
Let’s see how we can figure this out.
00:11:11
It’s actually a fairly simple process.
00:11:14
Here’s 192.168.5.57 in binary and dotted decimal.
00:11:19
However, it’s /27, so let’s show the borrowed
bits.
00:11:24
These three purple bits are borrowed and added
to the network portion.
00:11:27
Now, to find the network address we simply
need to change all of the host bits to 0.
00:11:33
Now the last octet is 0010 0000.
00:11:39
Change that back to dotted decimal, and you
get 192.168.5.32.
00:11:45
So, that’s the answer.
00:11:47
The host 192.168.5.57/27 belongs to the subnet
192.168.5.32/27.
00:11:57
Let’s do one more for practice.
00:12:00
What subnet does host 192.168.29.219/29 belong
to?
00:12:08
Pause the video now and try to figure out
the answer for yourself…..okay, let’s
00:12:15
check.
00:12:18
Write out the address in binary first.
00:12:22
Identify where the network part ends.
00:12:25
In this case, 5 bits are borrowed from the
host portion and added to the network portion.
00:12:31
Set all of the host bits to 0. and then convert
back to dotted decimal.
00:12:35
There’s our answer.
00:12:38
So, host 192.168.29.219/29 belongs to the
subnet 192.168.29.216/29.
00:12:48
Okay, let’s review some numbers.
00:12:52
This is a table of the different subnet sizes
for class C networks.
00:12:57
For example, with a /25 prefix length, you
divide the network into 2, there are 2 subnets.
00:13:04
Also, each subnet can contain 126 hosts.
00:13:08
I recommend that you memorize these numbers,
it will help you perform subnetting faster
00:13:13
and easier than if you have to calculate everything
every single time.
00:13:17
Although, these are fairly simple to calculate.
00:13:21
For the number of subnets, each additional bit
that you borrow doubles the number of subnets.
00:13:27
For number of hosts, each host bits doubles
the amount of hosts, except you have to subtract
00:13:33
2 for the network and broadcast addresses.
00:13:37
Take note of /31, the number of hosts is 0.
00:13:40
I mentioned this in the last video, but it’s
because there is only a single host bit, so
00:13:46
there are only two possible addresses, which
are taken by the network and broadcast address.
00:13:51
However, for a point-to-point connection,
you can actually use a /31 and assign those
00:13:56
two addresses to each end of the connection,
and have no network or broadcast addresses.
00:14:03
Also /32 technically uses all bits for the
network address, allowing no hosts, but you
00:14:09
can assign a /32 mask to identify a specific
host when writing routes and such, and in
00:14:15
some other special cases.
00:14:18
Now let’s finally take a look at subnetting
some larger networks, specifically Class B.
00:14:24
Looking at this chart again, you can see that
there are many more host bits, and therefore
00:14:29
many more possible subnets, that can be created
with a class B network than with a class C
00:14:34
network.
00:14:35
However, the process of subnetting is EXACTLY
THE SAME.
00:14:39
So I’ll just walk you through a couple examples
with class B networks, and then we’ll leave
00:14:43
class A networks for the last video of this
subnetting series.
00:14:48
You have been given the 172.16.0.0/16 network.
00:14:53
You are asked to create 80 subnets for your
company’s various LANs.
00:14:58
What prefix length should you use?
00:15:00
Okay, this is really a simple question, and
we can follow the exact same process as last
00:15:05
time.
00:15:06
Pause the video here if you want to try it
by yourself….okay, let’s figure it out.
00:15:15
Again we can simply use the 2 to the power
of X formula, where X is the number of borrowed
00:15:19
bits.
00:15:21
If we borrow no bits, we can’t make any
subnets, we just have one large /16 network.
00:15:28
If we borrow one bit we can make 2 subnets,
because 2 to the power of 1 is 2.
00:15:34
This gives us a prefix length of /17, and
if we write this subnet mask in dotted decimal
00:15:39
it is 255.255.128.0.
00:15:43
Remember, when you enter commands in the Cisco
CLI you can’t use the CIDR notation like
00:15:49
/17, you have to enter dotted decimal like
255.255.128.0.
00:15:55
Anyway, 2 subnets isn’t enough for our needs,
so let’s borrow another bit.
00:16:02
Borrowing 2 bits allows for 4 subnets.
00:16:04
This is a /18 prefix length, and the subnet
mask is written as 255.255.192.0 in dotted
00:16:11
decimal.
00:16:12
Let’s borrow another bit.
00:16:15
Borrowing 3 bits gives us 8 subnets, and a
/19 prefix length.
00:16:21
The subnet mask is 255.255.224.0 in dotted
decimal.
00:16:26
Still not enough subnets, so let’s borrow another
bit.
00:16:31
Borrowing 4 bits allows us to create 16 subnets,
and uses a /20 prefix length.
00:16:36
/20 is 255.255.240.0 in dotted decimal, by
the way.
00:16:44
Borrowing 5 bits gives us 32 subnets, and
the prefix length is /21, which is 255.255.248.0
00:16:52
in dotted decimal.
00:16:55
Borrowing 6 bits gives us 64 subnets.
00:16:58
Getting close.
00:16:59
The prefix length is /22, which is 255.255.252.0
in dotted decimal.
00:17:05
Let’s borrow one more bit, which should
be enough.
00:17:10
Borrowing 7 bits gives us 128 subnets.
00:17:14
The prefix length is /23, which is 255.255.254.0
in dotted decimal.
00:17:21
So, this is the correct answer, we should
use a /23 prefix length so we can create the
00:17:27
80 subnets we need.
00:17:29
128 subnets is more than we need, but /22
only allows for 64, which is not enough.
00:17:37
I won’t show you all 80 subnets of course,
but let’s look at some of the subnets that
00:17:41
can be made, the first being 172.16.0.0/23
of course.
00:17:48
The next is 172.16.2.0/23, notice I changed
the last bit of the network portion to 1.
00:17:57
Next is 172.16.4.0/23. then 172.16.6.0, 172.16.8.0,
etc.
00:18:08
Let’s do another similar question.
00:18:12
You have been given the 172.22.0.0/16 network.
00:18:18
You are required to divide the network into
500 separate subnets.
00:18:22
What prefix length should you use?
00:18:25
Pause the video and try to figure this one
out for yourself, and I’ll show you the answer
00:18:29
in the next slide…...okay, let’s go to
the next slide.
00:18:36
So, the correct answer is /25.
00:18:40
We need to divide this class B network into
500 subnets, so that means we have to borrow
00:18:45
9 bits, because 2 to the power of 9 equals
512.
00:18:50
Notice that you can borrow bits even from
the last octet, so you can use /25, /26, /27,
00:18:55
etc. even with a class B network.
00:18:59
Here’s another practice question.
00:19:02
You have been given the 172.18.0.0/16 network.
00:19:07
Your company requires 250 subnets with the
same number of hosts per subnet.
00:19:13
What prefix length should you use?
00:19:16
This time you have to consider both the number
of subnets and number of hosts.
00:19:20
Once again, pause the video to solve this
yourself, and then I’ll give you the answer
00:19:24
in the next slide…..okay, let’s check
out the next slide.
00:19:30
So, the answer is /24.
00:19:34
We need 250 subnets, and borrowing 8 bits
allows us to make 256 subnets.
00:19:40
We also need 250 hosts per subnet, and having
8 host bits allows for 254 hosts per subnet.
00:19:48
Okay, before moving on to the quiz let’s
do one more ‘identify the subnet’ problem,
00:19:54
this time with a class B network.
00:19:57
What subnet does host 172.25.217.192/21 belong
to?
00:20:04
The process is exactly the same as with a
Class C network.
00:20:08
Write out the address in binary, change all
of the host bits to 0, and then change it
00:20:12
back to dotted decimal.
00:20:15
Pause the video if you want to try it on your
own. Okay, let’s check the answer.
00:20:22
Here’s the address written in binary, as
usual the red bits are the host bits and the
00:20:28
purple bits are the borrowed bits which are
now part of the network portion.
00:20:33
Change the host bits all to 0, convert it
back to dotted decimal and you get 172.25.216.0.
00:20:41
So, there’s the answer to the question.
00:20:43
172.25.217.192/21 belongs to the 172.25.216.0/21
subnet.
00:20:53
The process was exactly the same as for a
Class C network, there are just more host
00:20:57
bits.
00:20:58
Here’s a chart like the one I showed you
for Class C addresses, showing the number
00:21:03
of available subnets, and the number of available
host addresses for each prefix length when
00:21:08
subnetting a class B network.
00:21:10
Don’t worry, it’s not necessary to memorize
these numbers.
00:21:14
That would simply be a waste of effort.
00:21:16
Just know the patterns.
00:21:18
For each borrowed bit, the number of subnets
doubles, 2, 4 ,8, 16, 32, etc.
00:21:26
For each host bit, the number of addresses
in each subnet doubles, however you have to
00:21:31
subtract 2 to identify the number of usable
host addresses.
00:21:36
As I said, don’t memorize this, just know
the se patterns so you can calculate these
00:21:40
when you need to.
00:21:42
Okay let’s move on to today’s quiz.
00:21:45
I will give you five questions following the
same pattern as the ones we solved in today’s
00:21:50
video.
00:21:52
Please post your answers in the comment section
of this video. I will give the answers
00:21:55
and explanations at the beginning of the next video.
00:21:58
Let’s go to question 1.
00:22:01
You have been given the 172.30.0.0/16 network.
00:22:06
Your company requires 100 subnets with at
least 500 hosts per subnet.
00:22:12
What prefix length should you use?
00:22:14
Pause the video to find the answer.
00:22:19
Okay, let’s go to question 2.
00:22:22
What subnet does host 172.21.111.201/20 belong
to?
00:22:29
Pause the video to find answer.
00:22:34
Okay, let’s go to question 3.
00:22:38
What is the broadcast address of the network
192.168.91.78/26 belongs to?
00:22:46
Pause the video to find your answer.
00:22:51
Okay let’s go to question 4.
00:22:54
You divide the 172.16.0.0/16 network into
4 subnets of equal size.
00:23:01
Identify the network and broadcast addresses
of the second subnet.
00:23:06
Pause the video to find the answer.
00:23:11
Okay let’s go to the last question, question
5.
00:23:15
You divide the 172.30.0.0/16 network into subnets
of 1000 hosts each.
00:23:23
How many subnets are you able to make?
00:23:25
Pause the video to find the answer.
00:23:30
Okay, that’s all for the quiz.
00:23:33
Remember to leave all of your answers in the
comment section of this video, and then wait
00:23:37
for the next video, where I’ll go over the
answers and explanations.
00:23:40
Also, there won’t be any flashcards or practice
lab for this video.
00:23:45
After the next video I will make a practice
lab so you can subnet a network and assign
00:23:50
IP addresses to the devices in each subnet,
so wait for that.
00:23:54
Before I wrap up this video, I want to give
a shoutout to my JCNP-level channel members,
00:23:59
Vance, Mike Yonatan, and Lito.
00:24:02
Thank you so much for your support, I really
appreciate it.
00:24:06
Also, thanks to all of my JCNA-level members
as well.
00:24:10
Thank you for watching. That's all for this video.
00:24:15
If you want to show your support, please subscribe to the channel, like the video, leave a comment,
00:24:20
and share the video with anyone else studying for the CCNA.
00:24:23
I accept donations via cryptocurrency or Patreon via the links in the description.
00:24:29
I'm also a Brave verified publisher and accept
BAT, or Basic Attention Token, tips via the
00:24:36
Brave browser. Click the link in the description to check out Brave, a fast and sleek browser that pays you to surf the Internet.
00:24:44
That's all for now.