CIDR and VLSM MCQs: 12 Solved Subnetting Questions with Explanations
Solve 12 published CIDR and VLSM questions step by step. Learn prefix conversion, aligned subnet ranges, VLSM allocation and longest-prefix routing.
KnowledgeGate Team
Exam prep & CS education

CIDR questions mix prefix notation, block alignment, usable-host boundaries, variable-size allocation and longest-prefix matching. Knowing 2^host bits is not enough if you accept a non-aligned block or the first matching route.
Nine questions are MCQs, one is an MSQ and two are NATs. Calculate each answer, then compare the network, broadcast and prefix decisions. KnowledgeGate currently has 45 CIDR and VLSM practice questions. The IP Addressing and Subnetting Explained guide owns the concept foundations and one full subnetting walkthrough; this set owns a 12-question drill across prefix conversion, VLSM allocation and routing. Find the broader subject path under GATE CS Exam Preparation.
CIDR and VLSM rules to use before solving
What to find | Rule |
|---|---|
Host bits for |
|
Total addresses |
|
Usual usable hosts | Total minus network and broadcast |
Dotted mask |
|
Block size |
|
/31 and /32 are exceptions to the usual usable-host rule; they are not needed here.
For 172.16.123.213/28, the mask is 255.255.255.240 and the fourth-octet block size is 256 - 240 = 16. Boundaries include 0, 16, ..., 208, 224. Since 213 lies in 208-223, the network is .208, usable hosts .209-.222, and broadcast .223.
For 200.10.11.144/27, blocks advance by 32, placing .144 in .128-.159. Thus the network is .128, broadcast .159, and last usable host .158. Always normalise a supplied host to its network boundary.
For VLSM, allocate largest first. A 6000-address request needs 8192 = 2^13, hence /19, starting at a multiple of 32 in the third octet. Half of 245.248.128.0/20 is /21; a quarter is /22.

