Free CCNA 200-301 Course 06-07: The Subnet Mask

Flackbox
24 Mar 202111:20

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

00:00

📺 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.

05:01

🌐 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.

10:01

🏠 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

An IP address is a unique numerical label assigned to each device connected to a computer network. It allows devices to communicate with each other over the network. In the video, the instructor shows their laptop's IP address (192.168.10.15) and explains how IP addresses help hosts determine whether a destination is on the same subnet or a different subnet, enabling them to send traffic directly or via a router.

💡Subnet Mask

A subnet mask is a 32-bit number that separates an IP address into the network portion and the host portion. It defines the boundary between the network and host addresses. The video uses the subnet mask 255.255.255.0 (expressed in binary notation) to illustrate how the subnet mask determines which part of the IP address belongs to the network and which part belongs to the host.

💡Default Gateway

The default gateway is a router on the same network as the host, which is responsible for forwarding traffic to other networks or subnets. In the video, the instructor mentions that the host needs to send traffic destined for a different subnet to the default gateway (192.168.10.1 in the example), which then routes the traffic to the appropriate destination network.

💡Subnet

A subnet is a logical subdivision of an IP network, created by dividing the network's address space into smaller, more manageable segments. In the video, the instructor explains that hosts on the same subnet can communicate directly, while communication between hosts on different subnets requires a router to forward the traffic.

💡Router

A router is a networking device that connects multiple networks or subnets and forwards data packets between them. The video states that routers are devices that link different subnets together and route traffic between them. Hosts must send traffic destined for a different subnet to their local router (default gateway) for forwarding.

💡Binary Notation

Binary notation is a way of representing numbers using only two digits, 0 and 1. In the video, the instructor demonstrates how IP addresses and subnet masks are converted to binary notation to better understand the network and host portions of the addresses, and how the subnet mask is used to determine the boundary between them.

💡Network Address

The network address, also known as the network ID, is a unique identifier for a specific network or subnet. In the video, the instructor explains that an IP address with all zeros in the host portion (e.g., 192.168.10.0) represents the network address and cannot be assigned to a host.

💡Directed Broadcast Address

The directed broadcast address is a special IP address used to send data to all hosts on a specific subnet. In the video, the instructor mentions that an IP address with all ones in the host portion (e.g., 192.168.10.255) represents the directed broadcast address and cannot be assigned to an individual host because it would send traffic to all hosts on that subnet.

💡Host Address

A host address is a unique identifier assigned to a specific device or host within a network or subnet. In the video, the instructor explains that the host portion of an IP address (e.g., .15 in 192.168.10.15) represents the individual host address, which must be unique on that subnet.

💡Duplicate IP Addresses

Duplicate IP addresses refer to two or more devices on the same network or subnet having the same IP address assigned to them. The video emphasizes that duplicate IP addresses are not allowed, as it would cause confusion for network devices trying to send traffic to that IP address, as they wouldn't know which host to send it to.

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

play00:00

just a quick reminder before we get into

play00:02

the lesson

play00:03

to download the hands-on lab exercises

play00:05

that accompany this complete ccna course

play00:08

i'll include the link in the description

play00:11

also remember to subscribe

play00:13

and hit the notifications bell so you

play00:16

don't miss any of the lessons in the

play00:17

course

play00:18

okay let's get into it

play00:26

in this lecture you're going to learn

play00:29

about

play00:30

subnet masks and you can see what i've

play00:33

done here is i've opened up

play00:35

a command prompt on my windows laptop

play00:38

again

play00:38

and i've entered ipconfig and you can

play00:41

see where i've highlighted it

play00:43

that my ip address is 192.168.10.15.

play00:48

my subnet mask is 255.255.255.0

play00:53

and the default gateway is 192.168.10.

play00:59

so every host in your network is going

play01:01

to know

play01:02

what its ip address its subnet mask

play01:05

and its default gateway is

play01:08

let's now see how it's going to use that

play01:10

information

play01:12

so onto the slides now a host can send

play01:15

traffic directly to another host on the

play01:18

same subnet

play01:20

via the switches that they're attached

play01:22

to

play01:23

but for a host to send traffic to

play01:25

another host in a different subnet

play01:28

it must be forwarded by a router so our

play01:31

routers are devices

play01:33

that link our different subnets together

play01:36

and route the traffic between them

play01:38

the host therefore needs to understand

play01:41

if the destination

play01:43

is on the same or a different subnet in

play01:46

order to know how to send it

play01:48

