Networking - MCQ Practice Questions
Computer networks MCQs — OSI, TCP/IP, routing & protocols.
168 questions | 100% Free
A network administrator is given the IP address block 192.168.10.0/24 and needs to create 6 subnets. What is the minimum subnet mask that satisfies this requirement?
Understanding:
We need to find the minimum subnet mask (fewest borrowed bits) that provides at least 6 subnets from a /24 block.
Formula:
The number of subnets created by borrowing n bits is:
Step 1: Determine bits to borrow
We need 2n≥6.
So we must borrow n=3 bits.
Step 2: Calculate the new prefix length
Starting from a /24 network and borrowing 3 bits:
The new subnet mask is /27.
Step 3: Verify host capacity
With a /27 mask, each subnet has 32−27=5 host bits, giving 25−2=30 usable hosts per subnet — reasonable for most scenarios.
Answer:
The minimum subnet mask required to create at least 6 subnets from a /24 block is /27.
Quick Tip:
Always use 2n≥required subnets and pick the smallest n that satisfies the inequality. Borrowing fewer bits than needed is the most common mistake.
How many usable host addresses are available in a subnet with the mask 255.255.255.192?
Understanding:
We must find the number of usable host addresses for the subnet mask 255.255.255.192.
Formula:
The number of usable hosts in a subnet is:
where h is the number of host bits (the −2 accounts for the network address and broadcast address).
Step 1: Convert the mask to prefix notation
255.255.255.192 in binary:
So the last octet has 2 network bits. Total prefix length:
Step 2: Find the number of host bits
Step 3: Calculate usable hosts
Answer:
The number of usable host addresses in a /26 subnet is 62.
Quick Tip:
The octet value 192=128+64, which corresponds to 110000002 — 2 bits set. This is a quick way to read subnet masks without full binary conversion.
Which of the following is the broadcast address for the subnet 172.16.5.64/26?
Understanding:
We need to find the broadcast address of the subnet 172.16.5.64/26.
Formula:
The broadcast address is obtained by setting all host bits to 1:
Step 1: Determine the block size
With a /26 mask, the host portion has 32−26=6 bits.
Step 2: Identify the subnet range
The network address is 172.16.5.64. The next subnet starts at:
So this subnet spans 172.16.5.64 to 172.16.5.127.
Step 3: Identify the broadcast address
The broadcast address is the last address in the range:
Verification:
Setting all 6 host bits of 172.16.5.64 to 1:
Confirmed: 172.16.5.127.
Answer:
The broadcast address for the subnet 172.16.5.64/26 is 172.16.5.127.
Quick Tip:
Broadcast = Network address + Block size −1. Here: 64+64−1=127.
An organisation is assigned the address block 10.0.0.0/8. It needs to create subnets each capable of supporting exactly 500 hosts. What prefix length should be used?
Understanding:
We must find the prefix length that gives at least 500 usable hosts per subnet.
Formula:
where h=32−prefix length.
Step 1: Solve for minimum host bits
So the minimum value of h=9.
Step 2: Calculate the prefix length
Step 3: Verify
A /23 subnet has:
A /24 subnet has:
Answer:
The prefix length required to support at least 500 hosts per subnet is /23.
Quick Tip:
For host requirements, always find the smallest subnet (largest prefix) that still accommodates the needed count. /24 is the most common wrong answer here because it is the most familiar mask.
Which of the following IP addresses belongs to the subnet 192.168.1.128/25?
Understanding:
We must determine which of the given addresses falls within the subnet 192.168.1.128/25.
Formula:
A /25 subnet has a block size of 232−25=27=128.
The range of a subnet starting at network address N is:
Step 1: Determine the subnet range
The network address is 192.168.1.128.
So the subnet range is 192.168.1.128 to 192.168.1.255.
Step 2: Test each option against the range [128,255]
Step 3: Confirm the valid host
192.168.1.200 is a usable host address within 192.168.1.128/25.
Answer:
The address that belongs to the subnet 192.168.1.128/25 is 192.168.1.200.
Quick Tip:
For a /25, the two subnets within any /24 are .0 to .127 and .128 to .255. Memorising this split saves time in exams.
A company has the network 192.168.4.0/24 and needs to subnet it to support 4 departments with 50 hosts each. What is the subnet mask in dotted-decimal notation for the most efficient subnetting?
Understanding:
We need a subnet mask that simultaneously satisfies:
Formula:
where n = subnet bits borrowed, h = host bits remaining, and n+h=8 (since we start with a /24).
Step 1: Find required subnet bits
Step 2: Find required host bits
Step 3: Check feasibility with n+h=8
With n=2 and h=6: 2+6=8 ✓
Both conditions are satisfied.
Step 4: Calculate the subnet mask
Prefix length =24+2=26.
The last octet of the mask has 2 bits set:
Subnet mask =255.255.255.192.
Verification:
With /27 (n=3,h=5): usable hosts =25−2=30<50 — insufficient.
Answer:
The most efficient subnet mask is 255.255.255.192, providing 4 subnets with 62 usable hosts each.
Quick Tip:
Always verify BOTH constraints — subnets and hosts. A /27 gives more subnets but fails the host requirement, making it a common trap.
How many subnets and usable hosts per subnet does the address block 10.10.0.0/16 yield when subnetted with a /20 mask?
Understanding:
We start with a /16 network and apply a /20 mask.
Formula:
Step 1: Calculate the number of subnets
Step 2: Calculate usable hosts per subnet
Verification:
Total addresses: 216=65536. Each /20 subnet holds 212=4096 addresses. 16×4096=65536 ✓
Answer:
Subnetting 10.10.0.0/16 with a /20 mask yields 16 subnets with 4094 usable hosts each.
Quick Tip:
The number of borrowed bits is always (new prefix − original prefix). Borrowing 4 bits from a /16 gives 24=16 subnets, each with 212−2=4094 hosts.
Which of the following correctly identifies the class and default subnet mask of the IP address 192.168.1.1?
Understanding:
We must identify the class and the classful default subnet mask of the IP address 192.168.1.1.
Formula:
Classful IP address ranges:
Step 1: Identify the class
The first octet of 192.168.1.1 is 192.
Step 2: Apply the default mask
Class C networks have a 24-bit network portion:
Step 3: Confirm it is a private address
192.168.0.0/16 is the private address space for Class C, confirming the classification.
Answer:
The IP address 192.168.1.1 is a Class C address with default subnet mask 255.255.255.0.
Quick Tip:
The leading bits determine the class: Class A starts with 0, Class B with 10, Class C with 110. Since 192=110000002, the leading bits are 110 — confirming Class C.
A network administrator uses VLSM to allocate addresses from 192.168.20.0/24. The first subnet is carved out as 192.168.20.0/26. What is the network address of the next available subnet immediately following the first subnet?
Understanding:
We need to find the starting network address of the subnet immediately after 192.168.20.0/26.
Formula:
In VLSM, the next subnet begins immediately after the broadcast address of the current subnet:
where:
Step 1: Calculate the block size of the /26 subnet
Step 2: Find the broadcast address of the first subnet
Step 3: Find the next network address
Verification:
The /26 subnet 192.168.20.0/26 spans addresses .0 to .63. The address .64 is the first address of the next available block, making it a valid network address for the next subnet.
Answer:
The next available subnet immediately after 192.168.20.0/26 starts at 192.168.20.64.
Quick Tip:
In VLSM, always add the block size to the current network address to get the next subnet's network address. The block size for /26 is 64, so subnets start at .0, .64, .128, .192.