Subnet Mask - Explained

PowerCert Animated Videos
30 Sept 202117:54

Summary

TLDRThis video script explains the concept of subnet masks in relation to IP addresses, detailing how they divide an IP address into network and host parts. It covers the binary representation of IP addresses and subnet masks, the purpose of subnetting for network manageability, and the impact of borrowing bits on the number of subnets and hosts. It also touches on IP address classes and CIDR notation.

Takeaways

  • 🌐 An IP address is a unique identifier for devices on a network, crucial for communication, and consists of a network address and a host address.
  • 📊 IPv4 addresses are 32-bit numbers, typically written in decimal format as four octets ranging from 0 to 255, each representing 8 bits.
  • 🔍 The subnet mask differentiates the network and host portions of an IP address, and is essential for network segmentation.
  • 👓 Computers interpret IP addresses and subnet masks in binary format, not decimal, which is why understanding binary representation is important.
  • 🛠️ By manipulating bits in the subnet mask, you can create subnets, which are smaller networks within a larger network, improving manageability and reducing broadcast traffic.
  • 🏢 Subnetting is the practice of dividing a large network into smaller, more manageable networks, which can be achieved by altering the subnet mask.
  • 🔄 The default subnet masks for IP address classes A, B, and C are different, affecting the number of available hosts and the size of the network portion.
  • 📈 CIDR notation provides a concise way to express subnet masks by indicating the number of continuous 1s in the mask, such as /24, /25, or /26.
  • 📚 Subnetting allows for efficient allocation of IP addresses, ensuring that the number of hosts per network is appropriate for the organization's needs.
  • 🔑 Understanding subnet masks is fundamental to network design and management, impacting how data is routed and how networks are organized.
  • 🎓 The script also promotes an audiobook for beginners interested in learning more about networking, suggesting additional resources for education.

Q & A

  • What is an IP address and why is it necessary for devices on a network?

    -An IP address is an identifier for a computer or device on a network, essential for communication purposes. It is a 32-bit numeric address written as four numbers separated by periods, with each number, or octet, ranging from 0 to 255. Each device must have a unique IP address to identify itself within the network.

  • How is an IPv4 address structured and what does each part represent?

    -An IPv4 address is structured into two main parts: the network address and the host address. The network address is a unique number assigned to a network, while the host address is assigned to individual devices within that network, ensuring each device has a unique identifier.

  • What is a subnet mask and how does it relate to an IP address?

    -A subnet mask is a 32-bit number that resembles an IP address and indicates how many bits in the IP address are used for the network part. It helps differentiate the network portion from the host portion within an IP address by masking the network part.

  • Why do computers and networks need to understand IP addresses and subnet masks in binary format?

    -Computers and networks understand data in binary format, consisting of 1s and 0s, because it is the fundamental language of computation. IP addresses and subnet masks must be converted to binary for computers to process and make sense of the network structure and communication paths.

  • How can you convert an IP address or subnet mask into its binary form?

    -To convert an IP address or subnet mask into binary, you use an 8-bit octet chart to determine which bits should be set to 1 to represent the decimal number in each octet. The sum of the values represented by the 1s gives the decimal equivalent of that octet.

  • What is the purpose of having both a network and a host part in an IP address?

    -The division into a network and a host part allows for the logical segmentation of large networks into smaller subnetworks or subnets. This is done to improve manageability, reduce broadcast traffic, and enable more efficient routing of data within the network.

  • Why is subnetting important in network management?

    -Subnetting is important for breaking down large networks into smaller, more manageable subnetworks. It helps control broadcast traffic, enhances security by isolating network segments, and allows for more efficient allocation of IP addresses.

  • How does the subnet mask indicate the division between the network and host portions of an IP address?

    -The subnet mask uses binary 1s to indicate the network portion of the IP address. By aligning the binary representations of the IP address and subnet mask, the positions of the 1s in the subnet mask reveal the network portion, while the remaining bits represent the host portion.

  • What is the significance of the different classes of IP addresses (A, B, and C) in terms of network size and host capacity?

    -IP address classes determine the size of the network and the number of hosts it can support. Class A addresses are for very large networks with up to 16 million hosts, class B for medium to large networks with up to 65,000 hosts, and class C for smaller networks with up to 254 hosts.

  • What is CIDR notation and how does it simplify the representation of subnet masks?

    -CIDR (Classless Inter-Domain Routing) notation is a method to express subnet masks by using a forward slash followed by a number that counts the consecutive 1s in the subnet mask. This notation simplifies the representation by eliminating the need to write out the full 32-bit subnet mask.

