Cisco CCNA ICND2 640-816

Advanced TCP/IP: IP Subnetting, Part 2

by Jeremy Cioara

Start your 7-day free trial today.

This video is only available to subscribers.

A free trial includes:

  • Unlimited 24/7 access to our entire IT training video library.
  • Ability to train on the go with our mobile website and iOS/Android apps.
  • Note-taking, bookmarking, speed control, and closed captioning features.
Video Title Duration

Review: Rebuilding the Small Office Network, Part 1

Review: Rebuilding the Small Office Network, Part 2

Review: Rebuilding the Small Office Network, Part 3

Switch VLANs: Understanding VLANs

Switch VLANs: Understanding Trunks and VTP

Switch VLANs: Configuring VLANs and VTP, Part 1

Switch VLANs: Configuring VLANs and VTP, Part 2

Switch STP: Understanding the Spanning-Tree Protocol

Switch STP: Configuring Basic STP

Switch STP: Enhancements to STP

General Switching: Troubleshooting and Security Best Practices

Subnetting: Understanding VLSM

Routing Protocols: Distance Vector vs. Link State

Routing Protocols: OSPF Concepts

Routing Protocols: OSPF Configuration and Troubleshooting

Routing Protocols: EIGRP Concepts and Configuration

Access-Lists: The Rules of the ACL

Access-Lists: Configuring ACLs

Access-Lists: Configuring ACLs, Part 2

NAT: Understanding the Three Styles of NAT

NAT: Command-line NAT Configuration

WAN Connections: Concepts of VPN Technology

WAN Connections: Implementing PPP Authentication

WAN Connections: Understanding Frame Relay

WAN Connections: Configuring Frame Relay

IPv6: Understanding Basic Concepts and Addressing

IPv6: Configuring, Routing, and Interoperating

Certification: Some Last Words for Test Takers

Advanced TCP/IP: Working with Binary

Advanced TCP/IP: IP Subnetting, Part 1

Advanced TCP/IP: IP Subnetting, Part 2

