25 Subnetting Questions
25 Subnetting Questions
APPENDIX D
IP Addressing Practice
Chapter 4, “IP Addressing,” covers many details related to analyzing IP addresses, subnets, and
summarized IP routes. That chapter suggests some decimal math algorithms that allow you to
find the answers to some typical questions without having to perform time-consuming conversions
between binary and decimal.
As promised in Chapter 4, this appendix provides some practice problems that should help you
perfect the use of the algorithms in Chapter 4. Note that the goal of this practice is not to make
you memorize the algorithms—instead, the goal is to help you become so familiar with the
patterns in the decimal math that you can look at a problem and visualize the answer quickly.
The intent is to enable you, after you have practiced enough, to simply look at a problem and do
the math in your head, ignoring the specific steps in the book.
This appendix covers the decimal math processes to answer the following four types of
questions:
1. Given an IP address and mask/prefix length, list the number of subnets (assuming SLSM),
number of hosts per subnet (assuming SLSM), the subnet number, the broadcast address,
and the range of valid IP addresses in that same subnet.
2. Given an IP network and a static mask/prefix length, list the subnet numbers.
3. Given a set of routes, find the smallest inclusive summary route.
4. Given a set of routes, find the smallest exclusive summary route(s).
These topics are covered in order in this appendix.
9803xd.fm Page 3 Wednesday, October 28, 2009 9:35 AM
Subnetting Practice
This appendix lists 25 separate questions, asking you to derive the subnet number, broadcast
address, and range of valid IP addresses. In the solutions, the binary math is shown, as is the
process that avoids binary math using the “subnet chart” described in Chapter 4, “IP Addressing.”
You might want to review Chapter 4’s section on IP addressing before trying to answer these
questions.
25 Subnetting Questions
Given each IP address and mask, supply the following information for each of these 25 examples:
IP Addressing Practice 4
NOTE The examples shown here assume classful IP addressing, so the number of subnets per
IP network is listed as 2n - 2. If using classless IP addressing, the numbers would simply be 2n.
c. If an easy mask is used, draw a vertical line between the 255s and the 0s in the
mask, from top to bottom of the chart. If a hard mask is used, draw a box
around the interesting octet.
d. Copy the address octets to the left of the line or the box into the final four rows
of the chart.
Step 3 Derive the subnet number and the first valid IP address.
a. On the line on the chart where you are writing down the subnet number, write
down 0s in the octets to the right of the line or the box.
b. If the mask is difficult, so that there is a box in the chart, use the magic number
trick to find the decimal value of the subnet’s interesting octet, and write it
down. Remember, the magic number is found by subtracting the interesting
(non-0 or 255) mask value from 256. The magic number multiple that’s closest
to but not larger than the IP address’s interesting octet value is the subnet value
in that octet.
c. To derive the first valid IP address, copy the first three octets of the
subnet number, and add 1 to the fourth octet of the subnet number.
Step 4 Derive the broadcast address and the last valid IP address for this subnet.
a. Write down 255s in the broadcast address octets to the right of the line or the
box.
b. If the mask is difficult, so that there is a box in the chart, use the magic number
trick to find the value of the broadcast address’s interesting octet. In this case,
you add the subnet number’s interesting octet value to the magic number, and
subtract 1.
c. To derive the last valid IP address, copy the first three octets of the broadcast
address and subtract 1 from the fourth octet of the broadcast address.
Question 1: Answer
The answers begin with the analysis of the three parts of the address, the number of hosts per
subnet, and the number of subnets of this network using the stated mask. The binary math for
subnet and broadcast address calculation follows. The answer finishes with the easier mental
calculations using the subnet chart described in Chapter 4.
Table D-1 Question 1: Size of Network, Subnet, Host, Number of Subnets, Number of Hosts
Item Example Rules to Remember
Address 10.180.10.18 N/A
Mask 255.192.0.0 N/A
Number of network bits 8 Always defined by Class A, B, C
Number of host bits 22 Always defined as number of
binary 0s in mask
9803xd.fm Page 6 Wednesday, October 28, 2009 9:35 AM
IP Addressing Practice 6
Table D-1 Question 1: Size of Network, Subnet, Host, Number of Subnets, Number of Hosts (Continued)
Item Example Rules to Remember
Number of subnet bits 2 32 – (network size + host size)
Number of subnets 22 –2=2 2number-of-subnet-bits – 2
Number of hosts 222 – 2 = 4,194,302 2number-of-host-bits – 2
The binary calculations of the subnet number and broadcast address are in Table D-2. To
calculate the two numbers, perform a Boolean AND on the address and mask. To find the
broadcast address for this subnet, change all the host bits to binary 1s in the subnet number. The
host bits are in bold print in the table.
Address 10.180.10.18 0000 1010 1011 0100 0000 1010 0001 0010
Mask 255.192.0.0 1111 1111 1100 0000 0000 0000 0000 0000
AND result 10.128.0.0 0000 1010 1000 0000 0000 0000 0000 0000
(subnet number)
Change host to 1s 10.191.255.255 0000 1010 1011 1111 1111 1111 1111 1111
(broadcast address)
To get the first valid IP address, just add 1 to the subnet number; to get the last valid IP address,
just subtract 1 from the broadcast address. In this case:
Table D-3 Question 1: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet
Chart
Table D-3 Question 1: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet
Chart (Continued)
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The second
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
the magic number, which is 256 – 192 = 64 in this case (256 – mask’s value in the interesting
octet). The subnet number’s value in the interesting octet (inside the box) is the multiple of the
magic number that’s not bigger than the original IP address’s value in the interesting octet. In this
case, 128 is the multiple of 64 that’s closest to 180 but not bigger than 180. So, the second octet
of the subnet number is 128.
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 128 + 64 – 1 = 191.
Finally, Figure D-1 shows Table D-3 with comments about when each part of the table was filled
in, based on the steps in the process at the beginning of the chapter.
2D: copy
address
9803xd.fm Page 8 Wednesday, October 28, 2009 9:35 AM
IP Addressing Practice 8
Question 2: Answer
Table D-4 Question 2: Size of Network, Subnet, Host, Number of Subnets, Number of Hosts
Step Example Rules to Remember
Address 10.200.10.18 N/A
Mask 255.224.0.0 N/A
Number of network bits 8 Always defined by Class A, B, C
Number of host bits 21 Always defined as number of binary 0s
in mask
Number of subnet bits 3 32 – (network size + host size)
Number of subnets 23 –2=6 2number-of-subnet-bits – 2
Number of hosts 221 – 2 = 2,097,150 2number-of-host-bits – 2
Table D-5 presents the binary calculations of the subnet number and broadcast address. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Address 10.200.10.18 0000 1010 1100 1000 0000 1010 0001 0010
Mask 255.224.0.0 1111 1111 1110 0000 0000 0000 0000 0000
AND result 10.192.0.0 0000 1010 1100 0000 0000 0000 0000 0000
(subnet number)
Change host to 1s 10.223.255.255 0000 1010 1101 1111 1111 1111 1111 1111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The second
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
9803xd.fm Page 9 Wednesday, October 28, 2009 9:35 AM
the magic number, which is 256 – 224 = 32 in this case (256 – mask’s value in the interesting
octet). The subnet number’s value in the interesting octet (inside the box) is the multiple of the
magic number that’s not bigger than the original IP address’s value in the interesting octet. In this
case, 192 is the multiple of 32 that’s closest to 200 but not bigger than 200. So, the second octet
of the subnet number is 192.
Table D-6 Question 2: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 192 + 32 – 1 = 223.
Question 3: Answer
Table D-7 Question 3: Size of Network, Subnet, Host, Number of Subnets, Number of Hosts
Step Example Rules to Remember
Address 10.100.18.18 N/A
Mask 255.240.0.0 N/A
Number of network bits 8 Always defined by Class A, B, C
Number of host bits 20 Always defined as number of binary 0s
in mask
Number of subnet bits 4 32 – (network size + host size)
Number of subnets 24 – 2 = 14 2number-of-subnet-bits – 2
Number of hosts 220 – 2 = 1,048,574 2number-of-host-bits – 2
9803xd.fm Page 10 Wednesday, October 28, 2009 9:35 AM
IP Addressing Practice 10
The binary calculations of the subnet number and broadcast address are in Table D-8. To calculate
the subnet number, perform a Boolean AND of the address with the subnet mask. To find the
broadcast address for this subnet, change all the host bits to binary 1s in the subnet number. The
host bits are in bold print in the table.
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
Table D-9 Question 3: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The second
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
9803xd.fm Page 11 Wednesday, October 28, 2009 9:35 AM
the magic number, which is 256 – 240 = 16 in this case (256 – mask’s value in the interesting
octet). The subnet number’s value in the interesting octet (inside the box) is the multiple of the
magic number that’s not bigger than the original IP address’s value in the interesting octet. In this
case, 96 is the multiple of 16 that’s closest to 100 but not bigger than 100. So, the second octet of
the subnet number is 96.
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 96 + 16 – 1 = 111.
Question 4: Answer
Table D-10 Question 4: Size of Network, Subnet, Host, Number of Subnets, Number of Hosts
The binary calculations of the subnet number and broadcast address are in Table D-11. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
IP Addressing Practice 12
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
Table D-12 Question 4: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
Subnet rule: Multiple of magic number closest to, but not more than, IP address value in interesting octet
Broadcast rule: Subnet + magic – 1
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The second
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
the magic number, which is 256 – 248 = 8 in this case (256 – mask’s value in the interesting octet).
The subnet number’s value in the interesting octet (inside the box) is the multiple of the magic
number that’s not bigger than the original IP address’s value in the interesting octet. In this case,
96 is the multiple of 8 that’s closest to 100 but not bigger than 100. So, the second octet of the
subnet number is 96.
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 96 + 8 – 1 = 103.
9803xd.fm Page 13 Wednesday, October 28, 2009 9:35 AM
Question 5: Answer
Table D-13 Question 5: Size of Network, Subnet, Host, Number of Subnets, Number of Hosts
The binary calculations of the subnet number and broadcast address are in Table D-14. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Address 10.150.200.200 0000 1010 1001 0110 1100 1000 1100 1000
Mask 255.252.0.0 1111 1111 1111 1100 0000 0000 0000 0000
AND result 10.148.0.0 0000 1010 0110 0100 0000 0000 0000 0000
(subnet number)
Change host to 1s 10.151.255.255 0000 1010 0110 0111 1111 1111 1111 1111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
IP Addressing Practice 14
Table D-15 Question 5: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
Subnet rule: Multiple of magic number closest to, but not more than, IP address value in interesting octet
Broadcast rule: Subnet + magic – 1
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The second
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
the magic number, which is 256 – 252 = 4 in this case (256 – mask’s value in the interesting octet).
The subnet number’s value in the interesting octet (inside the box) is the multiple of the magic
number that’s not bigger than the original IP address’s value in the interesting octet. In this case,
148 is the multiple of 4 that’s closest to 150 but not bigger than 150. So, the second octet of the
subnet number is 148.
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 148 + 4 – 1 = 151.
Question 6: Answer
Table D-16 Question 6: Size of Network, Subnet, Host, Number of Subnets, Number of Hosts
Table D-16 Question 6: Size of Network, Subnet, Host, Number of Subnets, Number of Hosts (Continued)
The binary calculations of the subnet number and broadcast address are in Table D-17. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Address 10.150.200.200 0000 1010 1001 0110 1100 1000 1100 1000
Mask 255.254.0.0 1111 1111 1111 1110 0000 0000 0000 0000
AND result 10.150.0.0 0000 1010 0110 0110 0000 0000 0000 0000
(subnet number)
Change host to 1s 10.151.255.255 0000 1010 0110 0111 1111 1111 1111 1111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
Table D-18 Question 6: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet
Chart
IP Addressing Practice 16
Table D-18 Question 6: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet
Chart (Continued)
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The second
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
the magic number, which is 256 – 254 = 2 in this case (256 – mask’s value in the interesting octet).
The subnet number’s value in the interesting octet (inside the box) is the multiple of the magic
number that’s not bigger than the original IP address’s value in the interesting octet. In this case,
150 is the multiple of 2 that’s closest to 150 but not bigger than 150. So, the second octet of the
subnet number is 150.
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 150 + 2 – 1 = 151.
Question 7: Answer
Table D-19 Question 7: Size of Network, Subnet, Host, Number of Subnets, Number of Hosts
The binary calculations of the subnet number and broadcast address are in Table D-20. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
9803xd.fm Page 17 Wednesday, October 28, 2009 9:35 AM
Address 10.220.100.18 0000 1010 1101 1100 0110 0100 0001 0010
Mask 255.255.0.0 1111 1111 1111 1111 0000 0000 0000 0000
AND result 10.220.0.0 0000 1010 1101 1100 0000 0000 0000 0000
(subnet number)
Change host to 1s 10.220.255.255 0000 1010 1101 1100 1111 1111 1111 1111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
Table D-21 Question 7: Subnet, Broadcast, First, and Last Addresses Calculated Using Subnet Chart
This subnetting scheme uses an easy mask because all of the octets are a 0 or a 255. No math tricks
are needed at all!
Question 8: Answer
Table D-22 Question 8: Size of Network, Subnet, Host, Number of Subnets, Number of Hosts
IP Addressing Practice 18
Table D-22 Question 8: Size of Network, Subnet, Host, Number of Subnets, Number of Hosts (Continued)
The binary calculations of the subnet number and broadcast address are in Table D-23. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Address 10.220.100.18 0000 1010 1101 1100 0110 0100 0001 0010
Mask 255.255.128.0 1111 1111 1111 1111 1000 0000 0000 0000
AND result (subnet 10.220.0.0 0000 1010 1101 1100 0000 0000 0000 0000
number)
Change host to 1s 10.220.127.255 0000 1010 1101 1100 0111 1111 1111 1111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
Table D-24 Question 8: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The third
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
the magic number, which is 256 – 128 = 128 in this case (256 – mask’s value in the interesting
octet). The subnet number’s value in the interesting octet (inside the box) is the multiple of the
magic number that’s not bigger than the original IP address’s value in the interesting octet. In this
case, 0 is the multiple of 128 that’s closest to 100 but not bigger than 100. So, the third octet of the
subnet number is 0.
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 0 + 128 – 1 = 127.
This example tends to confuse people because a mask with 128 in it gives you subnet numbers that
just do not seem to look right. Table D-25 gives you the answers for the first several subnets, just
to make sure that you are clear about the subnets when using this mask with a Class A network.
Table D-25 Question 8: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
Question 9: Answer
Table D-26 Question 9: Size of Network, Subnet, Host, Number of Subnets, Number of Hosts
IP Addressing Practice 20
The binary calculations of the subnet number and broadcast address are in Table D-27. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Address 172.31.100.100 1010 1100 0001 1111 0110 0100 0110 0100
Mask 255.255.192.0 1111 1111 1111 1111 1100 0000 0000 0000
AND result 172.31.64.0 1010 1100 0001 1111 0100 0000 0000 0000
(subnet number)
Change host to 1s 172.31.127.255 1010 1100 0001 1111 0111 1111 1111 1111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
Table D-28 Question 9: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The third
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
the magic number, which is 256 – 192 = 64 in this case (256 – mask’s value in the interesting
octet). The subnet number’s value in the interesting octet (inside the box) is the multiple of the
magic number that’s not bigger than the original IP address’s value in the interesting octet. In this
case, 64 is the multiple of 64 that’s closest to 100 but not bigger than 100. So, the third octet of the
subnet number is 64.
9803xd.fm Page 21 Wednesday, October 28, 2009 9:35 AM
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 64 + 64 – 1 = 127.
The binary calculations of the subnet number and broadcast address are in Table D-30. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Table D-30 Question 10: Binary Calculation of Subnet and Broadcast Addresses
Address 172.31.100.100 1010 1100 0001 1111 0110 0100 0110 0100
Mask 255.255.224.0 1111 1111 1111 1111 1110 0000 0000 0000
AND result 172.31.96.0 1010 1100 0001 1111 0110 0000 0000 0000
(subnet number)
Change host to 1s 172.31.127.255 1010 1100 0001 1111 0111 1111 1111 1111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
IP Addressing Practice 22
Table D-31 Question 10: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The third octet
is “interesting” in this case. The key part of the trick to get the right answers is to calculate the magic
number, which is 256 – 224 = 32 in this case (256 – mask’s value in the interesting octet). The subnet
number’s value in the interesting octet (inside the box) is the multiple of the magic number that’s not
bigger than the original IP address’s value in the interesting octet. In this case, 96 is the multiple
of 32 that’s closest to 100 but not bigger than 100. So, the third octet of the subnet number is 96.
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 96 + 32 – 1 = 127.
Table D-33 shows the binary calculations of the subnet number and broadcast address. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Table D-33 Question 11: Binary Calculation of Subnet and Broadcast Addresses
Address 172.31.200.10 1010 1100 0001 1111 1100 1000 0000 1010
Mask 255.255.240.0 1111 1111 1111 1111 1111 0000 0000 0000
AND result 172.31.192.0 1010 1100 0001 1111 1100 0000 0000 0000
(subnet number)
Change host to 1s 172.31.207.255 1010 1100 0001 1111 1100 1111 1111 1111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
Table D-34 Question 13: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The third
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
the magic number, which is 256 – 240 = 16 in this case (256 – mask’s value in the interesting
octet). The subnet number’s value in the interesting octet (inside the box) is the multiple of the
magic number that’s not bigger than the original IP address’s value in the interesting octet. In this
case, 192 is the multiple of 16 that’s closest to 200 but not bigger than 200. So, the third octet of
the subnet number is 192.
9803xd.fm Page 24 Wednesday, October 28, 2009 9:35 AM
IP Addressing Practice 24
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 192 + 16 – 1 = 207.
Table D-36 shows the binary calculations of the subnet number and broadcast address. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Table D-36 Question 12: Binary Calculation of Subnet and Broadcast Addresses
Address 172.31.200.10 1010 1100 0001 1111 1100 1000 0000 1010
Mask 255.255.248.0 1111 1111 1111 1111 1111 1000 0000 0000
AND result 172.31.200.0 1010 1100 0001 1111 1100 1000 0000 0000
(subnet number)
Change host to 1s 172.31.207.255 1010 1100 0001 1111 1100 1111 1111 1111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
the magic number. The magic number multiple that’s closest to but not larger than the IP address’s
interesting octet value is the subnet value in that octet.
Table D-37 Question 12: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The third
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
the magic number, which is 256 – 248 = 8 in this case (256 – mask’s value in the interesting octet).
The subnet number’s value in the interesting octet (inside the box) is the multiple of the magic
number that’s not bigger than the original IP address’s value in the interesting octet. In this case,
200 is the multiple of 8 that’s closest to 200 but not bigger than 200. So, the third octet of the
subnet number is 200.
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 200 + 8 – 1 = 207.
IP Addressing Practice 26
Table D-39 shows the binary calculations of the subnet number and broadcast address. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Table D-39 Question 13: Binary Calculation of Subnet and Broadcast Addresses
Address 172.31.50.50 1010 1100 0001 1111 0011 0010 0011 0010
Mask 255.255.252.0 1111 1111 1111 1111 1111 1100 0000 0000
AND result 172.31.48.0 1010 1100 0001 1111 0011 0000 0000 0000
(subnet number)
Change host to 1s 172.31.51.255 1010 1100 0001 1111 0011 0011 1111 1111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
Table D-40 Question 13: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The third
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
the magic number, which is 256 – 252 = 4 in this case (256 – mask’s value in the interesting octet).
The subnet number’s value in the interesting octet (inside the box) is the multiple of the magic
number that’s not bigger than the original IP address’s value in the interesting octet. In this case,
9803xd.fm Page 27 Wednesday, October 28, 2009 9:35 AM
48 is the multiple of 4 that’s closest to 50 but not bigger than 50. So, the third octet of the subnet
number is 48.
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 48 + 4 – 1 = 51.
Table D-42 shows the binary calculations of the subnet number and broadcast address. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Table D-42 Question 14: Binary Calculation of Subnet and Broadcast Addresses
Address 172.31.50.50 1010 1100 0001 1111 0011 0010 0011 0010
Mask 255.255.254.0 1111 1111 1111 1111 1111 1110 0000 0000
AND result 172.31.50.0 1010 1100 0001 1111 0011 0010 0000 0000
(subnet number)
Change host to 1s 172.31.51.255 1010 1100 0001 1111 0011 0011 1111 1111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
IP Addressing Practice 28
Table D-43 lists the way to get the same answers using the subnet chart and magic math described
in Chapter 4. Remember, subtracting the interesting (non-0 or 255) mask value from 256 yields
the magic number. The magic number multiple that’s closest to but not larger than the IP address’s
interesting octet value is the subnet value in that octet.
Table D-43 Question 14: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
Octet 1 Octet 2 Octet 3 Octet 4
Address 172 31 50 50
Mask 255 255 254 0
Subnet number 172 31 50 0
First valid 172 31 50 1
address
Broadcast 172 31 51 255
Last valid 172 31 51 254
address
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The third octet
is “interesting” in this case. The key part of the trick to get the right answers is to calculate the magic
number, which is 256 – 254 = 2 in this case (256 – mask’s value in the interesting octet). The sub-
net number’s value in the interesting octet (inside the box) is the multiple of the magic number that’s
not bigger than the original IP address’s value in the interesting octet. In this case, 50 is the multiple
of 2 that’s closest to 50 but not bigger than 50. So, the third octet of the subnet number is 50.
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 50 + 2 – 1 = 51.
Table D-45 shows the binary calculations of the subnet number and broadcast address. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Table D-45 Question 15: Binary Calculation of Subnet and Broadcast Addresses
Address 172.31.140.14 1010 1100 0001 1111 1000 1100 0000 1110
Mask 255.255.255.0 1111 1111 1111 1111 1111 1111 0000 0000
AND result 172.31.140.0 1010 1100 0001 1111 1000 1100 0000 0000
(subnet number)
Change host to 1s 172.31.140.255 1010 1100 0001 1111 1000 1100 1111 1111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
Table D-46 Question 15: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
This subnetting scheme uses an easy mask because all of the octets are a 0 or a 255. No math tricks
are needed at all!
9803xd.fm Page 30 Wednesday, October 28, 2009 9:35 AM
IP Addressing Practice 30
Table D-48 shows the binary calculations of the subnet number and broadcast address. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Table D-48 Question 16: Binary Calculation of Subnet and Broadcast Addresses
Address 172.31.140.14 1010 1100 0001 1111 1000 1100 0000 1110
Mask 255.255.255.128 1111 1111 1111 1111 1111 1111 1000 0000
AND result 172.31.140.0 1010 1100 0001 1111 1000 1100 0000 0000
(subnet number)
Change host to 1s 172.31.140.127 1010 1100 0001 1111 1000 1100 0111 1111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
Table D-49 Question 16: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
Octet 1 Octet 2 Octet 3 Octet 4
Address 172 31 140 14
Mask 255 255 255 128
Subnet number 172 31 140 0
First valid address 172 31 140 1
Broadcast 172 31 140 127
Last valid address 172 31 140 126
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The fourth
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
the magic number, which is 256 – 128 = 128 in this case (256 – mask’s value in the interesting
octet). The subnet number’s value in the interesting octet (inside the box) is the multiple of the
magic number that’s not bigger than the original IP address’s value in the interesting octet. In this
case, 0 is the multiple of 128 that’s closest to 14 but not bigger than 14. So, the fourth octet of the
subnet number is 0.
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 0 + 128 – 1 = 127.
Table D-51 shows the binary calculations of the subnet number and broadcast address. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
9803xd.fm Page 32 Wednesday, October 28, 2009 9:35 AM
IP Addressing Practice 32
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Table D-51 Question 17: Binary Calculation of Subnet and Broadcast Addresses
Address 192.168.15.150 1100 0000 1010 1000 0000 1111 1001 0110
Mask 255.255.255.192 1111 1111 1111 1111 1111 1111 1100 0000
AND result 192.168.15.128 1100 0000 1010 1000 0000 1111 1000 0000
(subnet number)
Change host to 1s 192.168.15.191 1100 0000 1010 1000 0000 1111 1011 1111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
Table D-52 Question 17: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The fourth
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
the magic number, which is 256 – 192 = 64 in this case (256 – mask’s value in the interesting
octet). The subnet number’s value in the interesting octet (inside the box) is the multiple of the
magic number that’s not bigger than the original IP address’s value in the interesting octet. In this
case, 128 is the multiple of 64 that’s closest to 150 but not bigger than 150. So, the fourth octet of
the subnet number is 128.
9803xd.fm Page 33 Wednesday, October 28, 2009 9:35 AM
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 128 + 64 – 1 = 191.
Table D-54 shows the binary calculations of the subnet number and broadcast address. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Table D-54 Question 18: Binary Calculation of Subnet and Broadcast Addresses
Address 192.168.15.150 1100 0000 1010 1000 0000 1111 1001 0110
Mask 255.255.255.224 1111 1111 1111 1111 1111 1111 1110 0000
AND result 192.168.15.128 1100 0000 1010 1000 0000 1111 1000 0000
(subnet number)
Change host to 1s 192.168.15.159 1100 0000 1010 1000 0000 1111 1001 1111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
IP Addressing Practice 34
Table D-55 Question 18: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The fourth
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
the magic number, which is 256 – 224 = 32 in this case (256 – mask’s value in the interesting
octet). The subnet number’s value in the interesting octet (inside the box) is the multiple of the
magic number that’s not bigger than the original IP address’s value in the interesting octet. In this
case, 128 is the multiple of 32 that’s closest to 150 but not bigger than 150. So, the fourth octet of
the subnet number is 128.
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 128 + 32 – 1 = 159.
Table D-57 shows the binary calculations of the subnet number and broadcast address. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Table D-57 Question 19: Binary Calculation of Subnet and Broadcast Addresses
Address 192.168.100.100 1100 0000 1010 1000 0110 0100 0110 0100
Mask 255.255.255.240 1111 1111 1111 1111 1111 1111 1111 0000
AND result 192.168.100.96 1100 0000 1010 1000 0110 0100 0110 0000
(subnet number)
Change host to 1s 192.168.100.111 1100 0000 1010 1000 0110 0100 0110 1111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
Table D-58 Question 19: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The fourth
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
the magic number, which is 256 – 240 = 16 in this case (256 – mask’s value in the interesting
octet). The subnet number’s value in the interesting octet (inside the box) is the multiple of the
magic number that’s not bigger than the original IP address’s value in the interesting octet. In this
case, 96 is the multiple of 16 that’s closest to 100 but not bigger than 100. So, the fourth octet of
the subnet number is 96.
9803xd.fm Page 36 Wednesday, October 28, 2009 9:35 AM
IP Addressing Practice 36
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 96 + 16 – 1 = 111.
Table D-60 shows the binary calculations of the subnet number and broadcast address. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Table D-60 Question 20: Binary Calculation of Subnet and Broadcast Addresses
Address 192.168.100.100 1100 0000 1010 1000 0110 0100 0110 0100
Mask 255.255.255.248 1111 1111 1111 1111 1111 1111 1111 1000
AND result 192.168.100.96 1100 0000 1010 1000 0110 0100 0110 0000
(subnet number)
Change host to 1s 192.168.100.103 1100 0000 1010 1000 0110 0100 0110 0111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
Table D-61 Question 20: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The fourth
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
the magic number, which is 256 – 248 = 8 in this case (256 – mask’s value in the interesting octet).
The subnet number’s value in the interesting octet (inside the box) is the multiple of the magic
number that’s not bigger than the original IP address’s value in the interesting octet. In this case,
96 is the multiple of 8 that’s closest to 100 but not bigger than 100. So, the fourth octet of the
subnet number is 96.
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 96 + 8 – 1 = 103.
Table D-63 shows the binary calculations of the subnet number and broadcast address. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
9803xd.fm Page 38 Wednesday, October 28, 2009 9:35 AM
IP Addressing Practice 38
Table D-63 Question 21: Binary Calculation of Subnet and Broadcast Addresses
Address 192.168.15.230 1100 0000 1010 1000 0000 1111 1110 0110
Mask 255.255.255.252 1111 1111 1111 1111 1111 1111 1111 1100
AND result 192.168.15.228 1100 0000 1010 1000 0000 1111 1110 0100
(subnet number)
Change host to 1s 192.168.15.231 1100 0000 1010 1000 0000 1111 1110 0111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
Table D-64 Question 21: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The fourth
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
the magic number, which is 256 – 252 = 4 in this case (256 – mask’s value in the interesting octet).
The subnet number’s value in the interesting octet (inside the box) is the multiple of the magic
number that’s not bigger than the original IP address’s value in the interesting octet. In this case,
228 is the multiple of 4 that’s closest to 230 but not bigger than 230. So, the fourth octet of the
subnet number is 228.
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
9803xd.fm Page 39 Wednesday, October 28, 2009 9:35 AM
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 228 + 4 – 1 = 231.
Table D-66 shows the binary calculations of the subnet number and broadcast address. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Table D-66 Question 22: Binary Calculation of Subnet and Broadcast Addresses
Address 10.1.1.1 0000 1010 0000 0001 0000 0001 0000 0001
Mask 255.248.0.0 1111 1111 1111 1000 0000 0000 0000 0000
AND result 10.0.0.0 0000 1010 0000 0000 0000 0000 0000 0000
(subnet number)
Change host to 1s 10.7.255.255 0000 1010 0000 0111 1111 1111 1111 1111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
IP Addressing Practice 40
Table D-67 lists the way to get the same answers using the subnet chart and magic math described
in Chapter 4. Remember, subtracting the interesting (non-0 or 255) mask value from 256 yields
the magic number. The magic number multiple that’s closest to but not larger than the IP address’s
interesting octet value is the subnet value in that octet.
Table D-67 Question 22: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
Octet 1 Octet 2 Octet 3 Octet 4
Address 10 1 1 1
Mask 255 248 0 0
Subnet number 10 0 0 0
First valid address 10 0 0 1
Broadcast 10 7 255 255
Last valid address 10 7 255 254
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The second
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate the
magic number, which is 256 – 248 = 8 in this case (256 – mask’s value in the interesting octet). The
subnet number’s value in the interesting octet (inside the box) is the multiple of the magic number
that’s not bigger than the original IP address’s value in the interesting octet. In this case, 0 is the
multiple of 8 that’s closest to 1 but not bigger than 1. So, the second octet of the subnet number is 0.
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 0 + 8 – 1 = 7.
Table D-69 shows the binary calculations of the subnet number and broadcast address. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Table D-69 Question 23: Binary Calculation of Subnet and Broadcast Addresses
Address 172.16.1.200 1010 1100 0001 0000 0000 0001 1100 1000
Mask 255.255.240.0 1111 1111 1111 1111 1111 0000 0000 0000
AND result 172.16.0.0 1010 1100 0001 0000 0000 0000 0000 0000
(subnet number)
Change host to 1s 172.16.15.255 1010 1100 0001 0000 0000 1111 1111 1111
(broadcast address)
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
Table D-70 lists the way to get the same answers using the subnet chart and magic math described
in Chapter 4. Remember, subtracting the interesting (non-0 or 255) mask value from 256 yields
the magic number. The magic number multiple that’s closest to but not larger than the IP address’s
interesting octet value is the subnet value in that octet.
Table D-70 Question 23: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
Octet 1 Octet 2 Octet 3 Octet 4
Address 172 16 1 200
Mask 255 255 240 0
Subnet number 172 16 0 0
First valid 172 16 0 1
address
Broadcast 172 16 15 255
Last valid 172 16 15 254
address
9803xd.fm Page 42 Wednesday, October 28, 2009 9:35 AM
IP Addressing Practice 42
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The third
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
the magic number, which is 256 – 240 = 16 in this case (256 – mask’s value in the interesting
octet). The subnet number’s value in the interesting octet (inside the box) is the multiple of the
magic number that’s not bigger than the original IP address’s value in the interesting octet. In this
case, 0 is the multiple of 16 that’s closest to 1 but not bigger than 1. So, the third octet of the subnet
number is 0.
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 0 + 16 – 1 = 15.
Table D-72 shows the binary calculations of the subnet number and broadcast address. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Table D-72 Question 24: Binary Calculation of Subnet and Broadcast Addresses
Address 172.16.0.200 1010 1100 0001 0000 0000 0000 1100 1000
Mask 255.255.255.192 1111 1111 1111 1111 1111 1111 1100 0000
AND result 172.16.0.192 1010 1100 0001 0000 0000 0000 1100 0000
(subnet number)
Change host to 1s 172.16.0.255 1010 1100 0001 0000 0000 0000 1111 1111
(broadcast address)
9803xd.fm Page 43 Wednesday, October 28, 2009 9:35 AM
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
Table D-73 Question 24: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
This subnetting scheme uses a hard mask because one of the octets is not a 0 or a 255. The fourth
octet is “interesting” in this case. The key part of the trick to get the right answers is to calculate
the magic number, which is 256 – 192 = 64 in this case (256 – mask’s value in the interesting
octet). The subnet number’s value in the interesting octet (inside the box) is the multiple of the
magic number that’s not bigger than the original IP address’s value in the interesting octet. In this
case, 192 is the multiple of 64 that’s closest to 200 but not bigger than 200. So, the fourth octet of
the subnet number is 192.
The second tricky part of this process calculates the subnet broadcast address. The full process is
described in Chapter 4, but the tricky part is, as usual, in the “interesting” octet. Take the subnet
number’s value in the interesting octet, add the magic number, and subtract 1. That’s the broadcast
address’s value in the interesting octet. In this case, 192 + 64 – 1 = 255.
You can easily forget that the subnet part of this address, when using this mask, actually covers all
of the third octet as well as 2 bits of the fourth octet. For instance, the valid subnet numbers in
order are listed here, starting with the first valid subnet by avoiding subnet 172.16.0.0–the zero
subnet in this case:
172.16.0.64
172.16.0.128
172.16.0.192
172.16.1.0
9803xd.fm Page 44 Wednesday, October 28, 2009 9:35 AM
IP Addressing Practice 44
172.16.1.64
172.16.1.128
172.16.1.192
172.16.2.0
172.16.2.64
172.16.2.128
172.16.2.192
172.16.3.0
172.16.3.64
172.16.3.128
172.16.3.192
And so on.
Table D-74 Question 25: Size of Network, Subnet, Host, Number of Subnets, Number of Hosts
Table D-75 shows the binary calculations of the subnet number and broadcast address. To
calculate the subnet number, perform a Boolean AND of the address with the subnet mask. To find
the broadcast address for this subnet, change all the host bits to binary 1s in the subnet number.
The host bits are in bold print in the table.
Table D-75 Question 25: Binary Calculation of Subnet and Broadcast Addresses
Address 10.1.1.1 0000 1010 0000 0001 0000 0001 0000 0001
Mask 255.0.0.0 1111 1111 0000 0000 0000 0000 0000 0000
AND result 10.0.0.0 0000 1010 0000 0000 0000 0000 0000 0000
(subnet number)
Change host to 1s 10.255.255.255 0000 1010 1111 1111 1111 1111 1111 1111
(broadcast address)
9803xd.fm Page 45 Wednesday, October 28, 2009 9:35 AM
Just add 1 to the subnet number to get the first valid IP address; just subtract 1 from the broadcast
address to get the last valid IP address. In this case:
Table D-76 Question 25: Subnet, Broadcast, First and Last Addresses Calculated Using Subnet Chart
IP Addressing Practice 46
Question 1: Answer
This question begins with the following basic facts:
Network 10.0.0.0
Mask 255.192.0.0
From there, Steps 3 and 4 ask for the following pieces of information:
1) Network number 10 0 0 0
2) Zero subnet 10 0 0 0
5) Next subnet 10 64 0 0
*The invalid subnet row is just a reminder used by this process as to when to stop.
Note that the broadcast subnet number may not have been obvious until attempting to write the
final (invalid) next subnet number, as seen in the last row of the table. You can follow the steps
shown in the table, knowing that when the interesting octet’s value is 256, you have gone too far.
The broadcast subnet is the subnet that was found one step prior.
Alternately, you can find the broadcast subnet based on the following fact: the broadcast subnet’s
interesting octet is equal to the subnet mask value in that same octet.
Question 2: Answer
This question begins with the following basic facts:
Network 10.0.0.0
Mask 255.224.0.0
From there, Steps 3 and 4 ask for the following pieces of information:
IP Addressing Practice 48
1) Network number 10 0 0 0
2) Zero subnet 10 0 0 0
5) Next subnet 10 32 0 0
6) Next subnet 10 64 0 0
6) Next subnet 10 96 0 0
*The invalid subnet row is just a reminder used by this process as to when to stop.
Note that the subnet numbers’ interesting octet (second octet in this case) simply increments by
the magic number. To reduce the space required by the table, after the pattern is obvious, the table
represents the remaining subnet numbers before the broadcast subnet as a generic value, 10.X.0.0.
The subnets not specifically listed are 10.128.0.0, 10.160.0.0, and 10.192.0.0.
Question 3: Answer
This question begins with the following basic facts:
Network 10.0.0.0
Mask 255.248.0.0
From there, Steps 3 and 4 ask for the following pieces of information:
1) Network number 10 0 0 0
2) Zero subnet 10 0 0 0
5) Next subnet 10 8 0 0
continues
9803xd.fm Page 49 Wednesday, October 28, 2009 9:35 AM
6) Next subnet 10 16 0 0
6) Next subnet 10 24 0 0
*The invalid subnet row is just a reminder used by this process as to when to stop.
Note that the subnet numbers’ interesting octet (second octet in this case) simply increments by
the magic number. To reduce the space required by the table, after the pattern is obvious, the table
represents the remaining subnet numbers before the broadcast subnet as a generic value, 10.x.0.0.
The subnets not specifically listed simply have a multiple of 8 in the second octet.
Question 4: Answer
This question begins with the following basic facts:
Network 10.0.0.0
Mask 255.252.0.0
From there, Steps 3 and 4 ask for the following pieces of information:
1) Network number 10 0 0 0
2) Zero subnet 10 0 0 0
5) Next subnet 10 4 0 0
6) Next subnet 10 8 0 0
6) Next subnet 10 12 0 0
9803xd.fm Page 50 Wednesday, October 28, 2009 9:35 AM
IP Addressing Practice 50
*The invalid subnet row is just a reminder used by this process as to when to stop.
Note that the subnet numbers’ interesting octet (second octet in this case) simply increments by
the magic number. To reduce the space required by the table, after the pattern is obvious, the table
represents the remaining subnet numbers before the broadcast subnet as a generic value, 10.x.0.0.
The subnets not specifically listed simply have a multiple of 4 in the second octet.
Question 5: Answer
This question begins with the following basic facts:
Network 10.0.0.0
Mask 255.255.128.0
From there, Steps 3 and 4 ask for the following pieces of information:
NOTE Many of you may intuitively see the way to find the complete answer to this question,
long before you finish reading the revised process listed here. If you think you are getting the
idea, you probably are, so do not let the details in the text get in the way.
First, Table D-81 shows the beginning of the process, which occurs just like the earlier examples,
except that the interesting octet is now the third octet.
9803xd.fm Page 51 Wednesday, October 28, 2009 9:35 AM
1) Network number 10 0 0 0
2) Zero subnet 10 0 0 0
*The invalid subnet row is just a reminder used by this process as to when to stop.
At this point, the last number is obviously an invalid subnet number due to the 256 in the third
octet. Instead of that fact signifying the end of the process, it means you should do the following:
Record the next subnet, based on the following changes to the previous valid subnet
number: add 1 to the octet to the left of the interesting octet, and set the interesting octet
to 0.
In this case, this new step runs as follows:
■ Add 1 to the octet to the left of the interesting octet (value 0); the next subnet number’s second
octet will then be 1.
Each time the next subnet number would have had a 256 in the interesting octet, you instead
follow this new step. It is a little like normal decimal addition. For example, when you add 319
and 1, you add 1 and 9, write down a 0, and carry the 1 to the next digit to the left. It is much
more obvious through examples, though. So, to complete the logic, Table D-82 shows the
example, with this new logic implemented. (Note that the new step has been labeled as Step 8.)
1) Network number 10 0 0 0
2) Zero subnet 10 0 0 0
IP Addressing Practice 52
Table D-82 Question 5 Answer, Part 2: Network 10.0.0.0, Mask 255.255.128.0 (Continued)
*The invalid subnet row is just a reminder used by this process as to when to stop.
The end of the table is found in this example when the octet to the left of the interesting octet
reaches 256. The previously listed subnet is the broadcast subnet.
Question 6: Answer
This question begins with the following basic facts:
Network 10.0.0.0
Mask 255.255.192.0
From there, Steps 3 and 4 ask for the following pieces of information:
1) Network number 10 0 0 0
2) Zero subnet 10 0 0 0
5) Next subnet 10 0 64 0
*The invalid subnet row is just a reminder used by this process as to when to stop.
After finding a 256 in the interesting octet, the extra bit of logic is applied, as follows:
Record the next subnet, based on the following changes to the previous valid subnet
number: add 1 to the octet to the left of the interesting octet, and set the interesting octet
to 0.
Table D-84 shows the actual values.
1) Network number 10 0 0 0
2) Zero subnet 10 0 0 0
5) Next subnet 10 0 64 0
5) Next subnet 10 1 64 0
5) Next subnet 10 2 64 0
9803xd.fm Page 54 Wednesday, October 28, 2009 9:35 AM
IP Addressing Practice 54
Table D-84 Question 6 Answer, Part 2: Network 10.0.0.0, Mask 255.255.192.0 (Continued)
*The invalid subnet row is just a reminder used by this process as to when to stop.
The end of the table is found in this example when the octet to the left of the interesting octet
reaches 256. The previously listed subnet is the broadcast subnet.
Question 7: Answer
This question begins with the following basic facts:
Network 172.31.0.0
Mask 255.255.224.0
From there, Steps 3 and 4 ask for the following pieces of information:
continues
9803xd.fm Page 55 Wednesday, October 28, 2009 9:35 AM
*The invalid subnet row is just a reminder used by this process as to when to stop.
Note that the subnet numbers’ interesting octet (third octet in this case) simply increments by the
magic number.
Question 8: Answer
This question begins with the following basic facts:
Network 172.31.0.0
Mask 255.255.240.0
From there, Steps 3 and 4 ask for the following pieces of information:
IP Addressing Practice 56
*The invalid subnet row is just a reminder used by this process as to when to stop.
Note that the subnet numbers’ interesting octet (third octet in this case) simply increments by the
magic number. To reduce the space required by the table, the table represents the remaining subnet
numbers before the broadcast subnet as a generic value, 172.31.x.0. The subnets not specifically
listed simply have a multiple of 16 in the third octet.
Question 9: Answer
This question begins with the following basic facts:
Network 172.31.0.0
Mask 255.255.252.0
From there, Steps 3 and 4 ask for the following pieces of information:
*The invalid subnet row is just a reminder used by this process as to when to stop.
9803xd.fm Page 57 Wednesday, October 28, 2009 9:35 AM
Note that the subnet numbers’ interesting octet (third octet in this case) simply increments by the
magic number. To reduce the space required by the table, the table represents the remaining subnet
numbers before the broadcast subnet as a generic value, 172.31.x.0. The subnets not specifically
listed simply have a multiple of 4 in the third octet.
Network 172.31.0.0
Mask 255.255.255.224
From there, Steps 3 and 4 ask for the following pieces of information:
*The invalid subnet row is just a reminder used by this process as to when to stop.
9803xd.fm Page 58 Wednesday, October 28, 2009 9:35 AM
IP Addressing Practice 58
After finding a 256 in the interesting octet, the extra bit of logic is applied, as follows:
Record the next subnet, based on the following changes to the previous valid subnet
number: add 1 to the octet to the left of the interesting octet, and set the interesting octet
to 0.
Table D-89 shows the actual values.
*The invalid subnet row is just a reminder used by this process as to when to stop.
9803xd.fm Page 59 Wednesday, October 28, 2009 9:35 AM
The end of the table is found in this example when the octet to the left of the interesting octet
reaches 256. The previously listed subnet is the broadcast subnet.
Network 192.168.15.0
Mask 255.255.255.192
From there, Steps 3 and 4 ask for the following pieces of information:
*The invalid subnet row is just a reminder used by this process as to when to stop.
Note that the subnet numbers’ interesting octet (fourth octet in this case) simply increments by the
magic number.
Network 192.168.15.0
Mask 255.255.255.224
From there, Steps 3 and 4 ask for the following pieces of information:
IP Addressing Practice 60
From there, Table D-91 shows the rest of the steps for the process.
*The invalid subnet row is just a reminder used by this process as to when to stop.
Note that the subnet numbers’ interesting octet (fourth octet in this case) simply increments by the
magic number. To reduce the space required by the table, the table represents the remaining subnet
numbers before the broadcast subnet as a generic value, 192.168.15.x. The subnets not specifically
listed simply have a multiple of 32 in the fourth octet.
Network 192.168.15.0
Mask 255.255.255.240
From there, Steps 3 and 4 ask for the following pieces of information:
*The invalid subnet row is just a reminder used by this process as to when to stop.
Note that the subnet numbers’ interesting octet (fourth octet in this case) simply increments by the
magic number. To reduce the space required by the table, the table represents the remaining subnet
numbers before the broadcast subnet as a generic value, 192.168.15.x. The subnets not specifically
listed simply have a multiple of 16 in the fourth octet.
IP Addressing Practice 62
8. 192.168.1.16/29, 192.168.1.32/29
9. 10.1.80.0/25, 10.1.81.0/25, 10.1.81.128/25
10. 10.1.80.0/26, 10.1.81.0/26, 10.1.81.128/26
The following steps are a repeat of the algorithm found in Chapter 4. Chapter 4 only explained
details assuming consecutive subnets and SLSM, but the algorithm works fine with SLSM or
VLSM, and with nonconsecutive subnets. However, nonconsecutive subnets typically require
more passes through the algorithm logic. If VLSM is used, at Step 2, you subtract y from the
longest prefix length to start the process, again requiring many more steps through the process.
Step 1 Count the number of subnets; then, find the smallest value of y, such that
2y => that number of subnets.
Step 2 For the next step, use a prefix length of the prefix length for each of the
component subnets, minus y.
Step 3 Pretend that the lowest subnet number in the list of component subnets is
an IP address. Using the new, smaller prefix from Step 2, calculate the
subnet number in which this pretend address resides.
Step 4 Repeat Step 3 for the largest numeric component subnet number and the
same prefix. If it is the same subnet derived as in Step 3, the resulting subnet
is the best summarized route, using the new prefix.
Step 5 If Steps 3 and 4 do not yield the same resulting subnet, repeat Steps 3 and 4,
with another new prefix length of 1 less than the last prefix length.
Question 1: Answer
This question begins with the following routes that need to be summarized:
10.20.30.0/24
10.20.35.0/24
10.20.40.0/24
10.20.45.0/24
The first two steps are as follows:
Prefix
Length Step 3 (Lowest Component Subnet) Step 4 (Highest Component Subnet)
This question requires that you iterate through several progressively shorter prefix lengths until
you find the correct answer. Finally, the process shows that 10.20.0.0/18 would be the smallest
inclusive summary. For questions in which the component subnets are not consecutive, as was the
case in this question, you might try to guess a better starting point for the prefix length (a few bits
shorter) rather than starting with Steps 1 and 2 of the stated process. Regardless, the process will
give you the right answer.
Question 2: Answer
This question begins with the following routes that need to be summarized:
10.20.4.0/24
10.20.5.0/24
10.20.6.0/24
10.20.7.0/24
The first two steps are as follows:
Prefix
Length Step 3 (Lowest Component Subnet) Step 4 (Highest Component Subnet)
IP Addressing Practice 64
Question 3: Answer
This question begins with the following routes that need to be summarized:
10.20.3.0/24
10.20.4.0/24
10.20.5.0/24
10.20.6.0/24
10.20.7.0/24
10.20.8.0/24
The first two steps are as follows:
Prefix
Length Step 3 (Lowest Component Subnet) Step 4 (Highest Component Subnet)
After two passes through Steps 3 and 4, the results are equal, implying that 10.20.0.0/20 is the
smallest inclusive summary.
Question 4: Answer
This question begins with the following routes that need to be summarized:
172.16.200.0/23
172.16.204.0/23
172.16.208.0/23
Note that the subnets are not consecutive in this case, but the algorithm still works. The first two
steps are as follows:
After three passes through Steps 3 and 4, the results are equal, implying that 172.16.192.0/19 is
the smallest inclusive summary.
Question 5: Answer
This question begins with the following routes that need to be summarized:
172.16.200.0/23
172.16.202.0/23
172.16.204.0/23
172.16.206.0/23
172.16.208.0/23
The first two steps are as follows:
IP Addressing Practice 66
After two passes through Steps 3 and 4, the results are equal, implying that 172.16.192.0/19 is the
smallest inclusive summary.
Question 6: Answer
This question begins with the following routes that need to be summarized:
172.16.112.0/22
172.16.116.0/22
172.16.120.0/22
172.16.124.0/22
The first two steps are as follows:
Prefix
Length Step 3 (Lowest Component Subnet) Step 4 (Highest Component Subnet)
Question 7: Answer
This question begins with the following routes that need to be summarized:
192.168.1.16/29
192.168.1.24/29
192.168.1.32/29
The first two steps are as follows:
Question 8: Answer
This question begins with the following routes that need to be summarized:
192.168.1.16/28
192.168.1.32/28
The first two steps are as follows:
Question 9: Answer
This question begins with the following routes that need to be summarized:
10.1.80.0/25
10.1.81.0/25
10.1.81.128/25
The first two steps are as follows:
IP Addressing Practice 68
From there, Table D-101 shows the iterations through Steps 3 and 4, using progressively shorter
prefix lengths, until the right answer is found.
10.1.80.0/26
10.1.81.0/26
10.1.81.128/26
The first two steps are as follows:
Prefix
Length Step 3 (Lowest Component Subnet) Step 4 (Highest Component Subnet)
For the following five lists of subnets, discover the set of exclusive summary routes:
Step 1 Find the best inclusive summary route; call it a candidate exclusive
summary route.
Step 2 Determine if the candidate summary includes any address ranges it should
not. To do so, compare the summary’s implied address range with the
implied address ranges of the component subnets.
Step 3 If the candidate summary only includes addresses in the ranges implied by
the component subnets, the candidate summary is part of the best exclusive
summarization of the original component subnets.
Step 4 If instead the candidate summary includes some addresses matching the
candidate summary routes, and some addresses that do not match, split the
current candidate summary in half, into two new candidate summary
routes, each with a prefix 1 longer than before.
Step 5 If the candidate summary only includes addresses outside the ranges
implied by the component subnets, the candidate summary is not part of the
best exclusive summarization, and it should not be split further.
Step 6 Repeat Steps 2–4 for each of the two possible candidate summary routes
created at Step 4.
Question 1: Answer
This question begins with the following routes that need to be summarized:
IP Addressing Practice 70
10.20.4.0/22
Table D-103 shows what turns out to be a single pass through the algorithm, because the inclusive
summary and exclusive summary are the same for this problem.
Comparing the range of IP addresses in the problem statement with the range of addresses implied
by the original inclusive summary, you can see that it is the exact same set of addresses. As a result,
10.20.4.0/22 is part of the exclusive summary—in fact, no other summary routes are required.
Question 2: Answer
This question begins with the following routes that need to be summarized:
10.20.0.0/20
Table D-104 begins by showing three passes through the algorithm. These three passes do not determine
all the exclusive summary routes in the answer; Tables D-105 and D-106 complete the answer.
Before examining Table D-104, first consider the overall flow of the repeated iterations through
the table. Think of the original inclusive summary route as one large group of addresses. If it is
not also the exclusive summary, you iterate through the algorithm again, halving the original
inclusive summary. If that does not produce an answer, you halve each of the halves for the next
iteration through the algorithm. So, you can think of the second splitting of the candidate
summaries as breaking them into quarters. Another pass would break the original inclusive
summary into eighths, and so on. The table’s first column denotes what each row means based on
whether it is for the original inclusive summary, the first split (into halves), the second split (into
quarters), and so on.
9803xd.fm Page 71 Wednesday, October 28, 2009 9:35 AM
Candidate Exclusive
Split Summary Range Analysis
The last four rows of the table show the results of the second split (per Step 4 in the algorithm).
Two of these four candidate exclusive summaries need to be split again (10.20.0.0/22 and
10.20.8.0/22) because they contain some addresses within the original ranges, but some outside
the range. One summary (10.20.4.0/22) holds only addresses inside the original ranges, so that
route is one of the routes comprising the exclusive summary. Finally, one candidate route
(10.20.12.0/22) contains only addresses outside the original range; as a result, you can stop
splitting that range when looking for the exclusive summaries.
Tables D-105 and D-106 complete the official algorithm, but through some basic inspection, you
might be able to (rightfully) guess that no additional summary routes will be found. Consider the
original routes, and whether the process has found a summary route to include the addresses yet:
IP Addressing Practice 72
Thinking about the problem from this point forward, the remaining component subnets—
10.20.3.0/24 and 10.20.8.0/24—are separated by the previously discovered 10.20.4.0/22
summary. There is only one original route on each side of that summary. So, there is no possibility
of summarizing those two individual routes.
The algorithm will reach that same conclusion, as shown in the next two tables. The third split
is in Table D-105 (Table D-104 showed up through the second split), and the fourth split is in
Table D-106. Keep in mind that, per Table D-104, only two prefixes need splitting for the next step
in the process—10.20.0.0/22 and 10.20.8.0/22. The “Split” column in the table lists the halves of
these two prefixes.
Candidate
Exclusive
Split Summary Range Analysis
(Note: Per Table D-105, only 10.20.2.0/23 and 10.20.8.0/23 need splitting; their halves are noted
in the first column.)
Candidate Exclusive
Split Summary Range Analysis
The other two components of the set of exclusive summary routes are finally found in Table D-
106. As a result, looking at all three tables, the answer for this question is as follows:
10.20.3.0/24
10.20.4.0/22
10.20.8.0/24
Question 3: Answer
This question begins with the following routes that need to be summarized:
172.16.192.0/19
Table D-107 begins by showing three passes through the algorithm. These three passes do not
determine all the summary routes in the answer.
Candidate
Exclusive
Split Summary Range Analysis
2nd split, 2nd 172.16.200.0/21 172.16.200.0– Includes only address in the range—
quarter 172.16.207.255 it’s part of exclusive summary
9803xd.fm Page 74 Wednesday, October 28, 2009 9:35 AM
IP Addressing Practice 74
Candidate
Exclusive
Split Summary Range Analysis
2nd split, 3rd 172.16.208.0/21 172.16.208.0– Includes some addresses that should
quarter 172.16.215.255 not be included
The last four rows of the table show the results of the second split (per Step 4 in the algorithm).
Two of these four candidate exclusive summaries (172.16.192.0/21 and 172.16.216.0/21) only
contain addresses outside the range that needs to be summarized, so these do not need to be split
further. 172.16.200.0/21 is part of the exclusive summary, so it does not need to be split again.
Only 172.16.208.0/21 needs further splitting at this point.
Under closer examination, at this point in the process, no further work is actually needed. Only
one original component subnet has not had its address range summarized. For reference, the
following list describes which ranges are part of the one exclusive summary route that has already
been uncovered (172.16.200.0/21), and those that are not inside that summary route:
172.16.200.0/21
172.16.208.0/24
Question 4: Answer
This question begins with the following routes that need to be summarized:
Question 5: Answer
This question begins with the following routes that need to be summarized:
192.168.1.0/26
Table D-108 begins by showing three passes through the algorithm. These three passes do not
determine all the summary routes in the answer.
Table D-108 Question 2 Answer: Inclusive Summary of 3 Routes
Candidate Exclusive
Split Summary Range Analysis
IP Addressing Practice 76
The last four rows of the table show the results of the second split (per Step 4 in the algorithm).
Two of these four candidate exclusive summaries (192.168.1.0/28 and 192.168.1.48/28) only
contain addresses outside the range that needs to be summarized, so these do not need to be split
further. 192.168.1.16/28 is part of the exclusive summary, so it does not need to be split again.
Only 192.168.32.0/28 needs further splitting at this point.
Under closer examination, at this point in the process, no further work is actually needed. Only
one original component subnet has not had its address range summarized. For reference, the
following list describes which ranges are part of the one exclusive summary route that has already
been uncovered (192.168.1.16/28), and those that are not inside that summary route:
192.168.1.16/28
192.168.1.32/29