Computer Networks Questions & Answers – Designing Subnet Masks

This set of Computer Networks MCQs focuses on “Designing Subnet Masks”.

1. A network administrator is connecting hosts A and B directly through their Ethernet interfaces, as shown in the illustration. Ping attempts between the hosts are unsuccessful. What can be done to provide connectivity between the hosts?
Find connectivity between the hosts directly through their Ethernet interfaces

i. A crossover cable should be used in place of the straight-through cable.
ii. A rollover cable should be used in place of the straight-through cable.
iii. The subnet masks should be set to 255.255.255.192.
iv. A default gateway needs to be set on each host.
v. The subnet masks should be set to 255.255.255.0.

a) i only
b) ii only
c) iii and iv only
d) i and v only
View Answer

Answer: d
Explanation: First, if you have two hosts directly connected, as shown in the graphic, then you need a crossover cable. A straight-through cable won’t work. Second, the hosts have different masks, which puts them in different subnets. The easy solution is just to set both masks to 255.255.255.0 (/24).

2. Your router has the following IP address on Ethernet0: 172.16.2.1/23. Which of the following can be valid host IDs on the LAN interface attached to the router?

i. 172.16.1.100
ii. 172.16.1.198
iii. 172.16.2.255
iv. 172.16.3.0
advertisement
advertisement

a) i only
b) ii and iii only
c) iii and iv only
d) ii only
View Answer

Answer: c
Explanation: The router’s IP address on the E0 interface is 172.16.2.1/23, which is 255.255.254.0. This makes the third octet a block size of 2. The router’s interface is in the 172.16.2.0 subnet, and the broadcast address is 172.16.3.255 because the next subnet is 172.16.4.0. The valid host range is 172.16.2.1 to 172.16.3.254. The router is using the first valid host address in the range.

3. Which two statements describe the IP address 10.16.3.65/23?

i. The subnet address is 10.16.3.0 255.255.254.0.
ii. The lowest host address in the subnet is 10.16.2.1 255.255.254.0.
iii. The last valid host address in the subnet is 10.16.2.254 255.255.254.0.
iv. The broadcast address of the subnet is 10.16.3.255 255.255.254.0.

a) i and iii
b) ii and iv
c) i, ii and iv
d) ii, iii and iv
View Answer

Answer: b
Explanation: The mask 255.255.254.0 (/23) used with a Class A address means that there are 15 subnet bits and 9 host bits. The block size in the third octet is 2 (256 – 254). So this makes the subnets in the interesting octet 0, 2, 4, 6, etc., all the way to 254. The host 10.16.3.65 is in the 10.16.2.0 subnet. The next subnet is 10.16.4.0, so the broadcast address for the 10.16.2.0 subnet is 10.16.3.255. The valid host addresses are 10.16.2.1 to 10.16.3.254.

4. What is the maximum number of IP addresses that can be assigned to hosts on a local subnet that uses the 255.255.255.224 subnet mask?
a) 14
b) 15
c) 16
d) 30
View Answer

Answer: d
Explanation: A /27 (255.255.255.224) is 3 bits on and 5 bits off. This provides 8 subnets, each with 30 hosts. Does it matter if this mask is used with a Class A, B, or C network address? Not at all. The number of host bits would never change.
advertisement

5. You need to subnet a network into 5 subnets, each with at least 16 hosts. Which classful subnet mask would you use?
a) 255.255.255.192
b) 255.255.255.224
c) 255.255.255.240
d) 255.255.255.248
View Answer

Answer: b
Explanation: You need 5 subnets, each with at least 16 hosts. The mask 255.255.255.240 provides 16 subnets with 14 hosts which is less than 15, so this will not work. The mask 255.255.255.224 provides 8 subnets, each with 30 hosts so this may work. The mask 255.255.255.192 provides 4 subnets, each with 60 hosts so this may work. Comparing both the possible masks, 255.255.255.224 provides the best answer.

6. You have a network that needs 29 subnets while maximizing the number of host addresses available on each subnet. How many bits must you borrow from the host field to provide the correct subnet mask?
a) 2
b) 3
c) 4
d) 5
View Answer

Answer: d
Explanation: A 240 mask is 4 subnet bits and provides 16 subnets, each with 14 hosts. We need more subnets, so let’s add subnet bits. One more subnet bit would be a 248 mask. This provides 5 subnet bits (32 subnets) with 3 host bits (6 hosts per subnet). This is the best answer.
advertisement

7. If an Ethernet port on a router were assigned an IP address of 172.16.112.1/25, what would be the valid subnet address of this host?
a) 172.16.112.0
b) 172.16.0.0
c) 172.16.96.0
d) 172.16.255.0
View Answer

Answer: a
Explanation: A /25 mask is 255.255.255.128. Used with a Class B network, the third and fourth octets are used for subnetting with a total of 9 subnet bits, 8 bits in the third octet and 1 bit in the fourth octet. Since there is only 1 bit in the fourth octet, the bit is either off or on-which is a value of 0 or 128. The host in the question is in the 0 subnet, which has a broadcast address of 127 since 128 is the next subnet

8. You have an interface on a router with the IP address of 192.168.192.10/29. Including the router interface, how many hosts can have IP addresses on the LAN attached to the router interface?
a) 6
b) 8
c) 30
d) 32
View Answer

Answer: a
Explanation: A /29 (255.255.255.248), regardless of the class of address, has only 3 host bits. Six hosts are the maximum number of hosts on this LAN, including the router interface. Out of the 8 addresses possible with the host bits, the first and the last address are for the subnet id and broadcast address respectively.

9. What is the subnet id of a host with an IP address 172.16.66.0/21?
a) 172.16.36.0
b) 172.16.48.0
c) 172.16.64.0
d) 172.16.0.0
View Answer

Answer: c
Explanation: A /21 is 255.255.248.0, which means we have a block size of 8 in the third octet, so we just count by 8 until we reach 66. The subnet in this question is 64.0. The next subnet is 72.0, so the broadcast address of the 64 subnet is 71.255.

10. The network address of 172.16.0.0/19 provides how many subnets and hosts?
a) 7 subnets, 30 hosts each
b) 8 subnets, 8,190 hosts each
c) 8 subnets, 2,046 hosts each
d) 7 subnets, 2,046 hosts each
View Answer

Answer: b
Explanation: A CIDR address of /19 is 255.255.224.0. This is a Class B address, so that is only 3 subnet bits, but it provides 13 host bits, or 8 subnets, each with 8,190 hosts.

Sanfoundry Global Education & Learning Series – Computer Networks.

To practice MCQs on all areas of Computer Networks, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.