00:00:00 - Let the adventure continue as we move into TCP/IP subnetting,
00:00:05 - Part 2. What we're going to do is build on the foundation that we
00:00:10 - laid in Part 1, which was the three steps of subnetting based
00:00:14 - on the number of networks, as in we had the number of networks
00:00:16 - that we needed and figured out our subnets from there. Well this video
00:00:21 - changes that scenario a little bit, flipping it on end and saying,
00:00:24 - we're going to subnet based on the number of hosts rather than
00:00:27 - the number of networks. Now this assumes that you did, you know you've
00:00:31 - gone through part one so I'm not gonna spend as much time reiterating
00:00:34 - the three steps, but I guarantee you that seeing this
00:00:38 - will not only help you with the scenarios we're presenting right
00:00:41 - here, with these four different scenarios, but you'll also get
00:00:44 - a better feel for even the scenarios from Part 1, because
00:00:47 - it is the same three steps and a very similar process. So let's
00:00:51 - get going.
00:00:53 - I'd like to start things off by a network scenario that's very
00:00:56 - similar to the one that we started the previous video with, so that
00:00:59 - you can see the differences. We have an organization that's
00:01:02 - purchased a Class C address, again,
00:01:06 - and would like to use it to create networks
00:01:10 - of up to 30 hosts each. So if you think back before, we were
00:01:16 - trying to work through this scenario based on creating five
00:01:19 - networks, one, two, three, four, five. But this scenario says I would
00:01:25 - like to create networks of 30 hosts each. So they're more
00:01:28 - focused on the number of hosts per network rather than the
00:01:31 - number of networks.
00:01:33 - When working through a subnetting problem of this slant, the
00:01:36 - steps are nearly identical as before. I should say the steps
00:01:40 - are identical, there's just a slight tweak as to what we're looking
00:01:43 - at. So step one was to determine the number of hosts and
00:01:47 - convert that to binary. Just like we saw with the number of networks.
00:01:51 - Here's our Class C subnet that we purchased. We know that we're
00:01:53 - trying to find networks of 30 hosts per network, so that's
00:01:58 - our host. Number of hosts: 30.
00:02:00 - With that in mind, let's break that down using the binary
00:02:04 - 128, 64, 32, 16, 8, 4, 2, 1. Now
00:02:10 - with these numbers in place, again we realize that we're
00:02:13 - only after the number of bits. So we don't need to figure out
00:02:16 - the whole number, although I will just for this example. 16
00:02:19 - plus 8, that's 24, plus 4, that's 28, plus
00:02:22 - two more, that's 30, and then we have a zero for the one. So
00:02:25 - the actual binary number for 30 is 0 0 0 1
00:02:30 - 1 1 1 0. But again, being that we're only after
00:02:34 - the number of bits, we're really focused on, it takes five bits
00:02:40 - to get the number 30. Step two is then to reserve the bits
00:02:45 - in the mask and find your increment. Here's where the slight
00:02:48 - tweak comes in. I'm going to take the original subnet mask, and we start
00:02:52 - off with a Class C example again,
00:02:55 - and write that in all binary
00:02:59 - so one, two, three, four, five, six, seven, eight; one, two, three, four,
00:03:03 - five, six, seven, eight; one, two, three, four, five, six, seven, eight;
00:03:07 - and one, two, three, four, five, six, seven, eight. I'll show you how to improve
00:03:12 - your speed on that in just a moment, on the next scenario.
00:03:15 - So we're looking at this right now in terms of, this is our
00:03:19 - original subnet mask and we need to do subnetting. Now in the previous
00:03:23 - video we were focused on, I need to more network bits because
00:03:28 - I needed five networks or 30 networks or 100 networks
00:03:31 - or whatever the scenario said. I was more focused on getting
00:03:35 - networks than I was on how many hosts were on each one of
00:03:39 - those networks. In this style, we're more focused on how many
00:03:44 - hosts we're getting - and yes, we're going to be doing subnetting, otherwise
00:03:48 - we wouldn't be here in the first place. We want to break it
00:03:50 - into networks but we're not as concerned with how many networks
00:03:54 - we get as we are with how many hosts can exist on each network.
00:03:58 - So when you're thinking of this, I want you to just say in your mind
00:04:02 - whenever you see how many hosts per network, just kind of like
00:04:05 - Save the Whales - save the hosts. You can scream it out
00:04:09 - loud, you know, whenever, wherever you want, because what we're
00:04:12 - focused on is saving the hosts. One, two, three, four, five, to
00:04:20 - be exact. Instead of working from left to right saying, I need
00:04:23 - five more network bits, I'm saying I can't get the number 30.
00:04:28 - I can't get 30 hosts without - or I should say
00:04:33 - with any less than five bits. We know that the host bits are
00:04:37 - zero, so we're saving five of them. Save the host, you can say it out
00:04:42 - loud. Now once we've saved the five host bits, the rest of them
00:04:48 - can become network bits. It can move over to the network
00:04:51 - side, the dark side of the force, because we're still doing subnetting.
00:04:55 - We still want to subnet but we're now focused on how many hosts
00:04:58 - we get rather than the specific number of the networks. So with
00:05:02 - that in mind, that is the only difference. So here we go, let's
00:05:06 - work through the subnet mask. Our new subnet mask is
00:05:09 - 255.255.255, and if we convert
00:05:14 - this one back to decimal, that will be.224. If
00:05:19 - we add up all those numbers. Or if we were using the bit notation,
00:05:23 - that would be a /24 plus three more, /27.
00:05:26 - Our increment is the lowest network bit, which is a
00:05:33 - 32.
00:05:35 - That's our increment. Now we can find our network ranges.
00:05:39 - We started with
00:05:45 - and then we just start adding 32.
00:05:48 -,.5.64,
00:05:53 - .96,.128,.160. You can just
00:05:57 - keep going you far as down as you'd like to go. Fill in the end ranges,
00:06:00 - last IP address before 32 - 31. Before 64 - 63.
00:06:05 - Now I'm really shorthand writing this right now, just to
00:06:08 - save the time, but this is filling in the end range for
00:06:11 - each one of them. It goes from
00:06:14 - through Can't use the last
00:06:18 - one, can't use the first one, so we actually get one through 30
00:06:22 - that are usable in between, which is exactly
00:06:26 - the number of hosts that we were looking for. Just how many subnets do
00:06:30 - we get? Two to the power of - well we introduced three more subnet
00:06:35 - bits - two to the power of three will end up being
00:06:39 - this is two to the power of zero, one, two, three, so we end up with eight total
00:06:44 - if we were to work this down the whole way. And if we were to do
00:06:48 - two to the power of five, because there's five host bits that we
00:06:52 - saved, minus two, that leaves us with 30 hosts per subnet.
00:06:58 - Now you might notice that I'm moving through these a little bit
00:07:00 - faster, because we've seen the foundation of the previous video
00:07:05 - where I work through them step by step, working very slow, explaining
00:07:08 - everything as I go along. What I'd like to do here is not only
00:07:11 - of course, introduce the new concept, but to get you faster
00:07:15 - at this as well, to move a little bit quicker through these
00:07:17 - scenario. So if it seems like I'm going faster, I am.
00:07:21 - We have another scenario, same style. We've got network scenario
00:07:25 - number two, Class C example. We have the network
00:07:30 - 195.5.20, and the organization is looking for 50 hosts
00:07:35 - per network. So let's start it off again. Determine the number of
00:07:38 - hosts and convert to binary. I'll write up our binary chart over here
00:07:42 - eight, four, two, and one. We have 50 hosts. So I look right here,
00:07:48 - no, no, yes. Our first one goes at 32, so I immediately know
00:07:53 - it takes six bits
00:07:57 - to get the number 50.
00:08:00 - Sorry, let me just change my font that I'm writing with
00:08:03 - so it's a little thicker so it looks a little neater. We've got 50 hosts equals six bits.
00:08:09 - Now what we need to do is reserve the bits in the subnet mask
00:08:13 - and find out increment. So our original subnet mask is
00:08:18 - I mentioned that I was going to show you a
00:08:21 - way to shorten this down, as well. Once you're comfortable doing this,
00:08:25 - you can look at this and say, well I can't really change the
00:08:29 - 255s, right, because since this was a Class C address
00:08:32 - to start off with, I can't change the original subnet mask.
00:08:35 - Meaning, I can't move it backwards, otherwise it wouldn't be a Class C
00:08:38 - address. So the way I do this is I just think okay, so that would
00:08:42 - be 24 ones, dot dot dot, dot one, two, three, four,
00:08:47 - five, six, seven, eight zeros, because the zeros are really
00:08:52 - your playground. That's where you can work. You can't change the
00:08:55 - original 24, so you can just kind of jot those up there
00:08:57 - like that, just quick shorthand instead of counting them all out.
00:09:01 - Now you have to ask the question, are we creating more networks
00:09:05 - or saving the hosts? And you have to put your hand in the air
00:09:08 - when you do that, it's required. We look and it's after the
00:09:11 - number of hosts. It's 50 hosts per network, so we are saving
00:09:15 - the hosts: one, two, three, four, five, six of them have been saved
00:09:22 - because we can't get the number 50 with any less than six
00:09:25 - bits. The other two host bits can change over to
00:09:29 - ones so that we can do our subnetting process. Once we do that,
00:09:33 - we know that our subnet mask will be
00:09:35 - 255.255.255. And we have two bits, if we add those
00:09:39 - together that would be.192 is our decimal subnet mask
00:09:43 - or a /26, which is the 24 original ones
00:09:48 - of the Class C, plus two more that we just added when we did our
00:09:52 - subnetting;/26 mask. Our increment - 64.
00:09:58 - Box, box, box, box, that is our number that we can use to find our ranges.
00:10:03 - So we say,, just
00:10:09 - start adding 64 to the fourth octet, because that's where
00:10:12 - we're at. 195.5.20-.64
00:10:17 - .128,.192, and if we add 64
00:10:22 - to 192, we'll actually get 256. Now immediately
00:10:28 - when you say that, and by this is the same all way down, I'm just
00:10:31 - shorthanding it here. When you see 256, you should immediately
00:10:35 - go okay, bing, I must have reached the end of something right
00:10:38 - there. So I just start filling in the end range, we get 63
00:10:41 - 127, 191, and this goes
00:10:48 - up to 255. There is no 256 because I'm done.
00:10:52 - Meaning I've reached my four network ranges that this will give
00:10:55 - me. I'm done - you might remember from the previous video
00:11:00 - where we actually started carrying over to the next octet. Well you
00:11:03 - can't do that here because you started with a Class C address.
00:11:06 - Meaning, you can't change the original network that you were given.
00:11:09 - You've just subnetted into four networks. And if you look at that, two the power
00:11:13 - of x being the subnet bits, so it'd just be two to the power of two; that's
00:11:17 - two times two is four. So that tells you you only get four network ranges
00:11:21 - with - it would be two to the power of six minus two, you actually end up
00:11:27 - with 62 hosts per subnet.
00:11:32 - Pretty cool, huh? Now a lot of this stuff that I'm doing, if like,
00:11:36 - adding 64 plus 64 plus 64 just comes
00:11:39 - from doing this a hundred thousand times. You'll - as you
00:11:43 - do this again and again and again, you'll practice. You'll get used to seeing
00:11:47 - what typical subnet values are, to where you can just see the
00:11:50 - two bits and go oh, that's 192. As a matter of fact, the longer
00:11:53 - you do this - I'm to the point in my subnetting where I've practiced
00:11:58 - this enough, and obviously teaching helps, so I'll tell you what - find
00:12:02 - a family relative and teach them how to subnet. They'll love
00:12:06 - you for it, and you'll learn it even better. But teaching this, I can just
00:12:09 - look at bits and say oh, that's 192. It's kind of like, have you ever
00:12:14 - see The Matrix, where the guy's looking at the matrix in an encoded
00:12:18 - format and he said, I don't even see the code anymore. I see
00:12:22 - you know, a guy, a girl walking, a blonde, a brunette, you know. It's
00:12:25 - just he's stared at the code for so long, it kind of fried his
00:12:29 - brain. You will get to the point where your brain is fried,
00:12:32 - and you will master subnetting.
00:12:35 - Now you might be noticing as we're working through these,
00:12:38 - I am emphasizing speed. Let me take just a moment and tell you why.
00:12:42 - Speed in the real world is not as critical. It's not like you'll
00:12:46 - be walking into a job where they're like, subnet this now, you've
00:12:48 - got 30 seconds, and that's what you've got to do. I just
00:12:52 - know that a lot of you are preparing for the CISCO certification
00:12:55 - exams. If you're getting ready for those, speed is of the essence.
00:13:00 - CCENT, CCNA, and even CCNP, just about anything
00:13:06 - you do in the CISCO world will have subnetting involved in it and
00:13:10 - you'll have to do it and have to do it fast. So just to give
00:13:14 - you an idea of where we've come from,
00:13:17 - I'm always watching the clock when I'm recording to
00:13:20 - make sure that we don't get too long or too short of things
00:13:22 - like that. When we first did the subnetting examples
00:13:25 - when we were in the previous video,
00:13:29 - we were at about 11 to 14 minutes per problem as
00:13:33 - I was working through and explaining what I'm doing as I go.
00:13:36 - The two problems that we've done so far, the two scenarios, we've
00:13:39 - spent - the first one was five minutes, and the last one was four
00:13:43 - and-a-half minutes working through those. So my recommendation
00:13:47 - is when you're working through these,
00:13:49 - obviously you're not going to have a voice in your head - well
00:13:52 - maybe you will - but explaining it as you go, and you'll be able
00:13:55 - to write much faster. But I would gauge your time and try to aim
00:13:58 - somewhere between two to three minutes per problem,
00:14:02 - when you get to one of these. That's when you know you've got
00:14:04 - it fast enough to prepare for the actual certification exam.
00:14:09 - All right, Network Scenario number three. We've got now a Class B network.
00:14:15 - I've changed it up a little bit, and someone was reading
00:14:18 - CISCO Best Practice Documentation and now it says I need
00:14:21 - 500 hosts per subnet. That's what CISCO says should
00:14:24 - be the maximum. So now we go with our 500, write out our binary
00:14:29 - chart - 1, 2, 4, 8, 16, 32, 64,
00:14:36 - 128 - but I know I must go further in order to get the
00:14:39 - number 500 because that's above eight bits. So I go
00:14:43 - 256 is my next one, double that and you've got 512.
00:14:47 - And immediately I can stop there because I've passed
00:14:51 - my 500. Now that's not where my first one goes. My first
00:14:54 - one goes right here, because I can't subtract 512 from
00:14:57 - 500. So just by drawing my initial one, I can see that
00:15:00 - it's going to take nine bits to get the number from 500.
00:15:04 - Second step, reserve the bits in the mask and find
00:15:09 - your network range. So original subnet mask,
00:15:13 - We're going to write that in binary, which is 16
00:15:18 - ones, dot one, two, three, four, five, six, seven, eight zeros.
00:15:25 - You don't want to shortcut the zeros because that's really where you
00:15:28 - work. Eight. So we've got our 16 zeros. Now are we creating a
00:15:33 - 500 networks or saving
00:15:37 - the hosts. Saving the hosts. Not only is it more fun to say, but it's more fun to
00:15:41 - do. We have nine bits right to left, one, two, three, four, five,
00:15:46 - six, seven, eight, dot
00:15:50 - nine. We've crossed that octet boundary. The rest of them
00:15:54 - can become one. One, two, three, four, five, six, seven. That was the
00:15:58 - rest of those bits that were in the third octet. So with that
00:16:02 - in mind, I can look and say my new subnet mask is
00:16:06 -, is that guy,
00:16:12 - or a /23. I just think of Class C address with
00:16:16 - all these being one is a /24, so we subtract one. Our
00:16:20 - increment, circle that guy, that guy is two, in decimal.
00:16:24 - So we look at what octet that increment is in. It's in
00:16:28 - the third octet, so I start down here with
00:16:34 - and I'll increment in that third octet:;
00:16:39 - .5.4.0,.6.0,
00:16:45 - .8.0, and so on and so on we go. The end range goes
00:16:49 - through
00:16:55 - This goes through
00:17:00 - This goes through 5.255, and so on, whoop; 255.
00:17:04 - And so on and so forth we go down the way.
00:17:08 - If you were watching the clock on that previous network scenario
00:17:11 - number three, it was two minutes, 54 seconds we took, once I
00:17:16 - got out of my, you know, once we started actually working
00:17:19 - on the problem. Pretty good. That's the kind of time frame you
00:17:22 - need to be looking out for these. All right, now work scenario
00:17:25 - number four. Class A address, we have and need
00:17:31 - 100 hosts per network. So 100, how many bits does it take
00:17:35 - to get that number? 128, 64, 32, 16,
00:17:39 - 8, 4, 2, 1. Our first one goes right there so immediately
00:17:44 - I know it is seven bits.
00:17:48 - Step two, our original subnet mask
00:17:50 - was, which is eight ones, dot
00:17:57 - one, two, three, four, five, six, seven, eight, dot one, two, three,
00:18:01 - four five six seven eight dot one two three four five six
00:18:06 - seven, eight. Can't really shortcut Class A subnet masks. So we've got 24
00:18:11 - zeros that we're working with. So with that in place, we know that
00:18:15 - we are needing seven bits and that we're after the number of
00:18:18 - hosts. So save the hosts, right to left: one, two, three, four, five,
00:18:24 - six, seven, one. So that's our eight bits of our last octet. What happens to
00:18:30 - all the rest of these bits? They change over to one. So we did quite
00:18:35 - a number of subnets when we went with this Class A address.
00:18:38 - So we ended up going to 255.255.255
00:18:42 - dot, and then the last octet is 128.
00:18:46 - Our increment is - circle that - 128. Happens
00:18:52 - to be the same as our subnet mask. So now with our network ranges, we start
00:18:57 - with Now to find out where to increment,
00:19:01 - we need to look at where our increment is at. It's in the last
00:19:04 - octet over there. So I say,
00:19:10 - the fourth octet is where I increment. 10.0.; oh,
00:19:13 - stop right there. If I add 128 to
00:19:16 - to 128, I'll get 256. I know that's
00:19:20 - not possible, so
00:19:23 - if I fill in the end ranges I'll have 128 to -
00:19:27 - or zero to 127, is the previous one. This goes
00:19:30 - up to - if the next one was 256, this would be 255.
00:19:34 - So again, do that - we did this in the previous video, just
00:19:38 - kind of add the one, carry it over to the next octet, we start with
00:19:41 - 1.0, 1.128, 2.0, 2.128,
00:19:46 - and so on and so forth we go down the way. Fill in the
00:19:50 - end ranges. This goes through 10.1 - or
00:19:53 - through
00:19:59 - Sorry, I'm - I was trying to beat the clock. I'm sorry. But that
00:20:04 - that's how we're going to work this. Sorry for the extreme
00:20:07 - shorthand, but this is working through a Class A
00:20:12 - example and we would keep on going, keep incrementing through
00:20:15 - all of the Class B and C octets. So if you wanted to find
00:20:19 - how many subnets you would have, it would be two to the power of - we converted
00:20:24 - one, eight, 16 - two to the power of
00:20:30 - 17. So that would be 17 bits total. I had to think about
00:20:33 - that one - will tell us how many networks you'll have. Thankfully
00:20:37 - if you're preparing for the exam, they will never have a question
00:20:40 - asking you that kind of math without a calculator. So I'll do two to
00:20:43 - the power of 17 equals - yeah, 131,000
00:20:48 - subnets are at our disposal when we subnet a class
00:20:52 - A address like that. Excellent.
00:20:57 - At this point, you should be getting a little better feel for
00:21:00 - how this subnetting works. As I did in the previous video, I have
00:21:04 - an on your own section. It's essentially homework to work through.
00:21:09 - Four different examples of, this time, breaking into networks
00:21:12 - based on host requirements rather than network requirements.
00:21:16 - As I did for the previous video, working through these without
00:21:19 - having an answer to check yourself isn't very helpful, so I've
00:21:22 - typed up a little walkthrough for each one of these, essentially
00:21:25 - the three steps we've been working through so far, so that when
00:21:28 - you finish them, you can compare your answers to what I have.
00:21:31 - That's available off of, and just look for the
00:21:35 - CCENT pack of some sort. It'll be a zip file where you can download
00:21:41 - all of this paperwork. We've got, after this, one more style of
00:21:45 - subnetting to show you. And in my mind, it's the easiest but
00:21:50 - it's the most common style that's out there.
00:21:54 - Let's talk about, before we get into the new style, where we've
00:21:58 - been so far. At this point, you should know how to subnet based
00:22:02 - on the number of networks, if you were given x number of networks
00:22:05 - you can break apart addresses and break them into subnets
00:22:08 - that meet those requirements. And you should be able to do that
00:22:12 - for hosts. When somebody says, I need this many hosts per network,
00:22:16 - then you can work through that, save the hosts, and
00:22:21 - meet those requirements and come up with a subnet mask and
00:22:23 - network ranges to deliver. I hope this has been informative for you
00:22:27 - and I'd like to thank you for viewing.

