Todd Lammle - Subnetting-Sybex (2017)-11

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

10 Easy Subnetting

■■ What are the valid subnets? 256 – subnet mask = block size, or increment number. An
example would be the 255.255.255.192 mask, where the interesting octet is the fourth
octet (interesting because that is where our subnet numbers are). Just use this math:
256 – 192 = 64. The block size of a 192 mask is always 64. Start counting at zero in
blocks of 64 until you reach the subnet mask value and these are your subnets in the
fourth octet: 0, 64, 128, 192. Easy, huh?
■■ What’s the broadcast address for each subnet? Now here’s the really easy part.
Since we counted our subnets in the last section as 0, 64, 128, and 192, the broadcast
address is always the number right before the next subnet. For example, the 0 sub-
net has a broadcast address of 63 because the next subnet is 64. The 64 subnet has a
broadcast address of 127 because the next subnet is 128, and so on. Remember, the
broadcast address of the last subnet is always 255.
■■ What are the valid hosts? Valid hosts are the numbers between the subnets, omitting
the all-0s and all-1s. For example, if 64 is the subnet number and 127 is the broadcast
address, then 65–126 is the valid host range. Your valid range is always the group of
numbers between the subnet address and the broadcast address.
If you’re still confused, don’t worry because it really isn’t as hard as it seems to be at
first—just hang in there! To help lift any mental fog, try a few of the practice examples next.

Subnetting Practice Examples: Class C Addresses


Here’s your opportunity to practice subnetting Class C addresses using the method I just
described. This is so cool. We’re going to start with the first Class C subnet mask and work
through every subnet that we can, using a Class C address. When we’re done, I’ll show you
how easy this is with Class A and B networks too!

Practice Example #1C: 255.255.255.128 (/25)


Since 128 is 10000000 in binary, there is only 1 bit for subnetting and 7 bits for hosts.
We’re going to subnet the Class C network address 192.168.10.0.
192.168.10.0 = Network address
255.255.255.128 = Subnet mask
Now, let’s answer our big five:
■■ How many subnets? Since 128 is 1 bit on (10000000), the answer would be 21 = 2.
■■ How many hosts per subnet? We have 7 host bits off (10000000), so the equation
would be 27 – 2 = 126 hosts. Once you figure out the block size of a mask, the amount
of hosts is always the block size minus 2. No need to do extra math if you don’t need to!
■■ What are the valid subnets? 256 – 128 = 128. Remember, we’ll start at zero and count
in our block size, so our subnets are 0, 128. By just counting your subnets when count-
ing in your block size, you really don’t need to do steps 1 and 2. We can see we have
two subnets, and in the step before this one, just remember that the amount of hosts is
always the block size minus 2, and in this example, that gives us 2 subnets, each with
126 hosts.
Subnetting Basics 11

■■ What’s the broadcast address for each subnet? The number right before the value of
the next subnet is all host bits turned on and equals the broadcast address. For the zero
subnet, the next subnet is 128, so the broadcast of the 0 subnet is 127.
■■ What are the valid hosts? These are the numbers between the subnet and broadcast
address. The easiest way to find the hosts is to write out the subnet address and the
broadcast address, which makes valid hosts completely obvious. The following table
shows the 0 and 128 subnets, the valid host ranges of each, and the broadcast address
of both subnets:

Subnet 0 128
First host 1 129
Last host 126 254
Broadcast 127 255

Looking at a Class C /25, it’s pretty clear that there are two subnets. But so what—why
is this significant? Well actually, it’s not because that’s not the right question. What you
really want to know is what you would do with this information!
I know this isn’t exactly everyone’s favorite pastime, but what we’re about to do is really
important, so bear with me; we’re going to talk about subnetting—period. The key to
understanding subnetting is to understand the very reason you need to do it, and I’m going
to demonstrate this by going through the process of building a physical network.
Okay—because we added that router shown in Figure 3, in order for the hosts on our
internetwork to communicate, they must now have a logical network addressing scheme.
We could use IPv6, but IPv4 is still the most popular for now. It’s also what we’re studying
at the moment, so that’s what we’re going with.

Figure 3 Implementing a Class C /25 logical network

.2 .3 .4 .130 .131 .132

192.168.10.0 .1 .129 192.168.10.128

Router#show ip route
[output cut]
C 192.168.10.0 is directly connected to Ethernet 0
C 192.168.10.128 is directly connected to Ethernet 1

Looking at Figure 3, you can see that there are two physical networks, so we’re going
to implement a logical addressing scheme that allows for two logical networks. As always,

You might also like