Outlines

00:00

🌐 Understanding Subnet Masks and IP Addresses

This paragraph introduces the concept of subnet masks in the context of IP addresses, which are essential identifiers for devices on a network. It explains that an IP address, specifically IPv4, is a 32-bit numeric address divided into four octets ranging from 0 to 255. The address is split into a network address, unique to each network, and a host address, unique to each device within that network. The subnet mask is highlighted as a critical tool that differentiates between the network and host portions of an IP address. The explanation transitions into how these addresses are represented in binary, the format computers and networks understand, and how binary values are derived from the decimal IP addresses and subnet masks using an 8-bit octet chart.

05:03

🔍 Binary Representation of Subnet Masks and IP Addresses

The paragraph delves into the binary representation of both IP addresses and subnet masks. It describes the process of converting decimal numbers into binary format, using the 8-bit octet chart to assign 1s and 0s to represent the values that sum up to the decimal number. The binary form is essential as it is the language of computers and networks. The paragraph also illustrates how to determine the network and host parts of an IP address using the binary form of the subnet mask, by aligning and masking the IP address with the subnet mask to identify the network portion. Examples are given to demonstrate how different subnet masks can define varying sizes of network and host portions.

10:08

🏢 The Purpose of Network and Host Partitioning

This section discusses the rationale behind partitioning a large network into smaller subnetworks for better manageability. It explains the concept of subnetting and how it helps in reducing broadcast traffic and improving network efficiency. The paragraph uses the analogy of a large organization with many computers to illustrate the problem of excessive broadcast traffic in a single large network and how dividing the network into smaller segments using routers can alleviate this issue. It emphasizes the importance of the network portion of an IP address in this process, allowing for logical separation and more efficient routing of data within an organization.

15:08

🛠 Subnetting Process and CIDR Notation

The final paragraph explains the process of subnetting, which involves borrowing bits from the host portion of the subnet mask to create additional networks. It demonstrates how changing the subnet mask can result in a different number of subnets with varying host capacities. The paragraph provides examples of how to calculate the new number of subnets and hosts per subnet when borrowing bits. It also introduces the concept of CIDR notation, a more concise way to express subnet masks by counting the number of continuous 1s in the mask. The paragraph concludes with an overview of IP address classes and their respective default subnet masks, explaining which class of IP address is suitable for organizations of different sizes based on their host requirements.

Mindmap

Keywords

💡Subnet Mask

A subnet mask is a 32-bit number that, like an IP address, is divided into four octets. It is used to differentiate the network and host portions of an IP address, allowing a network to be divided into smaller subnetworks or subnets. In the video, the subnet mask is essential for understanding how to segment a large network into manageable pieces, preventing broadcast traffic from overwhelming the network.

💡IP Address

An IP address is a numerical identifier assigned to each device connected to a network that uses the Internet Protocol for communication. In the video, it is explained that an IPv4 address is a 32-bit number, typically written as four decimal numbers separated by periods, each ranging from 0 to 255. The IP address consists of a network address and a host address, which are distinguished by the subnet mask.

💡Network Address

The network address is the portion of an IP address that represents the specific network to which a device is connected. In the context of the video, the network address is identified by the subnet mask, which reveals how many bits of the IP address are designated for the network, ensuring that each network has a unique identifier.

💡Host Address

The host address is the part of an IP address that identifies an individual device within a network. As explained in the video, the host address, along with the network address, makes up the full IP address, and it is crucial for devices to communicate with each other on the network.

💡Binary Format

Binary format refers to the representation of data using only two symbols, 1 and 0, which is the language of computers. In the video, the conversion of IP addresses and subnet masks into binary format is discussed to illustrate how computers understand and process these addresses, with the binary digits indicating the network and host portions.

💡Octet

An octet is one of the four 8-bit sections of an IP address, ranging from 0 to 255. The video script describes how each number in an IP address is separated by periods, forming octets, and how these octets are converted into binary to determine the network and host parts.

💡Subnetting

