CCNA DC FAQ: Anayzing Subnet Masks

CCNA DC FAQ: Anayzing Subnet Masks



Figure: Simple Subnet Design, with Mask /24

Q1. Which of the following answers lists the prefix (CIDR) format equivalent of 255.255.254.0?
a. /19
b. /20
c. /23
d. /24
e. /25

Answer: C. Thinking about the conversion one octet at a time, the first two octets each convert to 8 binary 1s. 254 converts to 8-bit binary 11111110, and decimal 0 converts to 8-bit binary 00000000. So, the total number of binary 1s (which defines the prefix length) is 8+8+7+0 = /23.

Q2. Which of the following answers lists the prefix (CIDR) format equivalent of 255.255.255.240?
a. /26
b. /28
c. /27
d. /30
e. /29

Answer: B. Thinking about the conversion one octet at a time, the first three octets each convert to 8 binary 1s. 240 converts to 8-bit binary 11110000, so the total number of binary 1s (which defines the prefix length) is 8+8+8+4 = /28.

Q3. Which of the following answers lists the dotted-decimal notation (DDN) equivalent of /24?
a. 255.255.240.0
b. 255.255.252.0
c. 255.255.255.0
d. 255.255.255.192
e. 255.255.255.240

Answer: C. /24 is the equivalent of the mask that in binary has 24 binary 1s. To convert that to DDN format, write down all the binary 1s (24 in this case), followed by binary 0s for the remainder of the 32-bit mask. Then take 8 bits at a time, and convert from binary to decimal (or memorize the nine possible DDN mask octet values and their binary equivalents). Using the /24 mask in this question, the binary mask is 11111111 11111111 11111111 00000000. Each of the first three octets is all binary 1, so each converts to 255. The last octet, all binary 0s, converts to decimal 0, for a DDN mask of 255.255.255.0.

Q4. Which of the following answers lists the dotted-decimal notation (DDN) equivalent of /30?
a. 255.255.255.192
b. 255.255.255.252
c. 255.255.255.240
d. 255.255.254.0
e. 255.255.255.0

Answer: B. /30 is the equivalent of the mask that in binary has 30 binary 1s. To convert that to DDN format, write down all the binary 1s (30 in this case), followed by binary 0s for the remainder of the 32-bit mask. Then take 8 bits at a time, and convert from binary to decimal (or memorize the nine possible DDN mask octet values and their binary equivalents). Using the /30 mask in this question, the binary mask is 11111111 11111111 11111111 11111100. Each of the first three octets is all binary 1, so each converts to 255. The last octet, 11111100, converts to 252, for a DDN mask of 255.255.255.252. See Appendix I for a decimal/binary conversion table.

Q5. While working at the help desk, you receive a call and learn a user’s PC IP address and mask (10.55.66.77, mask 255.255.255.0). When thinking about this using classful logic, you determine the number of network (N), subnet (S), and host (H) bits. Which of the following is true in this case?
a. N=12
b. S=12
c. H=8
d. S=8
e. N=24

Answer: C. The size of the network part is always either 8, 16, or 24 bits, based on whether it is Class A, B, or C, respectively. As a Class A address, N=8. The mask 255.255.255.0, converted to prefix format, is /24. The number of subnet bits is the difference between the prefix length (24) and N, so S=16 in this case. The size of the host part is a number that, when added to the prefix length (24), gives you 32, so H=8 in this case.

Q6. While working at the help desk, you receive a call and learn a user’s PC IP address and mask (192.168.9.1/27). When thinking about this using classful logic, you determine the number of network (N), subnet (S), and host (H) bits. Which of the following is true in this case?
a. N=24
b. S=24
c. H=8
d. H=7

Answer: A. The size of the network part is always either 8, 16, or 24 bits, based on whether it is Class A, B, or C, respectively. As a Class C address, N=24. The number of subnet bits is the difference between the prefix length (27) and N, so S=3 in this case. The size of the host part is a number that, when added to the prefix length (27), gives you 32, so H=5 in this case.

Q7. An engineer is thinking about the following IP address and mask using classless IP addressing logic: 10.55.66.77, 255.255.255.0. Which of the following statements are true when using classless addressing logic? (Choose two.)
a. The network part’s size is 8 bits.
b. The prefix length is 24 bits.
c. The prefix length is 16 bits.
d. The host part’s size is 8 bits.

Answer: B and D. Classless addressing rules define a two-part IP address structure: the prefix and the host part. The host part is defined the same way as with classful IP addressing rules. The classless address rules’ prefix length is the length of the combined network and subnet parts when using classful IP addressing concepts. Mathematically, the prefix length is equal to the number of binary 1s in the mask. In this case, with a mask of 255.255.255.0, the prefix length is 24 bits. The host length is the number of bits added to 24 to total 32, for 8 host bits.

Q8. Which of the following statements is true about classless IP addressing?
a. It uses a 128-bit IP address.
b. It applies only to Class A and B networks.
c. It separates IP addresses into network, subnet, and host parts.
d. It ignores Class A, B, and C network rules.

Answer: D. Classless addressing rules define a two-part IP address structure: the prefix and the host part. This logic ignores Class A, B, and C rules, and can be applied to the 32-bit IPv4 addresses from any address class. By ignoring Class A, B, and C rules, classless addressing ignores any distinction as to the network part of an IPv4 address.

Q9. Which of the following masks, when used as the only mask within a Class B network, would supply enough subnet bits to support 100 subnets? (Choose two.)
a. /24
b. 255.255.255.252
c. /20
d. 255.255.252.0

Answer: A and B. The masks in binary define a number of binary 1s, and the number of binary 1s defines the length of the prefix (network + subnet) part. With a Class B network, the network part is 16 bits. To support 100 subnets, the subnet part must be at least 7 bits long. Six subnet bits would supply only 26 = 64 subnets, while 7 subnet bits supply 27 = 128 subnets. The /24 answer supplies 8 subnet bits, and the 255.255.255.252 answer supplies 14 subnet bits.

About the author

James Palmer

Leave a Comment