if the destination is on the same subnet

play01:50

it will send it there

play01:52

directly if it's on a different subnet

play01:55

it knows that it has to send it to the

play01:57

local router

play01:58

which is the default gateway and the way

play02:01

that the host knows

play02:03

whether the destination is on the same

play02:05

subnet or a different subnet

play02:08

is by comparing the ip address

play02:11

of the destination to its

play02:14

own ip address and subnet mask

play02:18

the subnet mask just like the ip address

play02:22

is also 32 bits long and it can be

play02:25

written

play02:26

in dot decimal notation the same as our

play02:28

ip

play02:29

addresses or it can be written in slash

play02:32

notation

play02:33

you'll see how that works a bit later in

play02:35

this lecture

play02:37

a host's ip address is divided into a

play02:40

network portion and a host portion

play02:44

and it's the subnet mask that defines

play02:47

where the boundary is between the

play02:49

network part and the host part of the

play02:51

address

play02:52

and the easiest way to explain how this

play02:55

works is by giving you

play02:56

an example so let's say the host's ip

play03:00

address is

play03:02

192.168.10.50

play03:04

and the subnet mask is 255.255.255.0

play03:09

that's the ip address and subnet mask

play03:11

it's actually on my

play03:12

laptop to figure this out we write

play03:16

the ip address out in binary notation

play03:19

like you learned in the last lecture

play03:20

and then the subnet mask also in binary

play03:23

notation

play03:24

underneath so our example was

play03:28

192.168.10.15

play03:30

subnet mask 255.255.255.0

play03:34

so you see the the top part here i've

play03:36

written

play03:38

192.168.10.15 out in binary

play03:41

and then underneath 255.255.255.0

play03:45

out in binary as well the

play03:49

ip address is compared or masked

play03:53

with the subnet mask a 1 in the subnet

play03:56

mask

play03:56

indicates that bit in the ip address is

play04:00

part of the network address and a zero

play04:03

indicates that the part that the bit is

play04:05

part of

play04:06

the host address so very quickly you can

play04:09

see here

play04:10

all the ones on the subnet mask go up to

play04:13

here

play04:14

everything in the ip address above that

play04:16

is part of the network portion of the

play04:18

address

play04:19

the zeros above that way in the

play04:23

ip address those are part of the host

play04:26

portion of the address let's make this a

play04:28

little bit clearer

play04:30

so subnet mask 255.255.255.0

play04:35

with the subnet mask it's always going

play04:36

to have contiguous ones and you see the

play04:39

ones come up to this part here

play04:41

so i put a line in that line

play04:44

is the border between the network

play04:46

portion and the host portion

play04:48

of the address so in the example the

play04:51

network address portion is 192.168.10

play04:55

because on the ip address from here

play04:58

on the left all the way up to the line

play05:00

that is 192.168.10

play05:03

part of the ip address whatever is

play05:07

after the line is the host portion of

play05:09

the address so in our example is the dot

play05:12

15

play05:12

is the host portion of the address

play05:16

and i've highlighted it there there is

play05:18

the network portion

play05:21

if the host wants to communicate with

play05:23

another

play05:24

host with an ip address which also

play05:26

begins with 192.168.10

play05:29

in our example so say for example

play05:33

that this host wants to send traffic to

play05:35

a destination address of 192.168.10.20

play05:40

it knows it's on the same subnet and it

play05:42

can send the traffic directly

play05:44

because the destination also begins with

play05:48

192.168.10.

play05:50

if this host wants to communicate with

play05:52

another host on

play05:53

any other network anything that does not

play05:56

begin with 192.168.10

play05:58

then it knows it has to send the traffic

play06:01

via a router

play06:02

so if it was sending traffic to

play06:03

destination 192.163

play06:07

for example it doesn't begin with

play06:10

192.168.10

play06:11

it's a different subnet sends it via the

play06:14

router

play06:15

for a destination address to be on the

play06:17

same subnet the network portion has to

play06:20

be

play06:20

exactly 192.168.10.

play06:24

anything else means it's a different

play06:25

subnet we have to go via a router

play06:30

the subnet mask always begins

play06:33

with a contiguous block of ones

play06:37

this is different than the ip address

play06:38

you see our example i p address here

play06:41

it's one one zero zero zero zero zero

play06:43

zero

play06:44

one zero one zero one so with the i ip

play06:47

address the ones and the zeros can be

play06:49

mixed about in pretty much any order the

play06:52

subnet mask

play06:53

is a block of ones and then a block of