Subnetting is the process of dividing a larger network into smaller, more manageable networks known as subnets. The video explains that subnetting is achieved by manipulating the subnet mask to create additional networks while reducing the number of available host addresses in each.

💡Broadcast

A broadcast in networking is a transmission of data that is intended for all devices on a network. The video discusses how broadcasts can cause excessive traffic in large networks, which is why subnetting is used to limit broadcasts to specific subnets, improving network efficiency and manageability.

💡Router

A router is a device that forwards data packets between computer networks. In the video, routers are highlighted as the means by which networks are physically separated into subnets, preventing broadcasts from traversing beyond their intended network and ensuring efficient data routing.

💡CIDR Notation

CIDR (Classless Inter-Domain Routing) notation is a method of specifying the number of bits used for the network part of an IP address. The video script mentions CIDR as a shorthand way to denote subnet masks, with a forward slash followed by a number indicating the length of the network prefix, simplifying the representation of subnet masks.

💡IP Address Classes

IP address classes categorize IP addresses based on the size of the network and host portions. The video script discusses classes A, B, and C, each with a different range of possible hosts, from millions for class A to 254 for class C, and their respective default subnet masks, illustrating how organizations choose a class based on their size and host requirements.

Highlights

A subnet mask is a number that reveals how many bits in an IP address are used for the network.

IP addresses and subnet masks are read in binary format by computers and networks, not decimal.

An IP address consists of a network address and a host address, serving different purposes within a network.

Binary representation is crucial for understanding how subnet masks differentiate network and host portions of an IP address.

Subnet masks are used to logically break down large networks into smaller subnetworks for better manageability.

Broadcasts are limited to within a network, which is important for managing traffic and isolating network issues.

Subnetting improves network efficiency by reducing broadcast traffic and simplifying network management.

The process of subnetting involves borrowing bits from the host portion of an IP address to create more networks.

Each borrowed bit doubles the number of networks that can be created while halving the number of hosts per network.

Different classes of IP addresses (A, B, C) are suitable for organizations based on the number of hosts they require.

Class A, B, and C IP addresses have different default subnet masks that determine the number of potential hosts.

CIDR notation provides a concise way to express subnet masks by counting the number of 1s in binary form.

Understanding subnet masks is fundamental for network administrators managing IP address allocation and network design.

The video provides practical examples of how subnetting can be applied in business scenarios to segment network traffic.

A detailed explanation of converting decimal IP addresses and subnet masks to binary to understand network and host portions.

An introduction to Amazon Audible for beginners interested in learning more about networking, with a free audiobook offer.

Transcripts

play00:00

What is a subnet mask? So that is a topic of this  video. Now before we talk about what a subnet mask is

play00:06

we must first talk about what an IP address  is. An IP address is an identifier for a computer  

play00:13

or device on a network. Every device has to  have an IP address for communication purposes.  

play00:19

And to be specific, I'm talking about an IPv4  address. An IPv4 address is a 32-bit numeric  

play00:28

address, written as four numbers, separated  by periods. Each group of numbers that are  

play00:33

separated by periods is called an octet. The  number range in each octet is from 0 - 255.  

play00:41

An IP address consists of two parts. The first  part is the network address and the second part is  

play00:47

the host address. The network address or network  ID is a number that's assigned to a network.  

play00:54

So every network will have a unique address. The  host address or host id is what's assigned to hosts  

play01:01

within that network such as computers, servers,  tablets, routers, and so on. So every host will  

play01:08

have a unique host address. Now the way to tell  which portion of the IP address is the network  

play01:15

or the host, is where the subnet mask comes in.  A subnet mask is a number that resembles an IP  

play01:21

address. And it reveals how many bits in the IP  address are used for the network by masking the  

play01:28

network portion of the IP address. Now in the  world of computers and networks, IP addresses  

play01:35

and subnet masks in this decimal format here  are meaningless. And this is because computers  

play01:41

and networks don't read them in this format and  that's because they only understand numbers in a  

play01:47

binary format, which are 1s and 0s. And these  are called bits. So the binary number for this IP  

play01:54

address is this number here. And the binary  number for this subnet mask is this number.  

play02:00

And these are the numbers that computers and  networks only understand. So the next question is,  

play02:06

how do we get these binary numbers from this IP  address and this subnet mask? So here we have an  

play02:14

