Free CCNA 200-301 Course 06-07: The Subnet Mask
Summary
TLDRThis video delves into the concept of subnet masks, a crucial aspect of IP networking. It explains how subnet masks determine the boundary between the network and host portions of an IP address, enabling devices to identify whether a destination is on the same subnet or a different one. Through clear examples and binary representation, it illustrates how subnet masks work and the significance of contiguous blocks of ones and zeros. Additionally, it covers rules for assigning host addresses, highlighting the reserved network address and broadcast address. Overall, this video provides a comprehensive understanding of subnet masks and their role in IP addressing and routing.
Takeaways
- 🔗 The video provides a link to download hands-on lab exercises that accompany the CCNA course.
- 🌐 Hosts on the same subnet can communicate directly with each other, but communication between subnets requires a router to forward the traffic.
- 🎭 The subnet mask helps hosts determine if the destination IP address is on the same subnet or a different one.
- 🔢 The subnet mask is a 32-bit binary number, represented in dot-decimal or slash notation, that separates the network and host portions of an IP address.
- 🔍 The host compares its IP address and subnet mask in binary to identify the network and host portions of the address.
- 🚦 The network portion of the IP address must match for hosts to be on the same subnet and communicate directly.
- 🚫 Two special addresses cannot be assigned to hosts: the network address (all zeros in the host portion) and the directed broadcast address (all ones in the host portion).
- 📝 The host portion of the IP address is used to assign unique addresses to devices on the same subnet.
- 🔀 Host IP addresses do not need to be sequential within a subnet, but they cannot be duplicates.
- 📚 The video promotes the instructor's CCNA Gold Bootcamp course, which includes additional study materials and troubleshooting labs.
Q & A
What is a subnet mask and how is it represented?
-A subnet mask is a 32-bit number that divides an IP address into network and host portions. It can be represented in dot-decimal notation (e.g., 255.255.255.0) or in slash notation (e.g., /24).
How does a host determine if a destination IP address is on the same subnet or a different subnet?
-A host compares the network portion of the destination IP address with its own network portion, which is determined by applying the subnet mask to its own IP address. If the network portions match, the destination is on the same subnet; if they differ, the destination is on a different subnet.
What is the purpose of a router in a network with subnets?
-A router is a device that links different subnets together and routes traffic between them. If a host needs to send traffic to a destination on a different subnet, it must be forwarded by a router.
Can the ones and zeros in a subnet mask be mixed in any order?
-No, the subnet mask must have a contiguous block of ones followed by a contiguous block of zeros. Mixing the ones and zeros in a subnet mask is not valid.
What is the significance of an all-zeros host portion in an IP address?
-An all-zeros host portion designates the network address and cannot be assigned to a host. It is the lowest address in the subnet range.
What is the significance of an all-ones host portion in an IP address?
-An all-ones host portion represents the directed broadcast address, which sends traffic to all hosts on that subnet. It cannot be assigned to an individual host and is the highest address in the subnet range.
Can two hosts on the same subnet have the same IP address?
-No, two hosts on the same subnet cannot have the same IP address. Duplicate IP addresses on the same subnet are not allowed, as network devices would not know which host to send traffic to.
Do hosts on a subnet need to be numbered sequentially?
-No, hosts on a subnet do not need to be numbered sequentially. As long as the IP addresses are unique on that subnet, they can be assigned in any order.
Can two hosts on different subnets have the same host portion of their IP addresses?
-Yes, two hosts on different subnets can have the same host portion of their IP addresses, as long as the network portions differ.
What is the purpose of the provided hands-on lab exercises mentioned in the script?
-The hands-on lab exercises accompany the CCNA course and provide practical experience for learners to reinforce the concepts covered in the lectures, such as subnet masks and IP addressing.
Outlines
📺 Introduction and IP Configuration
This paragraph serves as an introduction, reminding viewers to download the accompanying lab exercises, subscribe, and enable notifications. It then moves on to demonstrate the IP configuration on the speaker's Windows laptop, highlighting the IP address (192.168.10.15), subnet mask (255.255.255.0), and default gateway (192.168.10.x). The paragraph sets the stage for explaining how hosts use this information to communicate within and between subnets.
🌐 Subnet Masks and Communication Between Subnets
This paragraph delves into the role of subnet masks in determining whether a host can communicate directly with another host or needs to route traffic through a router (default gateway). It explains how hosts compare the destination IP address with their own IP address and subnet mask to determine if the destination is on the same subnet or a different one. The paragraph also introduces the binary representation of IP addresses and subnet masks, illustrating how the subnet mask separates the network portion from the host portion of an IP address.
🏠 Host Addressing and Subnet Ranges
This paragraph focuses on the host portion of an IP address and the valid range of addresses that can be assigned to hosts within a subnet. It explains the significance of all zeros (network address) and all ones (directed broadcast address) in the host portion, which cannot be assigned to individual hosts. The paragraph also clarifies that IP addresses do not need to be assigned sequentially within a subnet and that duplicate IP addresses are not allowed on the same subnet. Finally, it provides an example subnet range (192.168.10.1 to 192.168.10.254) that can be assigned to hosts.
Mindmap
Keywords
💡IP Address
💡Subnet Mask
💡Default Gateway
💡Subnet
💡Router
💡Binary Notation
💡Network Address
💡Directed Broadcast Address
💡Host Address
💡Duplicate IP Addresses
Highlights
A host can send traffic directly to another host on the same subnet via the switches that they're attached to, but for a host to send traffic to another host in a different subnet, it must be forwarded by a router.
The host needs to understand if the destination is on the same or a different subnet in order to know how to send it.
If the destination is on the same subnet, it will send it there directly. If it's on a different subnet, it knows that it has to send it to the local router, which is the default gateway.
The way that the host knows whether the destination is on the same subnet or a different subnet is by comparing the IP address of the destination to its own IP address and subnet mask.
The subnet mask defines where the boundary is between the network part and the host part of the address.
A 1 in the subnet mask indicates that bit in the IP address is part of the network address, and a 0 indicates that the bit is part of the host address.
The subnet mask always begins with a contiguous block of ones, followed by a block of zeros. The ones and zeros cannot be mixed up in the subnet mask.
The host portion of the address is available to be allocated to the different hosts on that particular subnet, such as PCs, servers, printers, router interfaces, and switch management addresses.
The host portion of the address specifies the individual host and must be unique on that subnet.
All zeros in the host portion designates the network address and is not allowed to be allocated to a host.
All ones in the host portion of the address is the directed broadcast, which goes to all hosts in that subnet, and cannot be assigned to an individual host.
In the example of 192.168.10.0/24, the range of addresses available to be allocated to hosts is 192.168.10.1 to 192.168.10.254.
Hosts on the same subnet can send traffic directly to each other without going through the default gateway router.
The complete CCNA course, including hands-on lab exercises and additional study materials, is available for enrollment.
The lecture explains how hosts determine whether a destination is on the same subnet or a different subnet, and how they use the subnet mask to identify the network and host portions of an IP address.
Transcripts
just a quick reminder before we get into
the lesson
to download the hands-on lab exercises
that accompany this complete ccna course
i'll include the link in the description
also remember to subscribe
and hit the notifications bell so you
don't miss any of the lessons in the
course
okay let's get into it
in this lecture you're going to learn
about
subnet masks and you can see what i've
done here is i've opened up
a command prompt on my windows laptop
again
and i've entered ipconfig and you can
see where i've highlighted it
that my ip address is 192.168.10.15.
my subnet mask is 255.255.255.0
and the default gateway is 192.168.10.
so every host in your network is going
to know
what its ip address its subnet mask
and its default gateway is
let's now see how it's going to use that
information
so onto the slides now a host can send
traffic directly to another host on the
same subnet
via the switches that they're attached
to
but for a host to send traffic to
another host in a different subnet
it must be forwarded by a router so our
routers are devices
that link our different subnets together
and route the traffic between them
the host therefore needs to understand
if the destination
is on the same or a different subnet in
order to know how to send it
if the destination is on the same subnet
it will send it there
directly if it's on a different subnet
it knows that it has to send it to the
local router
which is the default gateway and the way
that the host knows
whether the destination is on the same
subnet or a different subnet
is by comparing the ip address
of the destination to its
own ip address and subnet mask
the subnet mask just like the ip address
is also 32 bits long and it can be
written
in dot decimal notation the same as our
ip
addresses or it can be written in slash
notation
you'll see how that works a bit later in
this lecture
a host's ip address is divided into a
network portion and a host portion
and it's the subnet mask that defines
where the boundary is between the
network part and the host part of the
address
and the easiest way to explain how this
works is by giving you
an example so let's say the host's ip
address is
192.168.10.50
and the subnet mask is 255.255.255.0
that's the ip address and subnet mask
it's actually on my
laptop to figure this out we write
the ip address out in binary notation
like you learned in the last lecture
and then the subnet mask also in binary
notation
underneath so our example was
192.168.10.15
subnet mask 255.255.255.0
so you see the the top part here i've
written
192.168.10.15 out in binary
and then underneath 255.255.255.0
out in binary as well the
ip address is compared or masked
with the subnet mask a 1 in the subnet
mask
indicates that bit in the ip address is
part of the network address and a zero
indicates that the part that the bit is
part of
the host address so very quickly you can
see here
all the ones on the subnet mask go up to
here
everything in the ip address above that
is part of the network portion of the
address
the zeros above that way in the
ip address those are part of the host
portion of the address let's make this a
little bit clearer
so subnet mask 255.255.255.0
with the subnet mask it's always going
to have contiguous ones and you see the
ones come up to this part here
so i put a line in that line
is the border between the network
portion and the host portion
of the address so in the example the
network address portion is 192.168.10
because on the ip address from here
on the left all the way up to the line
that is 192.168.10
part of the ip address whatever is
after the line is the host portion of
the address so in our example is the dot
15
is the host portion of the address
and i've highlighted it there there is
the network portion
if the host wants to communicate with
another
host with an ip address which also
begins with 192.168.10
in our example so say for example
that this host wants to send traffic to
a destination address of 192.168.10.20
it knows it's on the same subnet and it
can send the traffic directly
because the destination also begins with
192.168.10.
if this host wants to communicate with
another host on
any other network anything that does not
begin with 192.168.10
then it knows it has to send the traffic
via a router
so if it was sending traffic to
destination 192.163
for example it doesn't begin with
192.168.10
it's a different subnet sends it via the
router
for a destination address to be on the
same subnet the network portion has to
be
exactly 192.168.10.
anything else means it's a different
subnet we have to go via a router
the subnet mask always begins
with a contiguous block of ones
this is different than the ip address
you see our example i p address here
it's one one zero zero zero zero zero
zero
one zero one zero one so with the i ip
address the ones and the zeros can be
mixed about in pretty much any order the
subnet mask
is a block of ones and then a block of
zeros
always we never mix the ones and the
zeros up with each other
in the subnet mask so one one one one
one one one dot one one one one
zero zero zero zero dot zero zero zero
etcetera is a legal subnet a mask one
one one zero one one zero
one mixing up the ones and zeros we
can't do that that is not a valid subnet
mask
the host portion of the address is
available to be allocated
to the different hosts on that
particular subnet
for example your pcs servers printers
router interfaces switch management
addresses etc
with two exceptions that you'll see
coming up after the next slide
so there's the host portion of the
address for our example highlighted
the host portion of the address
specifies the individual host
and must be unique on that subnet
your hosts do not need to be numbered
sequentially for example we could have a
subnet with two hosts on it
one could have addressed 10.10.10.10 the
other could have addressed 10.10.10.20.
we don't need to number them dot one and
dot two
you can't have two different hosts both
with the same ip address for example we
couldn't have two hosts both with
address 10.10.10.10
that would be a duplicate address and
whenever
any traffic was sent to 10.10.10.10
your network devices wouldn't know which
host to send it to so if that's illegal
you can't have duplicate ip addresses
you could have host 10.10.10.
on one subnet and host 10.10.20.10 on a
different subnet
they're different subnets so it's not a
duplicate address that's just fine
all zeroes in the host portion
designates the network address and is
not allowed to be allocated to a host
remember we just said
a minute ago that there's two particular
addresses that cannot be assigned to a
host
the first one of those is all zeroes in
the host portion
that designates the network address or
the network id
in our example the network address would
be 192.168.10.0
so we fill in the bit pattern in the
network portion so that was 192.168.10
and then in the host portion we put all
zeros in there so all zeros you can't
assign it to
a host it signifies the
network address which is the the bottom
address in that particular subnet
and there's highlighted there you can
see we've used all zeros
the other address which cannot be
assigned to a host is
all ones in the host portion of the
address so all
zeroes signifies the network address
which is the bottom address in the range
all ones which is the top address in the
range
that is the directed broadcast
whenever you send traffic to the
directed broadcast address
it goes to all hosts in that subnet
not to an individual host so we can't
assign that address to an individual
host
and there it is highlighted the host
portion i've put all ones in there
so that leaves 192.168.10.1
to 192.168.10.254.
in our example available to be allocated
to our different hosts so all the
different pcs
other kinds of hosts maybe we've got
some windows pcs some linux pcs
in that subnet i can number them from
192.168.10.1
all the way up to winding 2.168.10.254.
they're all in the same subnet whenever
they send traffic to each other they can
do that directly
without going via their default gateway
router
thanks for watching if you'd like to get
the complete course
ad free right now then you can enroll in
my ccna gold bootcamp
by clicking the link above my head or in
the description
it also includes full study notes
quizzes
and 150 pages of additional
troubleshooting labs
you can't find anywhere else
5.0 / 5 (0 votes)