Cisco CCENT Practice and Study Guide - Subnetting IP Networks - Subnetting An IPv4 Network
Cisco CCENT Practice and Study Guide - Subnetting IP Networks - Subnetting An IPv4 Network
Subnetting IP Networks
Date: Feb 25, 2014 By Allan Johnson. Sample Chapter is provided courtesy of Cisco Press.
This chapter reviews the process of subnetting IP networks. First, by reviewing a process
for subnetting IPv4 networks, then, by practicing subnetting skills, including several
scenarios.
Understanding the hierarchical structure of the IP address and how to modify that hierarchy in
order to more efficiently meet routing requirements is an important part of planning an IP
addressing scheme. This chapter reviews the process of subnetting IP networks. First, we
review a process for subnetting IPv4 networks. Then, you practice subnetting skills, including
several scenarios. Then, we briefly review subnetting IPv6 networks.
The process of segmenting a network, by dividing it into multiple smaller network spaces, is
called subnetting. These subnetworks are called subnets. Although subnetting calculators are
plentiful and freely accessible on the Internet, you must know how to subnet without using a
calculator when you sit for the CCENT exam. Furthermore, subnetting skill will serve you well
when troubleshooting common IP addressing issues.
Step 1. Determine how many bits to borrow based on the network requirements.
Step 4. List the subnets, including subnetwork address, host range, and broadcast address.
Subnetting Example
The best way to demonstrate the four steps of subnetting is to use an example. Let’s assume
that you are given the network address 192.168.1.0/24, you need 30 hosts per network, and
want to create as many subnets as possible.
Because our requirement specifies 30 host addresses per subnet, we need to first determine
the minimum number of host bits to leave. The remaining bits can be borrowed:
To provide enough address space for 30 hosts, we need to leave 5 bits. Use the following
formula:
Remember, the “minus 2” is to account for the network and broadcast addresses that cannot
be assigned to hosts.
In this example, leaving 5 bits in the host portion will provide the right number of host address:
25 – 2 = 30
Because we have 3 bits remaining in the original host portion, we borrow all these bits to
satisfy the requirement to “create as many subnets as possible.” To determine how many
subnets we can create, use the following formula:
In this example, borrowing 3 bits from the host portion will create 8 subnets: 23 = 8.
As shown in Table 9-1, the 3 bits are borrowed from the far-left bits in the host portion. The
highlighted bits in the table show all possible combinations of manipulating the 8 bits
borrowed to create the subnets.
Subnet Number Last Octet Binary Value Last Octet Decimal Value
0 00000000 .0
1 00100000 .32
Subnet Number Last Octet Binary Value Last Octet Decimal Value
2 01000000 .64
3 01100000 .96
4 10000000 .128
5 10100000 .160
6 11000000 .192
7 11100000 .224
Notice in Table 9-1 that the network bits now include the 3 borrowed host bits in the last octet.
Add these 3 bits to the 24 bits in the original subnet mask and you have a new subnet mask,
/27. In decimal format, you turn on the 128, 64, and 32 bits in the last octet for a value of 224.
So, the new subnet mask is 255.255.255.224.
Notice in Table 9-1 that the last octet decimal value increments by 32 with each subnet
number. The number 32 is the subnet multiplier. You can quickly find the subnet multiplier
using one of two methods:
Method 1: Subtract the last nonzero octet of the subnet mask from 256. In this
example, the last nonzero octet is 224. So, the subnet multiplier is 256 – 224 = 32.
Method 2: The decimal value of the last bit borrowed is the subnet multiplier. In this
example, we borrowed the 128 bit, the 64 bit, and the 32 bit. The 32 bit is the last bit
we borrowed and is, therefore, the subnet multiplier.
By using the subnet multiplier, you no longer have to convert binary subnet bits to decimal.
Listing the subnets, host ranges, and broadcast addresses helps you see the flow of
addresses within one address space. Table 9-2 documents our subnet addressing scheme for
the 192.168.1.0/24 address space. Fill in any missing information.
Table 9-2 Subnet Addressing Scheme for 192.168.1.0/24: 30 Hosts Per Subnet
Subnetting Scenario 1
Subnet the address space 10.10.0.0/16 to provide at least 100 host addresses per subnet
while creating as many subnets as possible.
In Table 9-3, list the first three subnets, host ranges, and broadcast addresses.
In Table 9-4, list the first three subnets, host ranges, and broadcast addresses.
Subnetting Scenario 3
Subnet the address space 10.10.10.0/23 to provide at least 60 host addresses per subnet
while creating as many subnets as possible.
In Table 9-5, list the first three subnets, host ranges, and broadcast addresses.
VLSM Review
You probably noticed that the starting address space in Subnetting Scenario 3 is not an entire
classful address. In fact, it is subnet 5 from Subnetting Scenario 2. So in Subnetting Scenario
3, you “subnetted a subnet.” That is what VLSM is in a nutshell: subnetting a subnet.
Let’s use a small example. Given the address space 172.30.4.0/22 and the network
requirements shown in Figure 9-1, apply an addressing scheme that conserves the most
amount of addresses for future growth.
Figure 9-1 VLSM Example Topology
We need five subnets: four LAN subnets and one WAN subnet. Starting with the largest host
requirement on LAN 3, begin subnetting the address space.
To satisfy the 250 hosts requirement, we leave 8 hosts bits (28 – 2 = 254 hosts per subnet).
Because we have 10 host bits total, we borrow 2 bits to create the first round of subnets (22 =
4 subnets). The starting subnet mask is /22 or 255.255.252.0. We turn on the next two bits in
the subnet mask to get /24 or 255.255.255.0. The multiplier is 1. The four subnets are as
follows:
Subnet 0: 172.30.4.0/24
Subnet 1: 172.30.5.0/24
Subnet 2: 172.30.6.0/24
Subnet 3: 172.30.7.0/24
Assigning Subnet 0 to LAN 3, we are left with three /24 subnets. Continuing on to the next
largest host requirement on LAN 4, we take Subnet 1, 172.30.5.0/24, and subnet it further.
To satisfy the 100 hosts requirement, we leave 7 bits (27 – 2 = 128 hosts per subnet).
Because we have 8 host bits total, we can borrow only 1 bit to create the subnets (21 = 2
subnets). The starting subnet mask is /24 or 255.255.255.0. We turn on the next bit in the
subnet mask to get /25 or 255.255.255.128. The multiplier is 128. The two subnets are as
follows:
Subnet 0: 172.30.5.0/25
Subnet 1: 172.30.5.128/25
Assigning Subnet 0 to LAN 4, we are left with one /25 subnet and two /24 subnets. Continuing
on to the next largest host requirement on LAN 1, we take Subnet 1, 172.30.5.128/25, and
subnet it further.
To satisfy the 60 hosts requirement, we leave 6 bits (26 – 2 = 62 hosts per subnet). Because
we have 7 host bits total, we borrow 1 bit to create the subnets (21 = 2 subnets). The starting
subnet mask is /25 or 255.255.255.128. We turn on the next bit in the subnet mask to get /26
or 255.255.255.192. The multiplier is 64. The two subnets are as follows:
Subnet 0: 172.30.5.128/26
Subnet 1: 172.30.5.192/26
Assigning Subnet 0 to LAN 1, we are left with one /26 subnet and two /24 subnets. Finishing
our LAN subnetting with LAN 2, we take Subnet 1, 172.30.5.192/26, and subnet it further.
To satisfy the 10 hosts requirement, we leave 4 bits (24 – 2 = 14 hosts per subnet). Because
we have 6 host bits total, we borrow 2 bits to create the subnets (22 = 4 subnets). The starting
subnet mask is /26 or 255.255.255.192. We turn on the next two bits in the subnet mask to get
/28 or 255.255.255.240. The multiplier is 16. The four subnets are as follows:
Subnet 0: 172.30.5.192/28
Subnet 1: 172.30.5.208/28
Subnet 2: 172.30.5.224/28
Subnet 3: 172.30.5.240/28
Assigning Subnet 0 to LAN 2, we are left with three /28 subnets and two /24 subnets. To
finalize our addressing scheme, we need to create a subnet only for the WAN link, which
needs only two host addresses. We take Subnet 1, 172.30.5.208/28, and subnet it further.
To satisfy the two hosts requirement, we leave 2 bits (22 – 2 = 2 hosts per subnet). Because
we have 4 host bits total, we borrow 2 bits to create the subnets (22 = 4 subnets). The starting
subnet mask is /28 or 255.255.255.240. We turn on the next 2 bits in the subnet mask to get
/30 or 255.255.255.252. The multiplier is 4. The four subnets are as follows:
Subnet 0: 172.30.5.208/30
Subnet 1: 172.30.5.212/30
Subnet 2: 172.30.5.216/30
Subnet 3: 172.30.5.220/30
We assign Subnet 0 to the WAN link. We are left with three /30 subnets, two /28 subnets, and
two /24 subnets.
Exercise 1
Assume that 4 bits were borrowed from the host portion of 192.168.1.0/24. You are not using
VLSM. Starting with Subnet 0, label Figure 9-2 contiguously with subnets. Start with the LAN
on RTA and proceed clockwise.
How many total valid host addresses will be wasted on the WAN links?
Now come up with a better addressing scheme using VLSM. Start with the same 4 bits
borrowed from the host portion of 192.168.1.0/24. Label each of the LANs with a subnet. Then
subnet the next available subnet to provide WAN subnets without wasting any host
addresses. Label Figure 9-3 with the subnets.
List the address space that is still available for future expansion.
The topology shown in Figure 9-4 has LAN subnets already assigned out of the
192.168.1.0/24 address space. Using VLSM, create and label the WANs with subnets from
the remaining address space.
List the address space that is still available for future expansion.
Exercise 2
Your address space is 192.168.1.192/26. Each LAN needs to support ten hosts. Use VLSM to
create a contiguous IP addressing scheme. Label Figure 9-5 with your addressing scheme.
Don’t forget the WAN links.
List the address space that is still available for future expansion.
Exercise 3
Your address space is 192.168.6.0/23. The number of hosts needed for each LAN is shown in
Figure 9-6. Use VLSM to create a contiguous IP addressing scheme. Label Figure 9-6 with
your addressing scheme. Don’t forget the WAN links.
List the address space that is still available for future expansion.
Exercise 4
Your address space is 10.10.96.0/21. The number of hosts needed for each LAN is shown in
Figure 9-7. Use VLSM to create a contiguous IP addressing scheme. Label Figure 9-7 with
your addressing scheme. Don’t forget the WAN links.
List the address space that is still available for future expansion.
Lab - Designing and Implementing a VLSM Addressing Scheme (ITN 9.2.1.4/NB 8.2.1.4)
The subnet ID of an IPv6 address provides 16 bits for subnetting. That’s a total of 216 or
65,536 subnets—plenty of subnets for small to medium-sized businesses. In addition, each
subnet has 64 bits for the interface ID. That’s roughly 18 quintillion addresses, obviously more
than will ever be needed in one IP network segment.
Subnets created from the subnet ID are easy to represent because there is no conversion to
binary required. To determine the next available subnet, just count up in hexadecimal, as
shown in Figure 9-8.
Figure 9-8 Subnetting an IPv6 Address by Incrementing the Subnet ID
Assume that the network administrator allotted your section of the network four /64 IPv6
subnets starting with the subnet address space 2001:DB8:CAFE:F00D::/64. What would be
the next three /64 subnets?
Assume that the network administrator allotted your section of the network four /64 IPv6
subnets starting with the subnet address space 2001:DB8:CAFE:AA9F::/64. What would be
the next three /64 subnets?
Assume that the network administrator allotted your section of the network four /64 IPv6
subnets starting with the subnet address space 2001:DB8:CAFE:9EFD::/64. What would be
the next three /64 subnets?