8 bit octet chart. The bits in each octet are  represented by a number. So starting from the  

play02:20

right, the first bit has a value of 1 and then  the number doubles with each step. So there's 2  

play02:26

then 4, 8, and so on, all the way up to 128. Each  bit in the octet can be either a 1 or a 0. If the  

play02:35

number is a 1 then the number that it represents  counts. If the number is a 0 then the number that  

play02:42

it represents does not count. So by manipulating  the 1s and 0s in the octet you can come up with  

play02:48

a number range from 0 - 255. So for example,  the first octet in this IP address is 192. 

play02:58

So how do we get a binary number out of 192? First  you look at the octet chart and then you will  

play03:04

put 1s under the numbers that would add up to the  total of 192. So you would put a 1 in the 128 slot  

play03:12

and then a 1 in the 64 slot. So now if we count  all the numbers that we have 1s underneath them,  

play03:19

you would get a total of 192. All of the other  bits would be 0s because we don't need to count  

play03:25

them since we already have our number. So this  number here is the binary bit version of 192.

play03:33

So let's do the next octet which is  168. So let's put a 1 under 128, 32,  

play03:41

and 8. And then all the rest would be 0s. So if  we were to add all the numbers that we have 1s  

play03:47

underneath them we would get a total of 168.  The next octet is 1. So we'll put a 1 in the 1  

play03:55

slot and when you add up only 1 you get 1. And  the last octet is 0, which makes things simple  

play04:04

because all the binary numbers would be all 0s.  So here is the binary number for our IP address.

play04:12

Now the subnet mask binary conversion is  exactly the same way. So in this subnet  

play04:18

mask the first 3 octets are 255. So if we  were to look at this subnet mask in binary form,  

play04:24

the first 3 octets would be all 1s  because when you count all the numbers  

play04:29

in an octet it will equal 255. And  then the last octet would be all 0s.

play04:37

So here we have our IP address and subnet mask  in binary form lined up together. So the way  

play04:44

to tell which portion of this IP address is the  network part, is when the subnet mask binary digit  

play04:51

is a 1 it will indicate the position of the  IP address that defines the network. So we'll  

play04:57

cross out all the digits in the IP address  that line up with the 1s in the subnet mask.  

play05:03

And when you do this it will reveal that the  first 3 octets of the IP address is the  

play05:08

network portion and the remaining is the  host portion. So the 1s in the subnet mask  

play05:15

indicate the network address and the 0s indicate  the host addresses. So in another example let's  

play05:23

use a different IP address and subnet mask and  let's put them in binary form. So in this example  

play05:29

the first 2 octets are 255 and the last  2 octets are 0. So if we cross out all the  

play05:35

digits in the IP address that line up with  the 1s in the subnet mask, we'll see that  

play05:41

the first 2 octets is the network portion  and the last 2 octets is the host portion.

play05:49

And let's do one more, and in this subnet mask  the first octet is 255 and the rest are 0.  

play05:56

And then we'll cross out all the digits again, and  this time it reveals that the first octet is the  

play06:01

network portion and the last 3 octets are for  hosts. Now figuring out the network and host parts  

play06:09

of an IP address using these default subnet masks  was simple. Because as I stated before, when you  

play06:15

count all the numbers in an octet it will equal  255. So we automatically know that the numbers  

play06:22

in the octet are all 1s, so we really didn't  have to see the IP address or subnet mask in  

play06:28

its binary format because it's so simple. But  what if the subnet mask was this number here  

play06:35

where the first two octets are 255 but the  third octet is 224? So this is a little trickier.  

play06:42

So here is the binary number for this subnet mask. The first two octets are all 1s and in the third  

play06:50

octet, the first three bits are 1s which will  equal 224, because starting from the left, when  

play06:56

you add the first 3 bits in an octet it adds  up to 224. So let's put this subnet mask and IP  

play07:04

address in its binary format. And again if we cross  out all the digits in the IP address that line up  

play07:11

with the 1s in the subnet mask, we'll see that  in the IP address, the first 2 octets and the  

play07:17

first 3 bits in the third octet is the network  part and the 13 remaining bits are used for hosts.  

play07:26

So another question is, why does an IP address have  a network and a host part? Why can't it just have  

play07:33

a host part to uniquely assign each device an IP  address? So why does it have a network part also?  

