What you'll learn
- Explain why teams divide one large IPv4 network into smaller subnets, including security filtering and separating IoT devices from servers
- Calculate how many bits to extend a subnet mask to create a required number of subnets, such as moving a /24 to a /28 for 16 subnets
- Identify the new subnet IDs, valid host ranges, and broadcast addresses created from a parent network like 10.67.83.0/24
- Calculate the number of usable hosts per subnet and explain why the network and broadcast addresses cannot be assigned to an interface
- Configure IP addresses from a subnetting plan on Cisco router interfaces and verify them with show ip interface brief
- Verify end-to-end reachability across subnets from a Windows client using ping and tracert with the -d option
Free 78-minute video lesson with a full transcript and knowledge checks. No account needed to watch.
Intro to IPv4 Subnetting
Welcome to the world of subdividing a single IPv4 network into multiple smaller subnetworks.
IPv4 Subnetting Overview
This video explains the concept of dividing a single IPv4 network into smaller ones using subnetting.
Knowledge Check
What best describes IPv4 subnetting?
Making the Mask Longer
When using IPv4 subnetting, we lengthen the mask, reallocating some of the host bits as network bits.
Knowledge Check
What is used to indicate that the boundary between network bits (on the left) and host bits (on the right) has moved?
How Many Bits to Take and the Finger Game
When creating subnets, we move the mask to reallocate some host bits as network ID bits. The question arises regarding "how many host bits should be reallocated?" This video answers that question with a game called the Finger Game.
Knowledge Check
Starting with a /24, we need to create 5 new subnets. What is the minimum number of host bits to reallocate to network bits to support at least 5 new subnets?
Knowledge Check
Match the following items, regarding the finger game.
This interactive assessment is available in the full learning experience.
Identify the New Subnet IDs
Once the mask is moved to the right to allow the creation of new IPv4 subnets, the next question to answer is, "What are the network IDs for those new subnets?" This video walks through how to do precisely that.
Knowledge Check
What is the block size/increment for subnets with a /26 mask?
Ranges for Subnets
Now that we know the network IDs for the new subnets let's determine the range for each subnet.
Knowledge Check
When beginning with a /24, and extending the mask to a /27, what is the block size/increment for the new subnets?
Knowledge Check
Starting with 20.30.40.0 /24, and changing the mask to a /27, list the first 5 networks, in order.
This interactive assessment is available in the full learning experience.
Calculating the Number of Hosts per Subnet
As host bits are reallocated as network bits, fewer host bits are available for host addressing. In this video, we look at how to determine how many hosts can fit onto a subnet based on the number of host bits available.
To determine the number/quantity of usable host addresses for a subnet, use the finger game -2. That is because of the two reserved addresses in the subnet range: the Subnet ID and the Broadcast address for that subnet.
Knowledge Check
On a /27 subnet with 5 host bits available, how many usable host addresses are available?
Subnetting Scenario
To reinforce this skill, let's create a subnetting scenario.
Knowledge Check
If beginning with 5.6.7.0 /24, and using 5 additional bits for subnetting, what is the first subnet?
Knowledge Check
For the subnet 10.67.83.32 /28, which of the following are valid IP addresses that can be configured on an interface? (Choose two)
Select all that apply.
Implementing our IP Subnet Addressing
One way to verify a subnet plan is to implement it in a network, and this video shows us how to do that.
Knowledge Check
Match the Cisco CLI commands with its function.
This interactive assessment is available in the full learning experience.
Validation
Let’s validate our knowledge with a hands-on lab.
(Note from Keith: I updated the video presentation for the Lab, as well as the walkthrough, on July 9, 2024. Have fun. 🙂)
You can go ahead and launch the lab here. 👇🏽
Useful commands for the lab 👇🏽
! Cisco Routers
# show ip int brief
# show ip route
# show ip route connected
(config-if)# no shutdown
(config-if)# ip address 10.67.83.# 255.255.255.240
! Windows Client
ping 10.67.83.130
tracert -d 10.67.83.130
! Server at 10.67.83.130
When you are ready, join me in this video for a walkthrough. 👇🏽
Topology with IP subnet labels 👇🏼
Knowledge Check
What is the subnet mask for a /28 network?
View Transcript
Intro to IPv4 Subnetting
0:00Hello, and welcome. My name is Keith Barker, and in this skill we're gonna focus on the concept of IPv4 Subnetting. And that involves, first of all, identifying what is it and why do I care? Secondly, how to calculate and create logical IP subnets. And then third, I'm gonna put you in a hands-on lab, so you can not only confirm your understanding of the subnetting, but also confirm your ability to actually configure and implement it in an IP network using Cisco gear. So that's our lineup for what we have in store. I'll see you, my friend, in the next video.
IPv4 Subnetting Overview
0:00So to help us better understand the concept of what exactly is an IPv4 subnet, let's talk about something that we're probably already familiar with, and that is a city or a town with streets and various street names and so forth. So we'll call this a city plan, similar to what we did in a previous skill as we took a look at the foundation basics of IP addressing. And for this scenario, however, what I'd like to do is take one street, we'll call it 10th Street, and then we've got some houses on that street. So I'll put a couple here and a couple here and a couple here.
0:31This is how we're addressing all these devices live on the same street and then they have individual house numbers. For example, this could be 50 and 51 and 52 and 100, although that's a big jump for two houses that are right next to each other. Then over here, let's go to use 61 and 62, but they all live on 10th Street. So their addresses would all include 10th Street 'cause they're on the same street and then they'd have their individual house numbers. So at that plan in mind regarding 10th Street, all of a sudden, somebody comes up to us and says, "you know what? Instead of having, you know, one giant 10th street, what we'd love you to do is to go ahead and create three smaller and unique streets."
1:06So just to confirm, we say to them, "okay, you wanna take this one large street that we're planning out and instead of having one big street, you want three streets?" And they say yes. And then we ask them, "can we use any name we want for those new streets?" And they say, "nope, you have to all kind of make it fit or be similar to 10th Street because we don't have any numbers outside of 10th Street that we can give you." So as far as our plan goes, this is the before, here up on top with one giant street. And next let's go ahead and put in the after. So it might seem like an impossible task that you know, how can we make three different streets or three substreets out of 10th Street, but it'd be pretty easy to do.
1:42And here's how we could pull it off. First of all, we create the three logical streets and we'll put a couple houses on each street. And now comes the big question of what do we call these streets? Because if we have to use 10th Street for all of it, how can we make them unique? It goes something like this. Why don't we call this street right here, 10th Avenue and this street right here, let's call it 10th Lane. And for this one over here on the right, let's go ahead and call this 10th Court. So now we have unique names for each of 'em 'cause we can say 10th Avenue or 10th Lane or 10th Court.
2:14And then the houses inside of 10th Avenue, if they wanna talk to each other, they'd be responsible for delivering those messages directly. And the same thing here for these two houses on 10th Lane. And the same thing for these houses here on 10th Court. However, if they wanna send messages, for example, from 10th Court or to 10th lane, or from 10th Avenue to 10th Lane or 10th Court, we're gonna need some help. So to assist in that, we're gonna have these devices that can actually route between the different streets. So this is gonna be router one and router two. And I know I'm breaking the analogy a little bit because that's literally what's happening here.
2:45The routers are directly connected to the various streets and they can make the routing decisions. So then for the actual host addresses or house numbers, this could be 10 and this could be 11 and maybe the router is gonna be .1 here, that would be their default gateway. And maybe over here on 10th lane, we have the host addressing for R1.18 and maybe R2 is .19. And then over here on the connection over here to 10th Court, which R2 is connected to, maybe over here, it's using house address 35. So fill in the other house numbers.
3:16Maybe this is 20 and 21, over here, maybe this is 40 and 41. So with this design, this plan in place, we go back to the people we report to at the city. We say "we did it." And they say, "you did what?" And we say, "well, we took the 10th Street, which was gonna be one giant street and we subdivided it into 10th Avenue and 10th Lane and 10th Court." And so now for the million dollar reveal, what has this got to do with IP subnetting? And the answer is, it's exactly the same because what we're doing with IP Subnetting is we're taking one network and let's go ahead and use 10.67.83.0 with a 24 bit mass.
3:54That is what I like to call the parent's network. And if we are required to create three logical networks outta this address space, that's what the process of IPv4 subnetting does for us. It lets us take this parent network addressing space and then further subdivided into logical, smaller subnets.
Making the Mask Longer
0:00In this video you and I get to take look at the mechanism that's used to take one bigger network and then chop it up into smaller subnets. And in preparation for that, let me also go ahead and just review with you a couple of the basics regarding an IPv4 address. Also, there's a couple of skills previous to this regarding the fundamentals of IPv4, which I'm also encouraging you if you haven't already to take a look at those first before we continue on with the subnetting. So presuming a basic knowledge of IPv4 from those previous skills, let's do a quick review. Here we have an example of an IPv4 network, 10.67.83.0 with a 24 bit mask.
0:36It's in dotted decimal and behind the scenes that decimal number is really representing eight bits, so I've put the eight bits here in the same color and I put a little space between the first four and the second four in this one number, just for readability purposes. And just as a quick reminder, if we ever need to convert decimal to binary, we simply write out this string of numbers right here. This is the eight bit positions in a byte of data starting with on the right we have one, and you just keep doubling it, doubling it, doubling it, all the way 'till we get to the eighth position here and it has a value of 128.
1:07So we did cover this in a previous skill but just as a quick review, if we wanted to break down 10 into binary, we play the game, can I subtract this? We're talking about can I subtract this value from the current number, so we have 10. And then we ask ourselves the question, can we subtract 128 from 10. The answer is no, so with binary, a one, think of it like a yes, and a zero, think of it like a no, like a light switch, on or off. And then we go to the next position here, 64. Can we subtract 64 from 10? Nope, we can't subtract 32, we can't subtract 16, but we can subtract eight, so we go ahead and put a yes there and then we do the math.
1:42Subtract eight and the remainder is two, so we continue on with our game, can I subtract four from the remainder? Nope. Can I subtract two from that remainder? The answer is yep, so we'll do the math, subtract two, the remainder is zero. So over here I put a one indicating I can subtract that two and then I put a zero here for the one's position. So that's how we can convert a decimal number into binary. So here's the result of that conversion. And here's that same result right here. Zero, zero, zero, zero, one, zero, one, zero, and let's also do one more example of that with 67.
2:14So I'll put 67 right here and we'll play the game. Can I subtract this from that decimal number? So 128, I can't take that away from 67 without going negative, so that's no, and for 64, the answer is yes I can, so we'll do the math, minus 64 and the remainder is three. So for that remainder, 32 can't be taken away from that nor can 16, nor can eight, nor can four. However, two can, so we'll go ahead and put a one there. We'll subtract two. Now we have a remainder of one, so we'll put a bit on there in that position. We'll do our math, minus one, and the goal here is to get to zero and we've done that, so for 67 the binary equivalent is zero, one, zero, zero, as shown right here, followed by zero, zero, one, one, as shown right here.
2:54And then we can continue that for the 83 as well using the same process. And then for the mask for this network, I wrote it out as /24 which means the first 24 contiguous bits are on, so we can put a dividing line right there and everything to the left represents the network address space and everything to the right is available for host addressing, and if we wrote the mask out in dotted decimal it'd be 255, dot 255, dot 255, dot zero. And if we ever needed to convert from binary over to decimal, we'd go ahead and simply put in a value, so if our mask is this, one, one, one, one, one, one, one, one we simply add up all those values.
3:33128 plus 64 plus 32 plus 16 plus eight plus four plus two plus one and that equals 255. So here a /24 simply means we have 24 contiguous bits in binary that are on and when those on bits stop so does the network portion and that means the rest of the address space or to the right of that line is the host addressing. So this address right here represents a network ID. The 10.67.83.0 network with a 24 bit mask. All right so now that we've had some fun with a quick review of binary to decimal and decimal to binary, and that IPv4 addresses are written in dotted decimals, but behind the scenes they're actually representing 32 bits and that the mask is the dividing line between the network portion on the left and the host portion on the right, let's talk about creating subnets.
4:18To create subnets, let's imagine that we've been given this network to use, and we've been told by the city planner or the network planner, "Hey everything you want "to create has to be created within this address space, "10.67.83." So by default here this is just one network, a 24 bit network, but what they're asking us to do is to create logical subnets. Now why would we ever want to take one giant street like this or one giant network and chop it up and do smaller networks? And there's lots of reasons.
4:48One is we don't want to have thousands of devices on a single network. Some of those reasons involve giant broadcast of (indistinct) where one device on the network sends a broadcast and everybody else on that network has to listen like an arp request, that's an example of a broadcast. We also may have some security concerns where we wanna have a firewall or a router with an attitude with some filtering in place that's restricting certain types of traffic between networks, and so by taking one giant network and then chopping it up into, for example, three networks, network A here, and network B here, and network C here, any traffic that's trying to go between those networks has to go through a layer three device, like a router or a firewall.
5:28So there's lots of great reasons why we might want to carve up our networks into smaller sections, or another example would be, we have an internet of things subnet for all of our internet things devices, because we want to keep them separate, for example, from our servers. So we could have one subnet that has all of our internet of things devices, we have another subnet maybe with our servers, and yet another subnet for a specific group in the company, like human resources or sales or some other department, and for the main emphasis of this video regarding how we're gonna do that, we are simply gonna go ahead and move to the right the mask, meaning the mask boundary.
6:03So currently if the mask boundary is right here, that's where all the one's stop in the mask, we're simply gonna go ahead and extend that mask and we're gonna take some of these bits that previously are gonna be used for host addressing and instead of allocating all of those for host addressing we're gonna take a few more of those to use for creating logical subnets. So let me give you an example of exactly what that looks like, so let's imagine that instead of having the mask right here between the 24th bit and the 25th bit, let's move the mask right here.
6:34And one of the important aspects is how do you indicate that you've moved the mask? And that is you just change the value here, so instead of this being a /24, which it was, now if we have three more bits, it'd be 25, 26, 27. So I'm gonna go ahead and simply modify that to 27 for the mask and that also means that in binary the mask would change to this. It'd be three bits that are on there and then the remaining five bits would still be left as zeroes indicating that's the new dividing line. So we have this parent address space of 10.67.83 and now we have additional bits here in this fourth octet, specifically these three bits right here that we can now play with and create logical subnetworks and also before we leave this video, I like to confirm that thought regarding moving the masks to the right, let's imagine we have a /16 mask and we want to move the mask three bits to the right.
7:24What would the new mask be in a slash notation? This is also sometimes referred to as a sider notation for classless interdomain routing. So that's the fancy way of saying that representation of the mask, but if we had a /16 bit mask and we're adding three more bits above and beyond that, the new mask would be 19, or if we started with a /22, and we need to add five more bits for the benefit of using IP subnetting and the new mask would be 22 plus five more, which would be 27. If we are going to do custom subnetting and create logical, new subnets from a parent network, the key is we are gonna move the mask to the right one or more bits, and whenever we configure an IP address on a device, we'll just simply specify that new mask.
8:09And that way the computers and the routers and the other devices that are using IPv4, they know exactly where that dividing line is.
How Many Bits to Take and the Finger Game
0:00So from the previous video, we now know that if we're doing custom subnetting, we're gonna take the original mask and we are going to grow it by one bit or by two bits or by three bits or by four bits. But where are we taking them away from? If we're starting here, that means we're taking bits that used to be used for host addressing and we're now allocating them to the network address portion. So if this was the original mask and there was eight bits left over for host addressing, and now we've moved the mask five positions, meaning adding five bits.
0:30So one, two, three, four, five. So the new mask is right here. So if it was a /24, it'd now be a /29. And then we'll go ahead and reflect those bits being on in the mask. So the new mask in dotted decimal would be 255 here. And here, it'd be 255, meaning all eight bits are on. And then here, it'd be 255. And then for this octet, we have a few options. Number one is we could just memorize what five bits on looks like with the last three bits off, or we could just go ahead and do a binary to decimal conversion. And that would look like this. It's this one, this one, this one, this one, and this one, and the other three are zeros like that.
1:05So to convert from binary to decimal, we'd simply take the values that are on, and that'd be 128 + 64 + 32 + 16 + 8. And if we add all that up, that equals a whopping 248. So our mask in dotted decimal for that last octet would be 248. So when in doubt, you can just go ahead and convert that from binary to decimal. Another really important aspect is that when we're dealing with a mask, the bits are gonna be on, on, on, on, on, on, on until they're not, and then they're not gonna turn on again later.
1:39They're gonna be contiguous, meaning in order, all ones until they stop being a one, and at which point, they go to zeros and they stay zeros all the way to the right. So you would not have something like 11111 with five bits here, then a couple zeros, and then a one here. That's not a valid mask that we can use for an IP address. And because we're only dealing with one octet of data at a time as we represent the masks, let me share with you a little shortcut to remember the mask values. So for the mask, we start off with 00000000 as a possibility.
2:11That was the /24 for this octet where all the mask bits were zero. And because the bits that are on have to be contiguous from left to right, if we had another bit, that next bit would be one. And if it was all zeros after that, it'd be like this. And then it'd be like this 1, 1, and then 1, 1, 1, et cetera. So if you get a pinch, you can't remember what the dotted decimal equivalent is, you can just realize that again, the bits have to be all on contiguously until they're not. So one shortcut I'd like to share with you regarding the actual decimal values for the mask is we can take this first position, for example, let's say it's a one, and then all zeros, that's gonna be 128.
2:44That's gonna be the dotted decimal mask if it's one, and then seven zeros. And then to calculate the next value, if it was like 1, 1, you simply add 64, which would be 192. And then if there's three bits that are on, it'd be plus 32, which is 224. And if there's four bits on in a row, that'd be plus 16, which would be 240. And if we had five bits in a row, that'd be plus eight, which is 248. And if we had six bits in a row, that'd be plus four here. So the result there would be 252.
3:15And if seven bits were on in this octet, that'd be plus two more, and that's 254. And if all eight bits were on, it'd be plus one, which is 255. So for a mask value, the only possible dotted decimal values that are legal for an octet of data for the mask are these right here. So you can either write them out just by taking the first value plus the next one, plus the next one, et cetera. Or when it came down to it, you could just do the conversion from the binary from the mask, like this one, bump, bump, bump, bump, bump, over into decimal, doing it longhand.
3:46Either way is fine. So let's go back to the original parent network, this /24, this one giant street. And if we're gonna do subnetting, we are gonna need to move that mask one or more bits to the right. The question is how many bits to take, because we are literally taking these bits that were available for host addressing and we're reallocating them for the actual new subnet IDs. And let's just start with some common sense here. Let's imagine we have eight host bits originally like we do with the /24, and we take all of them. (laughs) So we move the mask to here, we change these bits to all ones, which in dotted decimal, will look like a 255 for the mask for that last octet.
4:26And now we have a /32. So my question is, if we have a 32-bit network, how many bits do we have available for host addressing? And the answer is none. Also, as a result, we don't have any room to put any possible hosts on the new network. So taking all the possible host bits and allocating 'em for the network is not a reasonable thing to do because we're not gonna have any host addressing space left. So regarding how many bits to take, we wanna take enough bits over here from the available host bits portion to support the number of new subnets that we need.
4:59And it's not a one-to-one mapping. For example, it's not, oh, if we take one bit from the host addressing, that means we can create one subnetwork. And that's because bits are in binary. They can be a zero or a one like a light switch. That means we could have zero or one, and that's two possible combinations. So effectively behind the scenes, that means that we can create two subnets by simply borrowing or stealing, I should say, one of the available host bits and allocating that to the actual network addressing space. So based on starting with a /24, this would be a /25 that could give us two new subnets.
5:31And if we take two bits, the /24 would now be a /26. Simply adding two to that. And with two bits, here's the combinations. We have the two bits that could be both be zeros, we have the bits could be like this or like this or like this. So if we take two bits, we could actually have four new subnets. And let's do one more example. Let's imagine that instead of taking two bits from the available host portion, we wanna take three. So if we have a /24 to begin with, we add three bits to that, that'd be a /27. And with three bits, we could have this combination, and we could have this combination, and we could have this one and this one and this one and this one and this one and this one, which is eight possibilities.
6:13So if we take three additional bits above and beyond the starting point here, we can create quantity-wise eight sub-networks because of the number of bits that we have to play with. And so when it comes to the question of quantity, for example, how many I came up? Well, probably more than a decade ago, I came up with this idea, this concept called the finger game. And I'd like you to play it with me right now, and it's terrific. Anytime you need to deal with the idea of quantity and how many bits should I take or how many bits are there, we can simply use the finger game.
6:43And it goes something like this. I'm gonna take a sharpie right here. And on my thumb, I'm gonna write down the number two. So funny story, yesterday I was gonna film this, so I actually put this on my thumb yesterday and then I forgot it was there, and I went out to a show last night and I got some strange looks when people saw my finger with a number two on it. So now that I have a number two on my thumb, I'd like you to imagine that your fingers represent bits. So how many bits do I have up? No bits, right? So let's imagine we didn't take any additional bits from the host portion, and as a result, we can't create any subnets. So our fingers are gonna represent bits.
7:16And the reason I'm putting a two on my thumb, which I'd like you to imagine as well, or if you wanna get into it, go ahead and put a two on your thumb as well, because what we're gonna do is we're gonna use our fingers to represent bits, and then we're verbally gonna count and specify how many new subnets we can create. And the starting point, which is probably the hardest part for most people, the starting point is to put your thumb in the air and you say two, that's the starting point, because one bit, again, our fingers and digits are representing bits. And with one bit being an on or off, we can have two possible subnets. So that's the starting point, and that's the hardest part of this game.
7:48And then if you need more than two subnets, we're gonna bring up another digit. So you bring up another digit and you simply double the number you spoke earlier. So if we started with a two and we double it, it would now be four. And if we bring up another digit, so there's our third digit, we simply double it again and we'd say eight. So we're just doubling two, four, eight. If we bring up another digit, that'd be 16. If we bring up another digit, that'd be 32. And we can continue that by using our other hand going to six and seven and eight and so forth. And that's the finger game. So anytime there's a question of quantity, for example, how many bits are gonna be required to make a certain number of subnets?
8:24Just think finger game. So let's go ahead and practice a few. Let's imagine that you and I have been given the task of creating three new subnets. So we've been given some parent network with an existing mask. My question is quantity-wise, how many bits do we need to take above and beyond the original mask? And the answer is the finger game. So if we need three new subnets, you put your first digit in the air and that'll give us two. It's not enough, so we bring up another digit and double the number as four. Hey, that's enough. So to create three new subnets, all we need to do is take two bits that were host bits and allocate them over for subnetting.
8:58And the way we do that is simply by moving the mask two bits. So let's do one more quantity question together regarding subnets. Let's imagine that you and I have stepped into the office one day and the manager says, "Hey, guess what? We need 30 subnets." So our question is how many bits do we need to allocate that were host bits and allocate them over for networking? So let's do it, so here is one bit that represents two, and that's not enough for 30. So we bring up another digit, and that's four, not enough. We bring up another digit, that's eight. Bring up another digit, that's 16. So we bring up another digit, and that's 32. You know what?
9:30We have a little bit extra room, but we have enough for 30 subnets. So my question is this, how many bits that were gonna be host bits do we need to reallocate for the purpose of subnetting? If you're saying, "Keith, you're holding up five," you'd be absolutely right. So this finger game is a great opportunity to easily determine how many additional bits we need to use for subnetting based on how many new subnets we need to create.
Identify the New Subnet IDs
0:00So our next step in this process is to identify, okay, what exactly are the new subnets that we get when we allocate, for example, two or three or four additional bits for the purpose of subnetting? And so to bring this point home, let's imagine that we've been given this parent network of 10.67.83.0 with a 24-bit mask. And let's imagine that the requirement is, we need 10 new subnets. Perhaps we want one for our Internet of Things devices, we want one for our human resources department, we have one for our servers, and so forth.
0:30So if we need 10 new subnets, and there's our original mask, how many bits above and beyond the /24 do we need to take to go ahead and create up to 10 new subnets? So based on our previous video, to calculate how many bits we're gonna take to create 10 new subnets, we play the Finger Game. And we put up our thumb, so two subnets is not enough. We bring up another digit, we double it. That's four, not enough. We bring up another finger, that's eight, also not enough to reach 10. So we bring up our fourth digit, and we go to 16.
1:01That'll support it. So to pull this off, we need four additional bits above and beyond what the current mask is to support up to 10 subnets. And it'll give us 16 new subnets. That's okay. But we need at least four bits that we're gonna use to create at least 10 new subnets. So if we have a /24 and we're increasing it by four bits, that's gonna go ahead and be a /28. So that'll be our new mask. So this is now going to be a /28. And so the mask is gonna have those four bits on, representing that this is the new dividing line.
1:32And in dotted decimal for the mask, this would be 255. And the second octet for the mask here would be 255. And the third octet for the mask would still be 255. And this fourth octet for the mask would be 1, 2, 3, 4 bits that are on, these bits right here, and these bits are off. So we could manually just say 128 plus 64 plus 32 plus 16. Or if we wrote out the chart with the mask, we do 128, 192, 224, 240, 248, 252, 254, and 255.
2:03So the mask here would be 240 for that fourth octet. And that's dotted decimal representing that these first four bits are on and now gonna be used as part of the network addressing. So I'll go ahead and put that here as well. And again, our goal here is to create 10 new subnets. Now, if an individual happens to be, like, a genius or an expert in math and binary, they can do a lot of these calculations without even writing anything down. And I work with several people like that. They're amazing. However, for the average human, like myself, I'd like to share with you a pretty easy way to identify what those new subnet IDs are.
2:39And it starts by taking a look at the last bit here in the mask which is on. So all these bits here are on in the mask, all of 'em here, here. And these first four bits of this last octet based on our new mask, those four bits are on. And the least significant bit, the lowest valued one right here, is in this position. So I'm gonna write out this mask here, under our chart. And just to be consistent, there is the dividing line between the network bits here on the left and the host bits here over on the right.
3:09So to calculate the new subnets, because the 10 and the 64 and the 83 are all locked in stone, they're not changing, the first three octets are gonna be identical. So we can just write them out. So for the new /28 networks, they're all gonna start with 10.67.83. And then the question is, okay, what are the new subnets, because we're now including these four bits? And for the first subnet that we have with this new /28, the secret of that is that it looks like the actual parent network.
3:40Think of it like a clone. So if this one is 10.67.83.0, the first new subnet would also be 10.67.83.0 but have that new mask of /28. And the reason I point that out is because sometimes just starting is the hardest part. And so if you just write out the parent network with the new mask, that's your first subnet. Let me also in binary show you why that would be the first subnet. So up here, this represents the mask. And then below it, I'm gonna write down the subnet. So just for those four bits, if those four bits are starting with 0000, again, the dividing line hasn't changed, and these last bits are still available for host addressing, last four.
4:20So for these four bits, they're right here. We have zero 128s, zero 64s, zero 32s, zero 16s. And that's why this is zero. It's the starting point. So that's our first subnet. And then for the second subnet, the first three octets are locked in stone, so they're not gonna change, 10.67.83. However, for our next possible combination here, for this second subnet, it would be like this: 0001. We're just doing counting in binary. So if the first four bits of the subnet is 0001, like that, the value in decimal of that would be no 128s, no 64s, no 32s, but a 16, so the next subnet would be 16.
4:58And then for the next subnet, it would look like this in binary: 0010. So lemme update our address up here. So that's a 1 in that position. So if we look at that in decimal, that'd be no 128s, no 64s, one 32, and no 16s, so the next subnet would be 32. And let's do it again. So we have a 0011. So here's the binary with 0011. And the value in decimal for that would be no 128s, 64, we have one 32, plus 16 more, which would be 48, and the first three octets stay the same.
5:30And what is changing is these bits as we continue to count. So I'm gonna share with you a shortcut here in calculating the subnets. You simply take the mask, and you go all the way down until all the ones stop. And we're gonna take a look at that bit position where the last one in the mask is on, right at the dividing line. So in our case, that's the 16 value, and that's our block size. I usually call that BS, for block size. (laughs) No, really, that's what I refer to it as. So any networks that we have are gonna be 16 plus 16 plus 16 because that's the value of the least significant bit, and that's how the binary works.
6:04So for the first subnet, it's gonna look like the parent subnet with the new mask. And then for the next subnet, you simply add 16. And for the next one in that same octet that we're dealing with, you simply add 16 and add 16 and add 16. And we just keep doing that. And eventually, we're gonna have a listing, if we go far enough, of all 16 new possible subnets, even though we only need 10. We're using four bits, which gives us a total possible 16 subnets that we can go ahead and play with. So I'd like to pose a question for you. If we were to take a look at the very next subnet, which would be 10.67.83., what would be the next subnet?
6:41And there's a hard way and an easy way to calculate that new subnet. So the hard way, I think, would be to go to binary and say, "Okay, outta these four bits, the next bit position would be 0100." And that's if you're comfortable doing the counting with binary. And then based on this, you can take the values that are on. So we have a bit here in the 64 position, and the 128 and the 32 and 16 are all off. So that means that this subnet is 64. But I think a better way of doing that was simply to take this block size of 16 and simply add 16, add 16, add 16, and that will give you your next and next and next and next subnets.
7:15So because we now have a /28, you take the last bit that's on in the mask, find out what that corresponding value is, and that's your block size. So as a quick test of that, let's just go ahead in this little section right here, let's use a new scenario. Let's say we have a /17 mask, and we're gonna use four additional bits to do custom subnetting. So my question for you is, what would the new mask be? Now, if you're saying, "Keith, I got this. It's 17 for the original, plus 4 more, and that's a whopping /21." So if we have a /21, what would the least significant bit be?
7:50The final one in the mask, what is its decimal value? So here, I have four, eight. This is 16, 17, 18, 19, 20, 21. We are in this position right here. So if that was the mask right here and that was the last bit that was on in the mask, that bit value has a value of eight. So for our subnets, the first subnet would look exactly like the parent network except with a new mask. And then for the next subnet, we'd add eight. And then for the next subnet, you'd add eight. And this time, we'd be adding eight to this third octet because that's where the dividing line is.
Ranges for Subnets
0:00So here's our first five subnets. So for this video, I'd like to chat with you about what exactly are the ranges of addresses for each of those subnets. And if that's help reinforce this, I'm gonna walk you through it in binary for a couple of them. And then I'm gonna show you a really simple and easy way to do this that doesn't require the binary, but I want you to see it in binary, that we have a big picture, look at what's really happening. So let's focus our attention on these last four bits that we're gonna be using for host addressing. So the possible combinations here for these last four bits would be 0000.
0:31I'll start off with the easy ones. And then for the next possible combination in order we'll do 0001, and then 0010, and 0011 and 0100, and 0101, and 0110, and 0111. And then we go ahead and have a 1000. And that's gonna continue. And when it comes to the host bits, we have a similar process with the finger game. If you have four bits available for host addressing, you can use a game like the finger game to get an approximation with how many different hosts can fit in that space.
1:03So here I've just listed 1, 2, 3, 4, 5, 6, 7, 8 of the 16 possible combinations for host addresses. But an easier way, rather than going to binary and all the possible combinations here for subnets is we could just go ahead and look at the first subnet here, which is 10.67.83.0, with the 28 bit mask. Take a look at the next subnet, which is the same first three octets, dot 16 that we did in the previous video. So for this first subnet, we can see the range is starting here at this subnet, and it's gonna go up and to, but not into, this next subnet.
1:36So if the next subnet ends with 16 in this last octet, this subnet range is gonna be ending at 15. So think of it like a pizza. So we have individual pieces of pizza. And so if somebody has this piece of pizza, it is unique and separate from this piece and separate from this piece. And that's why we're not gonna have the same IP address in multiple subnets. So if we did it here for the second subnet, 10.67.83.16, it would go up to in just one less than the next subnet. So that would be 31, and for 32 it would be going up to the next subnet minus one there would be 47.
2:11And then for this fourth subnet, which is the 10.67.83.48, with the slash 28 bit mask, it would go up and butt up against this next one, which would be through 63. And we could continue that game. So this is the range for those first four subnets. And again, the process is simplified by simply looking at the next subnet and then backing it off by one. And that's the ending point of the previous one. Now, in IP addressing, something that we haven't chatted about is the concept of a broadcast address. A broadcast address in IPV four is when all the host bits are all set to a one and at the tail end of the range for each of the subnets, that is also the broadcast address.
2:51So the broadcast address for the 10.67.83.0 network with a 28 bit mask is 15. And the broadcast address for this third network right here is 47. And in the fourth subnet, the broadcast address for that fourth subnet is 63. So that's a reserved address that you can't assign to a host. In fact, if you tried to, the Cisco router, and other networking devices would complain saying, whoa, that's a broadcast address based on the IP address and the mask you gave me, all the host bits are a one that's the broadcast address. And as a result, you can't assign this for an individual computer to use.
3:24So effectively it's reserved. And while we're talking about reserved addresses, this is the network ID right here. So we have the 10.67.83.0 network, and we have the 10.67.83.16 network and so forth. And for that network address space, that's also a situation where all the host bits are zeroed out. And that's also a reserved address that you can't assign to a computer or to a Cisco router interface, because if you do, the router will complain, hey, that's the network address, it's not a valid IP address. Which leads us to the next discussion.
3:55And that is valid host addresses, meaning IP addresses that you can assign to a, like a router interface, or to a computer. And the valid host addresses within a subnet is the subnet itself plus one. So for example, this would be 10.67.83.1 'cause you can't use zero, 'cause that's the actual network address. And the last valid host address would be the broadcast address minus one. So the valid IP addresses we can sign on the 10.67.83.0 network with a 28 bit mask would be dot one.
4:25And the last valid address there would be dot 14. And let's also calculate that for the 10.67.83.16 subnet, the first valid host would be the network plus one, which would be 17. And the last valid host address would be the broadcast address minus one, which would be dot 30. And we'll do it one more time for the third subnet. The first valid host would be the subnet ID plus one, which would be 33. And the last valid IP address there would be the broadcast address minus one, which would be 46. I also wanna point out just for a moment, that sometimes our dividing line where the mask is, sometimes it may be in the third octet or the second octet, and we're gonna save that discussion, and how to calculate that as well for our discussions on variable length subnet masking, which we're gonna put in a separate skill.
5:09So for now, I'm gonna put all the examples, where the dividing line based on the new mask is somewhere here in this fourth octet. And to finish this off here for the fourth subnet, the starting valid IP address would be the subnet ID, which is 10.67.83.48 plus one. So that'd be 49. And that'll go all the way through the broadcast address for that subnet minus one. So that'd be through 62. So starting with a slash 24, and then taking four additional bits, and making it a slash 28, we've identified our subnets, or we've listed here are the first five of those.
5:44We've identified the range of addresses for those subnets, including the network address itself, and the broadcast address for each of those subnets. And then the valid host addresses that we can use inside of each of those subnets.
Calculating the Number of Hosts per Subnet
0:00So in this video I'd like to chat with you about how many possible hosts can fit on a given subnet. Now, one way of identifying that would be to write out the subnets, including the ranges, and then the first valid host address, which is the subnet plus one, and then the last valid host address, which is the broadcast minus one, and then manually counting those. But let me share with you a much better way of calculating quantity, and anytime an IPV4 addressing that I talk about quantity, I want you to think of the finger game.
0:30And the finger game is all about using our fingers and digits to represent bits, and verbally counting, starting with a two and then doubling that. So fingers and digits represent bits. And then we're speaking the actual quantity we can get based that number of bits. So let's imagine that we have four bits available as we do here. So if we're using a slash 28 for the network portion, we only have four bits left over for host addressing. So if we had four bits available for host addressing, how many possible combinations can we get with four bits?
1:03And the answer to that, my friend, is the finger game. So let's do this together. If we have four bits, we're gonna start off with a thumb, and with a number two on it. So with one bit, we have two combinations, and we're simply gonna play the finger game until we get to four bits. So 2, 4, 8, 16, stop. So with four bits, we have 16 possible combinations. What if we had seven bits for host bits? How many possible hosts could we have? Finger game, 2, 4, 8, 16, 32 64, 128. That's it. We can have 128 possible combinations if we have seven bits.
1:38So the finger game is useful a couple different times. Number one, if we're calculating how many bits to take for subnetting. So we use the finger game to calculate how many bits, and how many possible subnets. It's also super convenient when we come to hosts. We're looking at the host bits at the far right end of the IP address. And we're curious, based on a number of host bits, how many possible hosts we can have. The finger game, again, is a great solution with one little caveat, and that is because we cannot use the actual network address space or the broadcast address.
2:09You gotta do the finger game for host bits, and how many possible hosts. And then when you're done with the finger game, you do minus two 'cause you can't use the network or broadcast addresses. And let's do one more. Let's imagine that we have three bits that we have available for host addressing. How many possible hosts can we support with just three bits left over for host addressing? So we put our thumbs up, start with a two, and then we add a four, and then go to eight. Stop. That's three bits. So that's eight possible combinations. Can't use the network or broadcast address. So effectively it's eight minus two for those two reserved addresses.
2:42So that gives us six possible valid host addresses, if we only have three bits available for host addressing.
Subnetting Scenario
0:00In this video, I'd like to walk through a scenario where we've been given a network address base of 10.67.83 with a 24 bit mask. So above this line right here, this is the original network that we've been given. And let's imagine for our scenario that we need to create 16 new subnets. So with that in mind, our first step would then be to play the finger game regarding how many bits we need to move the mask. And upon doing the finger game, I have four fingers in the air. So that's four bits that we need to go ahead and move the mask by. So here in the first subnet, I've represented the fact that we are moving from a /24 to a /28, which is four additional bits.
0:37So I've also represented what that mask looks like now. So prior in the mask, it stopped here and these bits were all available for host adressing. But now with the new mask of /28, the dividing line is right here. So for the first subnet, these four characters are all 0. And for the next subnet, we are then going 0001, and then it'd be 0010, et cetera, et cetera, et cetera, all the way through our 16 new subnets. Also in the videos as part of the skill up to this point, we also identified that the least significant bit of the mask in this case is this bit right here. If we look at that in binary, the bit value for that last bit that's on has a value of 16, also called the block size.
1:14And simply by using that, we can calculate the additional subnets. And now that we know the block size is 16, as we write out these new subnets, the first subnet, again, looks just like the parent subnet, except it has a longer mask. So if this is 10.67.83.0, the first subnet's gonna be 10.67.83.0, but the mask is gonna be the new mask. And that's because of all these bits right here that are now part of the network addressing space, they're gonna all be zeros. And that's our first subnet. And a long time ago, maybe a decade or more ago, they referred to this first subnet as subnet 0, because all of the subnet bits here are 0.
1:50We don't hear that too much anymore. But if you're looking at some old content and it talks about subnet 0, there's somebody talking about the first subnet. So I'm gonna make a note that these are all gonna be with our new mask /28. That's where the dividing line is. And because that first octet is not gonna change for any of our subnets, I'm just gonna put a little x to indicate that that is the same value and it's in this fourth octet where things are gonna change. So for our first subnet, from a numerical perspective, it looks like the parent subnet, except it's gonna have the new mask of /28 to indicate we're using the first 28 bits as the network, leaving the last four bits for host adressing.
2:23So then based on the block size, and that's in the value of 16 for this last octet here was simply a 16. And then we'll add 16 more, which is 32, we'll add 16 more, which is 48. So be careful we're not doubling each of these. We're simply adding the block size, add, add, add. And then for the range for this 10.67.83.0 network, it would butt up all the way next to the next subnet. So it would be ending in .15, and that'd be the broadcast address. And then the 16 subnet would be going all the way up to, but not including the next subnet.
2:55So that's gonna be 31, so 0 through 15 there, 16 through 31. Then 32 is gonna go through 47, which is one less than the next subnet. And then subnet 48 gonna go all the way up to, but not including 64. So that'd be a do .63 and we can continue that as well to figure out our ranges. Also for this range, the last one in the range is the broadcast address. So it's reserved, you can't assign it to a host. And this first address in the range represents the actual network. Think of it like the street. So it's street 10.67.83.0/28 and street 10.67.83.16/28 et cetera, et cetera.
3:30So these are the street names or network IDs themselves for our subnets. So here, if we put valid hosts, meaning valid host addresses on each of those subnets, it would be the subnet plus one, which is the first valid host address. So for this subnet, it'd be .1 and the last valid host address would be the broadcast address, which is reserved, minus one. So that'd be .14. And then for the 16 network, it'd be .17 through 30. And for the 32 subnet it would be 33 through 46. And for the 48 network, it'd be 49 through 62.
4:04And if we're ever curious, okay, how many hosts will fit on a given subnet? You simply take a look at how many bits are available. In this case, there's four bits for host addressing and it's the finger game. So we bring up our fingers, we calculate based on those bits, what that quantity is. So it's the finger game regarding host quantity minus two. Because we can't assign the actual network address like the street name or the actual broadcast address on one of those streets to an individual interface on an IPv4 network. In fact, I think it'd be very, very valuable for you to see what it looks like if we were to try to assign any of these network address spaces or the actual broadcast addresses to an individual interface.
4:43So as a demonstration, I'd like to go ahead and attempt to assign this second network address space of 16 to an interface. It'll complain, it won't let us do it. Let's also go ahead and try to assign the IP address of 10.67.83.31 to an interface with the /28. And it's gonna complain if we try either one of those. However, if we try one of the addresses of 17 through 30, it'll be fine because those are valid host addresses within that 10.67.83.16 subnet. So here's an example of that. Let's do a show ip interface brief.
5:15And this router has nothing assigned to it. Let's go ahead and take Gigabit 0/0. So we'll go into configuration mode with config t. We'll then go further into interface gigabitEthernet 0/0. Now we're in interface configuration mode. We'll do a no shutdown to bring up that interface. And then let's attempt to go ahead and assign it the network address for that 16 network. So we'll do ip address 10.67.83.16, and then we'll put in the mask of 255.255.255. That's the first three octets, and then 240 in dotted decimal.
5:49And that 240 says, "Hey, the first four bits of that last octet are part of the network address tool," press enter. And that's where it's saying that's a bad mask. So the /28, it simply says that's the actual network ID. If we hit the up arrow key and we tried the broadcast address, let me go ahead and put it in 31 here and press enter. That also is complaining. However, if we tried one of the valid IP address between 16 and 31, let's go ahead and use for example, 30. So I'll go ahead and put a 30 in that position and press enter. No problem whatsoever. And we'll type in end and then a show ip route and press enter.
6:21And here it's showing us that we are directly connected to this 10.67.83.16 network with a 28 bit mask. So just as a confirmation, we cannot assign the actual network address space or the actual broadcast on one of those networks to an interface. So based on the subnets and the ranges, if we wanted to test and verify this, we could actually implement these subnets on our network. So let's go ahead and use the following three subnets. The first, second, and third. The 10.67.83.0 we'll have is this network right here.
6:54The 10.67.83.16 we'll have is this network here. And for the 10.67.83.32 network with the 28 bit mask, we'll have this one right here. So I've currently got Router 1 and Router 2. They don't have any IP addresses assigned whatsoever. So let's imagine that we wanna give R1 the first valid host address on each of those subnets. So I'll go ahead and label that first. So on the 10.67.83 network, that'd be .1 over here, I'll note that. And then on the 10.67.83.16 subnetwork over here off Gig 1/0.
7:25If we give it the first IP address on that subnet, that would be .17. And then over here on R2, let's give R2 the second valid IP address on each of those subnets. So for this network segment, 10.67.83.16, the second valid IP address would be do .18. So the first valid address is 17, the second would be 18. And then over here on the 10.67.83.32 subnet, if we stuck with the same logic of using that second valid IP address over here on the 32 subnet, the first valid IP address is 33.
7:55So the second valid IP address would be 34. And then for the client over here on this 10.67.83 network, let's go ahead and just for fun, let's give it the last valid IP address on the 10.67.83 network, which if we look at that network, the last valid IP address is .14 that we can assign to a host. And on this client PC, we'd also specify for a default gateway to use this IP address of R1 on its Gig 0/0 as its default gateway. That's if the client ever needs to forward packets off of its local network. So with that game plan in mind, in the next video, let's walk through the configuration and verification of our IP Subnetting plan.
Implementing our IP Subnet Addressing
0:00All right, in the previous video we put a game plan together. In this video, we're gonna execute on that game plan by going to our routers, router one and router two, configuring the IP addresses in each of those respective subnets and configuring the client PC with an IP address on the 10.67.83.0 subnet. So let's go over to router one and let's get to work. So here on router one, we'll start by doing a show ip interface brief and everything is down, fantastic, and there's no IP addresses. So let's go ahead and go into configuration mode with configure terminal and then further go into interface gigabit 0/0 and then here at interface gig 0/0, we'll do a no shutdown command to go ahead and bring it up.
0:38And then we'll also assign the IP address based on our plan, which is IP address 10.67.83.1 with a 28-bit mask. So in dotted decimal, a 28-bit mask looks like 255.255.255.240. That's the first four bits of that last octet being on in the mask. And we'll press enter and it said, "Hey, Keith, you have a little typo there." So I typed in 225 for that third octet and it's showing me here that that's no good. The bits in a mask have to be contiguous, meaning on, on, on, on until they're off, until let me hit the upper arrow key.
1:12I'll go back and I'll change that 225 to 255, press enter and we are good to go. Then we'll go to interface gigabit 1/0. We'll do a no shutdown there. So now that's coming up. We'll give the IP address on the 10.67.83.16 network of 10.67.83. And the first valid IP address on that subnet is 17. And then we'll specify the same 28-bit mask and we'll do that in dotted decimal. That looks great. So after typing in end, we'll do a show ip interface brief, press enter just to confirm that those two interfaces are both up and they have the addresses that we planned on.
1:48Also, we gonna do a show ip route and that will also confirm for us that we have this directly connected network of 10.67.83.0 with a 28-bit mask and also a 10.67.83.16 with a 28-bit mask. Fantastic. Let's go on to router two. So here on R2, we'll do a show ip interface brief just to confirm where we're starting at. So we wanna configure gigabitEthernet2/0 to be on the 10.67.83.0 subnet. That's the same one that R1 is on. And then its gigabit 0/0 interface will be on the 10.67.83.32 subnet.
2:23So let's go into configuration mode by typing in configure terminal. Let's start off with gigabitEthernet2/0. So we'll type in from global config, we'll type in interface gig 2/0 and press enter. Then here, we'll do a no shutdown to bring it up and then we'll assign it the IP address with the command ip address. And for the IP address, it's gonna be 10.67.83 dot, and this is the 16 subnet. And we're looking for the second valid IP address on that subnet. So that is gonna be 18.
2:55And then we'll put in the mask of 255.255.255.240 to represent a 28-bit mask and press enter. And then we'll go over to interface gig 0/0 by typing in interface gig 0/0 and doing a no shutdown. And then we'll give it the IP address of 10.67.83 and this is the 32 subnet. We're looking for the second valid address on the 32 subnet, which is 34. And we'll put on the 28-bit mask just like that and press enter and then we'll type an end and then we'll verify our work with a show ip route.
3:30Or we could have also done a show ip interface brief first, but the routing table's also gonna tell a tale. So here we have a directly connected network, 10.67.83.16 with a 28-bit mask. That's the right subnet that's connecting over to R1 and the 10.67.83.32, and that is also correct for gig 0/0. So let's go ahead and do a show ip interface brief and that'll confirm the actual IP addresses involved as well. So there's gig 0/0 and there's gig 2/0. And then let's also now configure our client PC with the IP address 10.67.83.14 with a 28-bit mask and a default gateway saying to use 10.67.83.1.
4:10So let's go to the client PC right now and finish it up and do a quick test. So here's the client PC. Let's go ahead and open up a command prompt and do ipconfig. See where we're starting from. Looks like its interface is down, there's nothing showing here regarding IP addressing. So we'll type in ncpa.cpl, a quick way of getting to the control panel for networking. We'll right click on this NIC 10.10 interface. We'll enable it and then we'll go ahead and once it's enabled, we'll right click on that interface again. Go to properties and we'll double click on the IPv4 to configure the properties of IPv4 with a specific address of 10.67.83 dot, and based on our plan, we're using 14.
4:48And then for the mask, it's 255.255.255.240. And then for the default gateway, it's 10.67.83.1. And okay, and we'll go ahead and close that. So in the background, I have a routing protocol running. So the two routers know how to forward packets back and forth. So from this PC, we should be able to ping this interface right here on R2, which is 10.67.83.34. So let's use that as a test. Unfortunately, because we just changed all the IP addressing, the other devices in this network have the incorrect IP addresses and as a result won't be able to communicate all the way across the network until we change them.
5:27So for now, let's ping from the PC to router two's gig 0/0 address, which is 10.67.83.34. So here at the client, let's go ahead and do a ping to 10.67.83 dot, and it is 34 and we'll press enter. So that looks great. The ping works. Let's also do a tracert, which is on Windows how we spell traceroute. We'll go ahead and do a -d for don't bother doing reverse lookups for DNS. And let's put in that same target of 10.67.83.34, and press enter.
6:00So this is showing us that the first hop was our default gateway, R1, at 10.67.83.1, and then the next top was 10.67.83.34. So now that we've taken a look at building and actually implementing and verifying an IP subnetting plan, in the next video, I'd like to present a hands-on lab that you can use to get practice both with subnetting and applying that subnetting configuration on a Cisco router. So I'll see you in the next video in just a minute.
Validation
0:00In this hands-on lab, we have the opportunity to do both a planning phase for subnetting and then to actually apply IP addresses based on our plan. So this is the topology we're going to be working with. And the parent network is the 1067.83 network with a 24-bit mask. And from that network address space, we want to create nine subnets. As far as where the subnets are going to be used, we're going to use the first subnet here, second subnet here, third there, and so forth. So part one of this lab is the actual planning out and the writing out of all those individual subnets, including the ranges if we want to regarding which IP addresses can be used.
0:38And then once we have that plan and we know what the nine subnets are, then like you do apply that knowledge by going to each of the routers. And I thought to myself, self, instead of having to configure all the interfaces on each router, which is a lot of work, instead, I've configured all the interfaces already except for gigabit two slash zero on each of the router interfaces. So those are right here, here, and here. So effectively, that's the interface facing the various clients. So we have client PC down here. That's our Windows 11 computer.
1:09I've got a little virtual machine called PC 20, a machine called PC 30, and the server here connected on the ninth subnet. And once again, all these subnets are already in place. However, what isn't in place is the actual IP address, the first IP address in that respective subnet to be applied to the gig two zero interface. So our one would get the first IP address in the first subnet here, our two would get the first IP address in the fourth subnet here, router three, we get the first IP address in the seventh subnet and router four, we get the first IP address in the ninth subnet.
1:42And as I mentioned, all the other IP addresses are configured and also routing is enabled. So if we are correct in our game plan for calculating what those nine subnets are, and furthermore, we're correct in implementing those IP addresses respectively on the routers, we should have full connectivity across the network. So for testing, here's what we could do. We could go to this Windows client computer right here. That's our client nug machine. It's already configured for is default gateway pointing to our ones gig two zero interface. And the server in the upper right is at 10 dot 67 dot 83 dot 130.
2:14So we should be able to ping from the client to that server. We should also be able to do a trace. And I would also encourage you on the Windows client to do a dash D is going to go a lot faster if it's not trying to do reverse lookups every hop of the way and do a trace route and it'll verify what the IP addresses are of the routers in the path as that traffic goes from the client to the server. So have some fun in calculating the nine subnets and then secondly, have more fun in configuring the gigabit ethernet two slash zero interface on each of the routers with the first available IP address in those respective subnets.
2:48when you are ready, join me in the walkthrough video.
Validation
0:00In this walkthrough, we're first going to plan out what the nine subnets are we can use using the parent network of 10, 67, 8, 3, 0. And then once we identify what those subnets are, we'll apply the first IP address from the respective subnets on each of the routers interface gig two slash zero. So here is the lab environment. Let me go ahead and open up the topology. And if we want to make that bigger or smaller, we can let me go ahead and make that a little bit bigger. In fact, let me go ahead and maximize it. And I'm going to use this as my workspace to write out the actual subnets. And then we can go ahead and minimize it and come back.
0:31So let's begin the very first thing I'm going to do is I'm going to write out my values in one byte of data. So 128, 64, 32, 16, 8, 4, 2 and 1. And that's going to come in super handy anytime we're dealing with IP subnet ting. And because we're starting with a slash 24, all these bits are going to be in the last octet. So if we need nine new subnets, we're going to play the finger game to identify how many additional bits above and beyond the 24, we need to go ahead and use four network bits.
1:04So if our goal is nine subnets, I'm going to start with my thumb and say two and then add another digit and say four and eight and 16. We need at least four more bits to be used for networking. So the mask is going to go from a 24 plus four more and that's going to be a 28 bit mask. And so that would look like this one, two, three, four. So now the dividing line between network on the left and host on the right is right here at the 16 bit mark. So that's all net and over on the right, we have four bits left for hosted dresses.
1:35And hopefully that's going to be enough space for hosts on the network. But our main concern right here is carving out the nine new subnet. So as far as what those subnets are, the very first subnet from this parent network looks identical numerically. So it's going to be 10 dot 67 dot 83 dot zero, except it's going to have the new mask slash 28. And that is our first subnet right there. We simply take the block size, which is 16, the value of the least significant bit in the new mask. And we simply add that on and since we're in the fourth octet, the first second and third octets are going to stay the same for all of our subnets.
2:12But the next subnet is going to be 16 more in that last octet. So it's going to be 16. So that's going to be seven at two of 10 dot 67 dot 83 dot 16. And then for subnet three, we're simply going to add 16 more to be 32. And for seven at four, we simply add 16 more and then be 48. And then for subnet five, we simply add 16 more. So 48 plus 16 more would be 64. And then for subnet six and subnet seven and seven eight and seven at nine, making sure I have enough room here. The first three octets against the same and put some dividing lines in there.
2:45And we simply keep on adding the block size for the next subnet. So 64 plus 16 more is 80 like that. And 80 plus 16 more is 96 and 96 plus 16 more is one 12 and one 12 plus 16 more is one 28. So the very first IP address in each of these subnets would be the actual sub net identifier plus one more. So this be dot one is be dot 17 and dot 33 and dot 49 and dot 65 and not 81 and dot 97 and 113 and 129 for the first valid IP address.
3:21So using this knowledge of the subnet IDs and the first valid IP address in each of the subnets, let's go ahead and plug some numbers in. So over here in our one on gig two zero, the first subnet is the 1067 a three zero and the first valid IP addresses dot one. So here we'll have dot one and let's go up to our two. So our two it's gig two zero interfaces connected to the fourth subnet. That's right here. That's going to be a dot 49. So we'll put a dot 49 right there. And then on our three it's gig two zero interfaces connected to the seventh sub net.
3:52And so that seventh subnet is the 96 network. First thought IP address is 97. So we'll put that there and then our four is connected to the ninth subnet on its gig two zero interface or it will be once we can figure it. Ninth subnet is the 128 subnet and the first thought IP address there is dot one 29. So we'll make a note of that as well. All right. So with that in mind, let's go ahead and configure those four interfaces with those four IP addresses and the mask is going to be a slash 28 or in dot a decimal. That'll be two fifty five dot two fifty five dot two forty and we had memorized this slash twenty eight would be a two forty that lost octet.
4:28We could add up one twenty eight plus sixty four plus thirty two plus sixteen and that's going to equal to forty. All right. So with all of that in mind, let's go to the router interfaces and let's configure gig two zero on each of the four router interfaces. So to do that, let's open up server nug. That'll give us access to the router interfaces and here is the tab for our one and our two and our three and our four. So let's start here on router one and let's do a show IP interface brief and see what we're starting with.
4:59So there's gigabit to slash zero. It's currently on the sign regarding an IPV four address and it is also down. So we'll go into configuration mode with config T. We'll go into interface configuration mode for gigabit ethernet to slash zero by typing in interface gig to slash zero. And let's go ahead and bring it up with a no shutdown command and let's give the IP address that we planned on, which is ten dot sixty seven dot eighty three dot and I'm looking at my notes and that's going to be a dot one. And then the mask is going to be a twenty eight bit mask, which is eight bits there and eight bits there and eight bits there and four bits like that and we are good to go.
5:34So type it and and we'll do a show IP route is just to make sure that we got the mask correct. We can do a show IP route and we can specify connected and that'll just show us the connected routes on this router. So here showing the ten sixty seven eight three dot zero slash twenty eight directly connected to gigabit ethernet to slash zero and that's a direct result of us just configuring the IP address on that interface. All right, our one looks good. Let's go over to our two. So we'll hit the tab for our two. We'll go ahead and do a show IP interface brief to see where we're starting from here is gigabit to slash zero on that router, not configured and it's down.
6:10So we'll go into configuration mode interface gig to slash zero. We'll do a note shutdown to bring it up and then we'll give the IP address based on our plan, which is ten dot sixty seven eighty three dot and that is sub network forty eight. So we're going to go ahead and use the first thought I could dress, which is forty nine and then the mask of two fifty five dot two fifty five dot two forty , which represents a slash twenty eight and press enter. And that looks good. Well, type it in. Let's do a show IP route and say connected just to verify we have the mask correct. So here on gig two zero, we have the network forty eight with a slash twenty eight bit mask.
6:46Fantastic. Let's move on to router three. So at router three, let's do a show IP interface brief currently not configured and down for interface gig two zero . So we'll type in config T to go into configuration mode interface gig to slash zero to go into interface configuration mode for gig two zero, and that is the seventh subnet and sales first of all bring it up. We'll do a note shutdown and we'll give the IP address of ten dot sixty seven eight three because everything starts with that. And then for the last octet there in subnet ninety six, we're going to use dot ninety seven.
7:20And that is a twenty eight bit mask as well. Press enter type end to a show IP route connected and was validate that that's the right network. So that's the ten sixty seven eight three ninety six subnet with a twenty eight bit mask, which is our seventh subnet looking good. And for the actual configuration, we use the dot ninety seven so we can verify that again with a show IP interface brief. And there's the actual IP address that we configured fantastic. So we have one more to go. And that is router four. And here in router four, let's do a show IP interface brief to see where we're starting at. And there is gig two zero on assigned as far as the IP address and also down. So we'll go into configuration mode.
7:55We'll go further into interface gig two slash zero. We'll do a note shutdown to bring it up. And then that's the ninth subnet, which is the subnet one twenty eight. So the IP address the first valid IP address on that subnet is going to be ten dot sixty seven dot eighty three dot one twenty nine with a twenty eight bit mask, which in dot a decimal looks like that. And just to verify we'll do a show IP route and tag on connected press center and on this gig two zero interface. There is the ten sixty seven eight three one twenty eight network with a twenty eight bit mask.
8:29Now in the background, I already have a routing protocol configured. So presum ing that we configured those gigabit interfaces correctly, we should have full connectivity across the network. So here in the lab, we're asked to go ahead and validate our connectivity by going to our client windows computer right here. That's client nug and doing a ping. Then we can also do a trace just to validate our path to the network. So let's go to the windows client and try that right now. All right. So back in the lab environment here at client nug in the bottom left hand side of our topology.
9:01Let's do a quick IP config to confirm our IP address. So our IP address is ten sixty seven eight three dot two or default gateway is our ones gig two zero interface. So let's do a ping up to the server in the upper right and that's a ten dot sixty seven dot eighty three dot one thirty and that ping is working. So let's also do a trace route from the windows computer that spelled T R A C E R T space. And we'll do a dash D to not bother doing name resolution and we'll do that same destination of ten dot sixty seven dot eighty three dot one thirty press center and that's our path to the network.
9:33So the first router is dot one which is R one and then dot eighteen which is probably R two and we can go verify the interfaces to verify that as well. And then dot sixty six is R three and dot one fourteen is the gig one slash zero interface on R four. And then we finally have complete reachability up to the server itself at one thirty. So thanks for joining me in this hands on labs. We've validated our skills and working with fixed legs subnetting and I look forward to seeing you my friend in another set of videos very, very soon. Until then I hope this has been informative and I'd like to thank you for viewing.
10:06[no audio]
Frequently asked questions
What does the Use IPv4 Subnetting lesson cover?
The lesson explains why teams subnet an IPv4 network, such as isolating IoT devices or forcing traffic between subnets through a router or firewall. A team member then calculates new subnet IDs, address ranges, broadcast addresses, and usable hosts per subnet, and finishes by configuring router interfaces with subnet addresses in a hands-on lab.
How long does the IPv4 subnetting lesson take, and how does it fit into the CCNA course?
This lesson runs 1 hour 18 minutes and is one of 88 skills in the CCNA Cisco Certified Network Associate (200-301 CCNA v1.1) course, which totals about 94 hours. IPv4 addressing and subnetting are part of the course's knowledge outcomes, which also include VLSM and IPv6 addressing for planning addresses across routed networks.
What should a learner know before starting IPv4 subnetting?
The instructor presumes a basic knowledge of IPv4 from the earlier IPv4 fundamentals skills in the course and encourages learners to complete those first. For the course overall, Team Leads should expect learners to have about a year of networking exposure.
What is the finger game for subnetting?
The finger game uses fingers to represent bits, starting with two on the thumb and doubling with each added finger to count how many subnets or hosts a given number of bits provides. In the lesson scenario, needing 16 subnets means four fingers, so the 10.67.83.0/24 network's mask moves from a /24 to a /28.
Why can't network and broadcast addresses be assigned to hosts?
The lesson calculates usable hosts as the finger-game quantity minus two, because the network address and the broadcast address of a subnet cannot be assigned to an individual interface. The instructor demonstrates this live by attempting to assign a network address to a router interface, which the router rejects.
What can a team member do on Cisco gear after completing this lesson?
An IT Director can expect the team member to configure router interfaces with addresses from a subnetting plan, bring interfaces up, and verify reachability with show ip interface brief, ping, and traceroute. The lab walks through confirming end-to-end connectivity from a Windows client to a server across multiple subnets.
Team training path
Turn this skill into assignable team training
This free skill is a preview of the courses your team can assign, track, and report on with CBT Nuggets.
Free training library
More free lessons in Cisco
Cisco
Describe Network Architectures
Free lesson from Cisco CCNP Service Provider Core (350-501 SPCOR) v1.1 · 2h 7m
Cisco
Describe Software-Defined Networking
Free lesson from Implement an SD-Access Fabric with Cisco DNA Center · 39m
Cisco
Tools for Route Manipulation and Control
Free lesson from Cisco CCNP Enterprise Advanced Routing and Services (300-410 ENARSI) v1.1 · 1h 48m
Cisco
IS-IS Foundations and Design
Free lesson from Cisco CCNP Designing Enterprise Networks (300-420 ENSLD) v1.1 · 1h 17m
Cisco
Build a Cisco Firepower Lab in ESXi
Free lesson from Cisco CCNP Securing Networks with Cisco Firepower (300-710 SNCF) · 1h 15m
Cisco
Describe Wireless Physics
Free lesson from Cisco CCNP Designing Cisco Enterprise Wireless Networks (300-425 ENWLSD) v1.1 · 57m
$59
seat / mo, billed annually