play06:56

zeros

play06:56

always we never mix the ones and the

play06:59

zeros up with each other

play07:01

in the subnet mask so one one one one

play07:04

one one one dot one one one one

play07:08

zero zero zero zero dot zero zero zero

play07:11

etcetera is a legal subnet a mask one

play07:14

one one zero one one zero

play07:16

one mixing up the ones and zeros we

play07:18

can't do that that is not a valid subnet

play07:20

mask

play07:23

the host portion of the address is

play07:26

available to be allocated

play07:27

to the different hosts on that

play07:29

particular subnet

play07:31

for example your pcs servers printers

play07:35

router interfaces switch management

play07:37

addresses etc

play07:39

with two exceptions that you'll see

play07:41

coming up after the next slide

play07:44

so there's the host portion of the

play07:46

address for our example highlighted

play07:49

the host portion of the address

play07:51

specifies the individual host

play07:53

and must be unique on that subnet

play07:57

your hosts do not need to be numbered

play07:59

sequentially for example we could have a

play08:01

subnet with two hosts on it

play08:03

one could have addressed 10.10.10.10 the

play08:06

other could have addressed 10.10.10.20.

play08:09

we don't need to number them dot one and

play08:11

dot two

play08:12

you can't have two different hosts both

play08:16

with the same ip address for example we

play08:19

couldn't have two hosts both with

play08:20

address 10.10.10.10

play08:23

that would be a duplicate address and

play08:25

whenever

play08:26

any traffic was sent to 10.10.10.10

play08:29

your network devices wouldn't know which

play08:32

host to send it to so if that's illegal

play08:34

you can't have duplicate ip addresses

play08:37

you could have host 10.10.10.

play08:40

on one subnet and host 10.10.20.10 on a

play08:44

different subnet

play08:45

they're different subnets so it's not a

play08:47

duplicate address that's just fine

play08:51

all zeroes in the host portion

play08:54

designates the network address and is

play08:57

not allowed to be allocated to a host

play08:59

remember we just said

play09:00

a minute ago that there's two particular

play09:04

addresses that cannot be assigned to a

play09:06

host

play09:07

the first one of those is all zeroes in

play09:09

the host portion

play09:11

that designates the network address or

play09:14

the network id

play09:15

in our example the network address would

play09:18

be 192.168.10.0

play09:21

so we fill in the bit pattern in the

play09:23

network portion so that was 192.168.10

play09:27

and then in the host portion we put all

play09:29

zeros in there so all zeros you can't

play09:32

assign it to

play09:33

a host it signifies the

play09:36

network address which is the the bottom

play09:38

address in that particular subnet

play09:42

and there's highlighted there you can

play09:43

see we've used all zeros

play09:46

the other address which cannot be

play09:48

assigned to a host is

play09:50

all ones in the host portion of the

play09:52

address so all

play09:53

zeroes signifies the network address

play09:55

which is the bottom address in the range

play09:58

all ones which is the top address in the

play10:00

range

play10:01

that is the directed broadcast

play10:04

whenever you send traffic to the

play10:06

directed broadcast address

play10:07

it goes to all hosts in that subnet

play10:11

not to an individual host so we can't

play10:13

assign that address to an individual

play10:15

host

play10:16

and there it is highlighted the host

play10:18

portion i've put all ones in there

play10:23

so that leaves 192.168.10.1

play10:27

to 192.168.10.254.

play10:30

in our example available to be allocated

play10:33

to our different hosts so all the

play10:35

different pcs

play10:36

other kinds of hosts maybe we've got

play10:38

some windows pcs some linux pcs

play10:40

in that subnet i can number them from

play10:43

192.168.10.1

play10:44

all the way up to winding 2.168.10.254.

play10:48

they're all in the same subnet whenever

play10:51

they send traffic to each other they can

play10:52

do that directly

play10:54

without going via their default gateway

play10:56

router

play10:58

thanks for watching if you'd like to get

play11:00

the complete course

play11:02

ad free right now then you can enroll in

play11:04

my ccna gold bootcamp

play11:06

by clicking the link above my head or in

play11:09

the description

play11:10

it also includes full study notes

play11:13

quizzes

play11:14

and 150 pages of additional

play11:16

troubleshooting labs

play11:17

you can't find anywhere else

Rate This

5.0 / 5 (0 votes)

Related Tags
NetworkingCCNAIP AddressingSubnettingTutorialInstructionalTechnicalBeginner-FriendlyHands-OnEducational