play07:40

Now the reason for this is manageability. It's  for breaking down a large network into smaller  

play07:46

networks or sub networks, which is known as  subnetting. So for example let's say that  

play07:53

there were no small networks. Let's say that an  organization has a large amount of computers  

play07:58

in one huge network. Now when a computer wants to talk to another computer, it needs to know how  

play08:06

and where to reach that computer. And it does this by using a broadcast. A broadcast is when a computer  

play08:12

sends out data to all computers on a network  so it can locate and talk to a certain computer.  

play08:19

So for example let's say that this computer here  wanted to communicate with this computer over here  

play08:25

So what happens next is that this computer  here will send out a broadcast out on the  

play08:30

network asking the target computer to identify  itself so it can communicate with it. But the  

play08:36

problem with this is that every computer on this  network will also receive the broadcast because  

play08:42

they are all on the same network. So as you can  imagine, if every computer on this large network  

play08:49

was broadcasting to every other computer, just to  communicate, it would be chaos. It would slow down  

play08:56

the network and potentially bring it to a halt  because of the tremendous amount of broadcast  

play09:01

traffic it would cause. And it might even cause  fires, well not really but, and if a problem were to  

play09:08

happen on the network it would be very difficult  to pinpoint because the network is so big. So in  

play09:15

order to prevent this networks need to be broken  down into smaller networks and networks are broken  

play09:21

down and physically separated by using routers. And  by using routers this would alleviate the problem  

play09:28

of excessive traffic because broadcasts do not go  past routers. Broadcasts only stay within a network  

play09:36

So now instead of one large network, this network  is broken down into 6 subnetworks or subnets.  

play09:44

So now if this computer here wanted to communicate  with this computer over here, the computer will  

play09:49

send out a broadcast that only the computers in  its subnetwork can receive. But since the target  

play09:56

computer is on a different subnetwork here,  the data will be sent to the default gateway,

play10:02

which is the router, and then the router will  intelligently route the data to the destination.  

play10:07

So this is why IP addresses have a network  portion and a host portion, so networks can  

play10:14

be logically broken down into smaller  networks which is known as subnetting.  

play10:20

Hey guys I just want to break in here and tell you  that if you're a beginner and you want to learn  

play10:25

more about networking, I highly recommend  an audio book that will help you do that.  

play10:29

I linked it in the description below and  you can download and listen to it for free.  

play10:34

Just get the book by signing up for the free  30-day trial of Amazon audible premium plus.  

play10:39

But even if you cancel your audible membership at  any time during the 30 days, the audio book is still  

play10:46

yours to keep forever without paying anything.  So just click the amazon affiliate link below  

play10:52

and by doing that you'll also be supporting my  channel because I still get commission even if  

play10:56

you decide to cancel. So once again it's completely  free and thank you. So let's do an example here, so  

play11:03

let's say that you have a small business and  that this is your IP address and subnet mask  

play11:09

Now let's say that your small business has a total  of 12 computers and all 12 of these computers are  

play11:15

on a single network. And these computers belong to  different departments indicated by their colors  

play11:21

But let's say that you wanted to separate  the computers into 3 different networks  

play11:25

So that each department won't see the other  department's network traffic. So instead of  

play11:30

having 1 network in your business, you want  to break it down into 3 small networks.  

play11:36

So the way to break this network down into smaller  networks is by subnetting. Subnetting is done by  

play11:42

changing the default subnet mask by borrowing  some of the bits that were designated for hosts  

play11:48

and using them to create subnets. So in  this subnet mask we're going to change  

play11:54

some of the 0s in the host portion into 1s  so we can create more networks. So if we leave  

play12:01

the subnet mask the way it is, it will give us 1  network with 256 hosts. Now technically we have  

play12:08

to subtract 2 hosts because the values that are  all 1s and 0s are reserved for the broadcast  

play12:14

and network address respectively, so we actually  have 254 usable hosts. But we need to change  

play12:21

this subnet mask so we can produce the 3  networks that we need. So for example let's  

play12:26

borrow 1 bit from the host portion. So here  is our new subnet mask. So now the fourth octet  

play12:33

is 128 because when you count the first bit in  an octet it equals 128. So by borrowing 1 bit  

play12:40

this will divide the network in half. So now  instead of having 1 network with 254 hosts  