Advanced TCP/IP: IP Subnetting, Part 3

Please help us improve by sharing your feedback on training courses and videos. For customer service questions, please contact our support team. The views expressed in comments reflect those of the author and not of CBT Nuggets. We reserve the right to remove comments that do not adhere to our community standards.

comments powered by Disqus

Course Features

Speed Control

Play videos at a faster or slower pace.


Pick up where you left off watching a video.


Jot down information to refer back to at a later time.

Closed Captions

Follow what the trainers are saying with ease.

Offline Training

Our mobile apps offer the ability to download videos and train anytime, anywhere offline.

Accountability Coaching

Develop and maintain a study plan with assistance from coaches.
Jeremy Cioara

Jeremy Cioara

CBT Nuggets Trainer

Cisco CCNA, CCDA, CCNA Security, CCNA Voice, CCNP, CCSP, CCVP, CCDP, CCIE R&S; Amazon Web Services CSA; Microsoft MCP, MCSE, Novell CNA, CNE; CompTIA A+, Network+, iNet+

Area Of Expertise:
Cisco network administration and development. Author or coauthor of numerous books, including: CCNA Voice 640-461 Official Cert Guide; CCNA Voice Official Exam Certification Guide (640-460 IIUC); CCENT Exam Prep (Exam 640-822); CCNA Exam Cram (Exam 640-802) 3rd Edition; and CCNA Voice 640-461 Official Cert Guide.

Stay Connected

Get the latest updates on the subjects you choose.

  © 2015 CBT Nuggets. All rights reserved. Licensing Agreement | Billing Agreement | Privacy Policy | RSS