CIDR MCQs 1-3: prefix length, masks and address counts
Question 1
What does /24 denote in CIDR?A. 24 bits are used for network portion
B. 24 addresses are available in the subnet
C. 24 subnets are created
D. 24 bits are used for host portionCorrect answer: A. 24 bits are used for network portion.
A /24 has 24 network-prefix bits and 32 - 24 = 8 host bits, giving 2^8 = 256 addresses. Thus 24 is the prefix length, not the address, subnet or host-bit count. Open the RPSC 2024 question.
Question 2
The subnet mask 255.255.255.192A. extends the network portion to 16 bits
B. extends the network portion to 26 bits
C. extends the network portion to 36 bits
D. has no effect on the network portion of an IP addressCorrect answer: B. extends the network portion to 26 bits.
The first three octets contribute 24 one-bits. The last, 192 = 11000000, contributes two, so the mask is /26. IPv4 has only 32 bits, ruling out a 36-bit network portion. Open the ISRO 2008 question.
Question 3
A classless address is given as 167.199.170.82/27. The number of addresses in the network isA. 64 addresses
B. 32 addresses
C. 28 addresses
D. 30 addressesCorrect answer: B. 32 addresses.
A /27 leaves 32 - 27 = 5 host bits, so the block has 2^5 = 32 total addresses. Excluding network and broadcast would leave 30 usable hosts, but the stem asks for the total. Open the UGC NET 2022 question.
CIDR questions 4-6: network boundaries, last hosts and exact ranges
Question 4
IP address 172.16.123.213 is found to be residing on a sub-network with the following subnet mask: 255.255.255.240. What is the network address of this subnet?A. 172.16.123.213
B. 172.16.123.240
C. 172.16.123.245
D. 172.16.123.208Correct answer: D. 172.16.123.208.
The changing mask octet is 240, so the block size is 256 - 240 = 16. The lower boundary is floor(213 / 16) x 16 = 13 x 16 = 208. The block is .208-.223, with network .208 and broadcast .223. Open the RPSC 2024 question.
Question 5
In the network 200.10.11.144/27, the fourth octet (in decimal) of the last IP address of the network which can be assigned to a host is ____________Correct answer: 158.
A /27 advances by 32, so .144 lies inside .128-.159, not on a boundary. Network .128 and broadcast .159 leave 200.10.11.158 as the last assignable host. The requested octet is 158. Open the GATE 2015 question.
Question 6
Which one of the following CIDR prefixes exactly represents the range of IP addresses 10.12.2.0 to 10.12.3.255?A. 10.12.2.0/23
B. 10.12.2.0/24
C. 10.12.0.0/22
D. 10.12.2.0/22Correct answer: A. 10.12.2.0/23.
Two /24 blocks contain 256 + 256 = 512 = 2^9 addresses, giving prefix 32 - 9 = /23. A /23 starts at an even third octet; the aligned start at 2 covers octets 2 and 3 exactly. Open the GATE 2024 question.
VLSM and CIDR questions 7-9: splitting and allocating address blocks
Question 7
An organization is granted the block 130.34.12.64/26. It needs to have 4 subnets. Which of the following is not an address of this organization?A. 130.34.12.124
B. 130.34.12.89
C. 130.34.12.70
D. 130.34.12.132Correct answer: D. 130.34.12.132.
The parent /26 spans 130.34.12.64-130.34.12.127. Four equal subnets add two prefix bits, giving /28 boundaries at .64, .80, .96 and .112. The first three choices remain inside the parent; .132 exceeds .127. Open the ISRO 2014 question.
Question 8
An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available with it: 245.248.128.0/20. The ISP wants to give half of this chunk of addresses to Organization A, and a quarter to Organization B, while retaining the remaining with itself. Which of the following is a valid allocation of addresses to A and B?A. 245.248.136.0/21 and 245.248.128.0/22
B. 245.248.128.0/21 and 245.248.128.0/22
C. 245.248.132.0/22 and 245.248.132.0/21
D. 245.248.136.0/24 and 245.248.132.0/21Correct answer: A. 245.248.136.0/21 and 245.248.128.0/22.
The /20 has 4096 addresses across third octets 128-143. Half is 2048, or /21; a quarter is 1024, or /22. In A, Organization A gets .136-.143, B gets .128-.131, and .132-.135 remains. All are aligned and non-overlapping. Option B overlaps; C and D use wrong-sized blocks. Open the GATE 2012, TPSC 2025 and ISRO 2017 question.