play12:47

this will give us 2 networks or subnets with  126 hosts in each subnet. Now let's keep going  

play12:55

and borrow another bit from the host portion. So  now we are borrowing a total of 2 bits from the  

play13:01

host portion. So here is our new subnet mask, and  the fourth octet is 192. So by borrowing 2 bits  

play13:08

this will divide the network even further and  now it'll give us 4 subnets with 62 hosts each.  

play13:16

And again let's borrow another bit from the  host portion. So here is our new subnet mask.  

play13:22

And by borrowing 3 bits this will divide the  network into 8 subnets with 30 hosts each. 

play13:30

So if we continue breaking down this network,  here is the result if we borrow 4 bits  

play13:35

which will give us 16 subnets with 14 hosts  each. And here is the result if we borrow 5 bits  

play13:43

which will give us 32 subnets with 6 hosts each.  And if we borrow 6 bits this will give us 64  

play13:51

subnets with 2 hosts in each subnet. Now  this is pretty much the limit because if we  

play13:57

borrow 7 bits it will give us 128 subnets  but with 0 usable hosts. So as you can see  

play14:05

the more bits the network portion borrows from  the host portion, the amount of networks that can  

play14:11

be created doubles with each bit. But also the  amount of hosts per network gets cut in half  

play14:17

with each bit. So going back to our business  example, if we wanted to break this network down  

play14:23

into 3 smaller networks or subnets we would  have to borrow 2 bits from the host portion.  

play14:29

so even though we only need 3 networks, this  subnet mask will give us at least 4 networks  

play14:34

to work with. So our new custom subnet mask  for our 3 subnets would be 255.255.255.192

play14:44

So now our network is broken down  into 3 smaller networks or subnets.  

play14:50

Now just to be clear, this video is about subnet  masks. This is not a full lesson on subnetting  

play14:56

because there's a little more to subnetting than  what I showed you here. I'm just showing you how  

play15:00

subnet masks relate to subnetting. Now IP addresses and subnet masks come in 5 different classes.  

play15:08

Which are classes A - E. However 3 of  these classes are for commercial use. So here is a  

play15:14

chart of the IP addresses and default subnet masks  which are class A, B, and C. And you can tell by the  

play15:21

number in the first octet of the IP address and by  the default subnet mask which class they belong to  

play15:29

Now when an organization needs networking they  will need an IP address class according to the  

play15:35

needs of that organization, which is based on how  many hosts they have. So if an organization has a  

play15:42

very large amount of hosts, they will need a class  A IP address. A class A IP address can produce up  

play15:49

to 16 million hosts. So as you can see, in a default  class A subnet mask, the host part is very large  

play15:57

3 octets are used for hosts which is  why it can produce so many. An example of an  

play16:03

organization that would need this many hosts  would be something like an internet service  

play16:08

provider, because they would need to distribute  millions of IP addresses to all their customers.  

play16:15

A class B IP address can produce up to 65,000  hosts. This class is given to medium  

play16:21

to large organizations. And a class C IP address can produce 254 hosts. Class C IP  

play16:29

addresses are used in small organizations  and homes that don't have a lot of hosts.

play16:38

Now subnet masks can also be expressed in  a different method called CIDR and CIDR 

play16:44

stands for classless inter-domain routing, which  is also known as slash notation. Slash notation  

play16:50

is a shorter way to write a subnet mask. And it  does this by writing a forward slash and then a  

play16:56

number counting the 1s in the subnet mask. So for  example if you see an IP address like this, with  

play17:03

a CIDR notation of /24 this means that the  subnet mask is 24 bits in length, meaning it has 24  

play17:11

1s. If the CIDR notation is /25 this  means that the subnet mask is 25 bits in length  

play17:19

Or if it's /26 this means that the  subnet mask is 26 bits in length. Or if  

play17:25

the cider notation is /8 this means  that the subnet mask is 8 bits in length

play17:34

So I want to thank you all for watching  this video on subnet masks. Don't forget  

play17:38

to subscribe and get the audio book for free using  the link below. And I'll see you in the next video.

Rate This

5.0 / 5 (0 votes)

Related Tags
Subnet MaskIP AddressNetwork IDHost IDBinary FormatOctet ChartClassful RoutingCIDR NotationSubnettingNetwork ManagementIPv4