You are on page 1of 4

Subnetting a Class C network address

Let’s face it, some day you are going to have to subnet a network. Although IP add
ressing isn’t a network administrator’s favorite task, it’s a critical skill that you
must have. In this Daily Drill Down, I will continue our discussion of IP addres
sing by exploring the process of taking a large IP address range and dividing it
into smaller, more manageable pieces. Since this is a complicated, involved pro
cess, I will only discuss the process of breaking up Class C networks. First, we
need to discuss why we want to subnet a network and the advantages of doing so.
Why subnetting? By creating smaller IP networks (instead of having one large ne
twork), we can obtain better security, smaller collision and broadcast domains,
and greater administrative control of each network. Think of a network like stre
ets in a city. Each house on this network is known by the street and by the addr
ess. Think of the addresses on the houses as the hardware addresses of a host. F
or IP to communicate with a host, the IP address must be known, and the router c
onnected to the network on which this host is located must also know the hardwar
e address of the house. What if a city didn’t have many blocks but just one long s
treet? The mailman would go crazy trying to get the mail delivered to each house
correctly because he would have to know the address of every house. It’s the same
scenario with IP. By creating smaller networks, we can more effectively get dat
a to each host. Subnetting a Class C network So you understand why you want to s
ubnet, but how do you do it? Your goal is to look at an IP address and subnet ma
sk of a host and then determine three things quickly:
1. The subnet the host is located in
2. The broadcast address of the subnet
3. The valid host range of the subnet used to configure hosts
Once the subnet is determined, the broadcast address must be found. Why? Because
these are not valid host addresses and cannot be assigned to host configuration
s. Also, by determining the subnet and broadcast addresses, we can easily determ
ine the host addresses because the valid host range is always the numbers betwee
n the subnet address and the broadcast address. If we use the default subnet mas
k with a Class C network address, then we already know that three bytes are used
to define the network and only one byte is used to define the hosts on each net
work. The default Class C mask is: 255.255.255.0. To make smaller networks, call
ed subnetworks,
we will borrow bits from the host portion of the mask. Since the Class C mask on
ly uses the last octet for host addressing, we only have 8 bits at our disposal.
Therefore, only the following masks can be used with Class C networks (Table A)
.
Subset zero Take note that in the table below I do not assume subnet zero. Cisco
does teach a subnet zero assumption but they do not test that way. I have chose
n to follow the exam.
Table A
Mask
Binary
# Subnet bits
# Host bits
Subnets
Hosts
255.255.255.128
10000000
1
7
2
126
255.255.255.192
11000000
2
6
2
62
255.255.255.224
11100000
3
5
6
30
255.255.255.240
11110000
4
4
14
14
255.255.255.248
11111000
5
3
30
6
255.255.255.252
11111100
6
2
62
2
Class C masks
You can see in Table A that the bits that are turned on (1s) are used for subnet
ting, while the bits that are turned off (0s) are used for addressing of hosts.
You can use some easy math to determine the number of subnets and hosts per subn
et for each different mask. To determine the number of subnets, use the 2x-2, wh
ere the x exponent is the number of subnet bits in the mask. To determine the nu
mber of hosts, use the 2x-2, where the x exponent is the number of host bits in
the mask. To determine the mask you need for your network, you must first determ
ine your business requirements. Count the number of networks and the number of h
osts per network that you need. Then determine the mask by using the equations s
hown above—and don’t forget to factor for growth. For example, if you have eight net
works and each requires 10 hosts, you would use the Class C mask of 255.255.255.
240. Why? Because 240 in binary is 11110000, which means you have four subnet bi
ts and four host bits. Using our math, we’d get the following: 24-2=14 subnets 24-
2=14 hosts Many people find it easy to memorize the Class C information because
Class C networks have few bits to manipulate. However, there is an easier way to
subnet. Easy subnetting
Instead of memorizing the entire table (Table A), it’s possible to glance at a hos
t address and quickly determine the necessary information if you’ve memorized key
parts of the table. First, you need to know your binary-to-decimal conversion. M
emorize the number of bits used with each mask that are shown in Table A. Second
, you need to remember the following: 256-192=64 256-224=32 256-240=16 256-248=8
256-252=4 Once you have the two steps memorized, you can begin subnetting. Our
first example will use the Class C mask of 255.255.255.192. Ask five simple ques
tions to gather all the facts:
1. How many subnet bits are used in this mask?
2. How many host bits are available per subnet?
3. What are the subnet addresses?
4. What is the broadcast address of each subnet?
5. What is the valid host range of each subnet?
You already know how to answer questions one and two. To answer question three,
use the formula 256-subnetmask to get the first subnet and your variable. Keep a
dding this number to itself until you get to the subnet mask value to determine
the valid subnets. Once you verify all of the subnets, you can determine the bro
adcast address by looking at the next subnet’s value. The broadcast address is the
number just before the next subnet number. Once you have the subnet number and
broadcast address, the valid hosts are the numbers in between. Here are the answ
ers using 255.255.255.192:
1. How many subnet bits are used in this mask? Answer: 2 22
2. How many host bits are available per subnet? Answer: 6 2-2=2 subnets
6
3. What are the subnet addresses? Answer: 256-192=64 (the first subnet) 64+64=12
8 (the second subnet) 64+128=192. However, although 192 is the subnet mask value
, it’s not a valid subnet. The valid subnets are 64 and 128. -2=62 hosts per subne
t
4. What is the broadcast address of each subnet? Answer: 64 is the first subnet
and 128 is the second subnet. The broadcast address is always the number before
the next subnet. The broadcast address of the 64 subnet is 127. The broadcast ad
dress of the 128 subnet is 191.
5. What is the valid host range of each subnet? Answer: The valid hosts are the
numbers between the subnet number and the mask. For the 64 subnet, the valid hos
t range is 64-126. For the 128 subnet, the valid host range is 129-190.
Let’s do a second example using the Class C mask of 255.255.255.224. Here are the
answers:
1. How many subnet bits are used in this mask? Answer: 3 bits or 23
2. How many host bits are available per subnet? Answer: 5 bits or 2-2=6 subnets
5
3. What are the subnet addresses? Answer: 256-224 =32, 64, 96, 128, 160 and 192
(Six subnets found by continuing to add 32 to itself.) -2=30 hosts per subnet
4. What is the broadcast address of each subnet? Answer: The broadcast address f
or the 32 subnet is 63. The broadcast address for the 64 subnet is 95. The broad
cast address for the 96 subnet is 127. The broadcast address for the 160 subnet
is 191. The broadcast address for the 192 subnet is 223 (since 224 is the mask).
5. What is the valid host range of each subnet? Answer: The valid hosts are the
numbers in between the subnet and broadcast addresses. For example, the 32 subne
t valid hosts are 33-62.
Let’s do a third example using the Class C mask of 255.255.255.240. Here are the a
nswers:
1. How many subnet bits are used in this mask? Answer: 4 bits or 24
2. How many host bits are available per subnet? Answer: 4 bits or 2-2=14 subnets
4
3. What are the subnet addresses? Answer: 256-240 =16, 32, 48, 64, 80, 96, 112,
128, 144. 160, 176, 192, 208 and 224 (14 subnets found by continuing to add 16 t
o itself.) -2=14 hosts per subnet
4. What is the broadcast address of each subnet? Answer: Here are some examples
of the broadcast address: The broadcast address for the 16 subnet is 31. The bro
adcast address for the 32 subnet is 47. The broadcast address for the 64 subnet
is 79. The broadcast address for the 96 subnet is 111. The broadcast address for
the 160 subnet is 175. The broadcast address for the 192 subnet is 207.
5. What is the valid host range of each subnet? Answer: The valid hosts are the
numbers in between the subnet and broadcast addresses. The 32 subnet valid hosts
are 33-46.
Let’s do a fourth example using the Class C mask of 255.255.255.248. Here are the
answers:
1. How many subnet bits are used in this mask? Answer: 5 bits or 25
2. How many host bits are available per subnet? Answer: 3 bits or 2-2=30 subnets
3
3. What are the subnet addresses? Answer 256-248 =8, 16, 24, 32, 40, 48, and so
forth. The last subnet is 240 (30 subnets found by continuing to add 8 to itself
). -2=6 hosts per subnet
4. What is the broadcast address of each subnet? Answer: The broadcast address f
or the 8 subnet is 15. The broadcast address for the 16 subnet is 23. The broadc
ast address for the 48 subnet is 55.
5. What is the valid host range of each subnet? Answer: The valid hosts are the
numbers in between the subnet and broadcast addresses. For example, the 32 subne
t valid hosts are 33-38.
Let’s do a fifth example using the Class C mask of 255.255.255.252. Here are the a
nswers:
1. How many subnet bits are used in this mask? Answer: 6 bits or 26
2. How many host bits are available per subnet? Answer: 2 bits or 2-2=62 subnets
2
3. What are the subnet addresses? Answer: 256-252 =4, 8, 12, 16, 20, and so fort
h. The last subnet is 248 (62 subnets found by continuing to add 4 to itself). -
2=2 hosts per subnet
4. What is the broadcast address of each subnet? Answer: The broadcast address f
or the 4 subnet is 7. The broadcast address for the 8 subnet is 11. The broadcas
t address for the 12 subnet is 15. The broadcast address for the 20 subnet is 23
.
5. What is the valid host range of each subnet? Answer: The valid hosts are the
numbers in between the subnet and broadcast addresses. For example, the 16 subne
t valid hosts are 17 and 18.
How do I use this information? Let’s take a look at an example that will highlight
how the above information is applied. A host configuration has an IP configurat
ion of 192.168.10.17 255.255.255.248. What are the subnet, broadcast address, an
d host range that this host is a member of? The answer is: 256-248=8, 16, 24. Th
is host is in the 16 subnet, the broadcast address of the 16 subnet is 23, and t
he valid host range is 17-22. Pretty easy! Here is an explanation of this exampl
e: First, I used 256-subnetmask to get the variable and first subnet. Then I kep
t adding this number to itself until I passed the host address. The
subnet is the number before the host address, and the broadcast address is the n
umber right before the next subnet. The valid hosts are the numbers in between t
he subnet and broadcast address. Let’s examine a second example. A host configurat
ion has an IP configuration of 192.168.10.37 255.255.255.240. What are the subne
t, broadcast address, and host range this host is a member of? The answer is: 25
6-240=16, 32, 48. This host is in the 32 subnet, the broadcast address of the 32
subnet is 47, and the valid host range is 33-46. Let’s go through a third example
: A host configuration has an IP configuration of 192.168.10.44 255.255.255.224.
What are the subnet, broadcast address, and host range this host is a member of
? The answer is: 256-224=32, 64. This host is in the 32 subnet, the broadcast ad
dress of the 32 subnet is 63, and the valid host range is 33-62. Here’s a fourth e
xample: A host configuration has an IP configuration of 192.168.10.17 255.255.25
5.252. What are the subnet, broadcast address, and host range this host is a mem
ber of? The answer is: 256-252=4, 8, 12, 16, 20. This host is in the 16 subnet,
the broadcast address of the 16 subnet is 19, and the valid host range is 17-18.
Let’s go through a final example. A host configuration has an IP configuration of
192.168.10.88 255.255.255.192. What are the subnet, broadcast address and host
range this host is a member of? The answer is: 256-192=64, 128. This host is in
the 64 subnet, the broadcast address of the 64 subnet is 127, and the valid host
range must be 65-126. Conclusion It is important to be able to subnet quickly a
nd efficiently. After studying the examples presented in this Daily Drill Down,
you should be familiar with this process with Class C addresses. Practice your s
ubnetting as much as possible, and the process will get easier and easier. In my
next Daily Drill Down, I’ll take subnetting a step further and discuss subnetting
a Class B network address.

You might also like