Question 9
An ISP having an address block 202.16.0.0/15 assigns a block of 6000 IP addresses to a client, using the classless internet domain routing (CIDR) super-netting approach. Which of the following address blocks can be assigned by the ISP?A. 202.16.0.0/19
B. 202.17.64.0/19
C. 202.16.32.0/19
D. 202.17.24.0/19Correct answer: A, B and C.
Round 6000 up to 8192 = 2^13, giving /19. The parent /15 covers 202.16.0.0-202.17.255.255. A /19 must start at a multiple of 32 in the third octet. Values 0, 64 and 32 are aligned; 24 is not. Thus A, B and C work. Open the GATE 2026 question.
CIDR questions 10-12: host decisions and longest-prefix routing
Question 10
Two computers C1 and C2 are configured as follows. C1 has IP address 203.197.2.53 and netmask 255.255.128.0. C2 has IP address 203.197.75.201 and netmask 255.255.192.0. Which one of the following statements is true?A. C1 and C2 both assume they are on the same network
B. C2 assumes C1 is on same network, but C1 assumes C2 is on a different network
C. C1 assumes C2 is on same network, but C2 assumes C1 is on a different network
D. C1 and C2 both assume they are on different networks.Correct answer: C. C1 assumes C2 is on the same network, but C2 assumes C1 is on a different network.
Apply each host's mask. C1's /17 covers third octets 0-127, including C2's .75. C2's /18 covers 64-127, excluding C1's .2. Therefore C1 sees C2 as local, while C2 sees C1 as remote. Open the GATE 2006 question.
Question 11
An IP router using CIDR receives a packet addressed to 131.23.151.76. Its routing table is:
Prefix | Output interface |
|---|---|
131.16.0.0/12 | 3 |
131.28.0.0/14 | 5 |
131.19.0.0/16 | 2 |
131.22.0.0/15 | 1 |
Which output interface forwards the packet?
Correct answer: 1.
131.16.0.0/12 covers second octets 16-31, so it matches .23. The longer 131.22.0.0/15 covers 22-23 and also matches. The /14 at .28 and /16 at .19 do not. Longest-prefix matching selects the /15 and interface 1. Open the GATE 2014 question.
Question 12
A router has this routing table:
Destination | Subnet mask | Interface |
|---|---|---|
128.75.43.0 | 255.255.255.0 | Eth0 |
128.75.43.0 | 255.255.255.128 | Eth1 |
192.12.17.5 | 255.255.255.255 | Eth3 |
default | - | Eth2 |
Which interfaces forward packets to 128.75.43.16 and 192.12.17.10, respectively?
A. Eth1 and Eth2
B. Eth0 and Eth2
C. Eth0 and Eth3
D. Eth1 and Eth3Correct answer: A. Eth1 and Eth2.
128.75.43.16 matches /24 and /25; the longer /25 covers .0-.127, so it uses Eth1. 192.12.17.10 does not equal the /32 host route 192.12.17.5, so it uses default Eth2. Choose the longest match, otherwise the default. Open the GATE 2004 question.
How CIDR and VLSM questions create traps
Use five moves: translate notation (Questions 1-3), normalise ranges (4-6), preserve parent boundaries (7-9), apply each host's mask (10), and choose the longest route (11-12).
Common error | Correction |
|---|---|
Giving total addresses when usable hosts are asked | Exclude network and broadcast under the usual rule |
Treating a host address as the network ID | Round down to the aligned block boundary |
Rounding an address request down | Round up to the next power of two |
Allowing VLSM children to overlap | Write every child range before accepting it |
Starting | Check alignment in the third octet |
Selecting the first routing-table match | Test all entries and take the longest prefix |
Questions 6 and 10 also appear in Subnetting MCQs: 12 Solved IP Addressing Questions, where they anchor a broader set covering classful addressing and fixed-length masks. Here they connect exact-range aggregation and asymmetric host masks to one CIDR and VLSM solving routine.
CIDR and VLSM: the short version and next step
Write this routine on your scratchpad:
prefix -> host bitshost bits -> block sizeblock size -> aligned rangealigned range -> usable boundaryFor allocation, add
largest request first; for routing, addall matches -> longest prefix.
Classify each miss as prefix conversion, boundary arithmetic, allocation alignment or route selection. Rework it without the options, then retry the set after one day. Practise under time with the GATE Test Series, or follow GATE Guidance by Sanchit Sir for a structured Computer Networks sequence.
Keep learning
IP Addressing in Computer Networks: Classes, Subnetting, CIDR, and Worked Examples for GATE
Build IP addressing from its 32-bit foundation through classful ranges, subnetting, VLSM, CIDR aggregation, and longest prefix match with checked examples.
Subnetting and FLSM Design MCQs: 12 Solved Questions on Masks, Hosts and Ranges
Solve 12 FLSM questions on default masks, borrowed bits, subnet and host counts, usable ranges, gateway selection and a complete 512-subnet design.
Computer Networks Subnetting MCQs: 12 solved IP addressing questions (GATE, ISRO, state exams)
Subnetting and IP addressing MCQs solved: 12 previous-year GATE, ISRO and state-exam questions on address classes, masks, hosts per subnet, CIDR and VLSM.
IP addressing and subnetting: a worked guide with the exam angle
IP addressing and subnetting explained: IPv4 structure, classful vs CIDR, subnet masks, a fully worked subnetting example with ranges and broadcast addresses.





