Subnetting is where Computer Networks marks are decided in GATE and PSU papers, because the questions are arithmetic: convert a mask to a prefix, count host bits, find a block boundary, or run longest-prefix match. One miscounted bit and the answer changes. Below are 12 solved MCQs from KnowledgeGate's published question bank, most of them previous-year questions with the exam and year noted. Attempt each before the explanation, which stays short on purpose. If a step is unclear, the full theory sits in the Computer Networks learn module. A note on the deep links: GATE PYQs carried inside the course link to their exact solved page; the addressing-basics questions live in the same module's practice sets, so the module link above is your entry point for those.
IP addressing and classes
Q1. In IPv4, the number of networks allowed under Class C addresses is (UPPSC Polytechnic Lecturer 2022)
(a) 2 to the 14
(b) 2 to the 7
(c) 2 to the 21
(d) 2 to the 24
Answer: (c). A Class C address uses 24 bits for the network ID, but the leading three bits are fixed as 110 to mark the class. That leaves 21 bits free to vary, so 2 to the 21 distinct Class C networks are possible (see the solved page).
Q2. What is an IP address? (UP Police 2018)
(a) it is the Internet Protocol
(b) it is an internet posting address used to authenticate networks
(c) it is the unique number given to each device on the network
(d) it is the same as the URL
Answer: (c). An IP address is a numeric label assigned to each device on a network, letting it be located and addressed like a postal address. It is not the protocol itself, nor a URL, which is a human-readable resource name. Only (c) describes the address.
Q3. The network 198.78.41.0 is a (ISRO 2008)
(a) Class A network
(b) Class B network
(c) Class C network
(d) Class D network
Answer: (c). In classful addressing the first octet fixes the class: 1 to 126 is A, 128 to 191 is B, and 192 to 223 is C. Since 198 falls in the 192 to 223 range, this is a Class C network.
Q4. IPv4 addresses have a size of (RSSB 2022)
(a) 32 bit
(b) 64 bit
(c) 128 bit
(d) 256 bit
Answer: (a). IPv4 uses a 32-bit address space, which yields roughly 4.3 billion unique addresses. That exhaustion pressure is exactly why IPv6 with its 128-bit space exists. The size to remember here is 32 bits.
Q5. IPv6 uses an address of (Navodaya Vidyalaya Samiti 2017)
(a) 128 bit
(b) 64 bit
(c) 32 bit
(d) variable
Answer: (a). IPv6 expands the address to 128 bits, four times the width of IPv4. That enormous space removes the address-scarcity problem and the heavy reliance on NAT. The value to memorize is 128 bits.
Subnetting and fixed-length masks
Q6. A subnetted Class B network has broadcast address 144.16.95.255. Its subnet mask (GATE 2006)
(a) is necessarily 255.255.224.0
(b) is necessarily 255.255.240.0
(c) is necessarily 255.255.248.0
(d) could be any one of 255.255.224.0, 255.255.240.0, 255.255.248.0
Answer: (d). Each candidate mask (/19, /20, /21) has a block containing 95 whose broadcast ends at 95.255: the /19 block 64 to 95, the /20 block 80 to 95, and the /21 block 88 to 95. Without knowing the subnet ID you cannot single one out, so any of the three is possible (see the solved page).
Q7. An organization with a Class B network wants subnets for 64 departments. The subnet mask would be (GATE 2005)
(a) 255.255.0.0
(b) 255.255.64.0
(c) 255.255.128.0
(d) 255.255.252.0
Answer: (d). To make 64 subnets you need the smallest n with 2 to the n at least 64, which is n equal to 6. Borrowing 6 bits from a Class B /16 gives a /22 prefix, and /22 in dotted decimal is 255.255.252.0 (see the solved page).
Q8. For a Class B network with subnet mask 255.255.248.0, the maximum number of hosts per subnet is (GATE 2008)
(a) 1022
(b) 1023
(c) 2046
(d) 2047
Answer: (c). The mask 255.255.248.0 is /21, since 248 is 11111000. That leaves 32 minus 21, or 11 host bits, giving 2 to the 11 equal to 2048 addresses. Subtracting the network and broadcast addresses leaves 2046 usable hosts (see the solved page).
Q9. A subnet has mask 255.255.255.192. The maximum number of hosts it can hold is (GATE 2004)
(a) 14
(b) 30
(c) 62
(d) 126
Answer: (c). The mask 255.255.255.192 is /26, because 192 is 11000000. Host bits are 32 minus 26, that is 6, so 2 to the 6 equals 64 addresses. Removing the network and broadcast addresses leaves 62 usable hosts (see the solved page).
CIDR, VLSM and supernetting
Q10. Which CIDR prefix exactly represents the range 10.12.2.0 to 10.12.3.255? (GATE 2024)
(a) 10.12.2.0/23
(b) 10.12.2.0/24
(c) 10.12.0.0/22
(d) 10.12.2.0/22
Answer: (a). The range spans 512 addresses, which needs 9 host bits, so the prefix is 32 minus 9 equal to /23 with mask 255.255.254.0. Starting at 10.12.2.0, a 512-block runs up to broadcast 10.12.3.255. That is exactly 10.12.2.0/23 (see the solved page).
Q11. C1 has IP 203.197.2.53 with mask 255.255.128.0, and C2 has IP 203.197.75.201 with mask 255.255.192.0. Which is true? (GATE 2006)
(a) both assume they are on the same network
(b) C2 assumes C1 is on the same network, but C1 assumes C2 is on a different one
(c) C1 assumes C2 is on the same network, but C2 assumes C1 is on a different one
(d) both assume they are on different networks
Answer: (c). C1 with /17 sees network 203.197.0.0/17, which covers 0 to 127 in the third octet, so C2's 75 falls inside it. C2 with /18 sees network 203.197.64.0/18, covering 64 to 127, so C1's third octet 2 falls outside. Each applies its own mask, giving the asymmetric answer (c) (see the solved page).
Q12. An ISP serving from 202.61.0.0/17 must allot a block for 1500 hosts using route aggregation. From I: 202.61.84.0/21, II: 202.61.104.0/21, III: 202.61.64.0/21, IV: 202.61.144.0/21, the valid candidates are (GATE 2020)
(a) I and II only
(b) II and III only
(c) III and IV only
(d) I and IV only
Answer: (b). A /21 gives 2048 addresses, enough for 1500 hosts, but a valid /21 boundary needs the third octet to be a multiple of 8, and the block must sit inside 202.61.0.0/17 (third octet 0 to 127). Only 104 and 64 satisfy both: 84 is not a multiple of 8, and 144 lies outside the /17. So II and III (see the solved page).
How subnetting is examined
The set tracks how the topic is actually tested. The addressing block (Q1 to Q5) is quick recall: class ranges, the 32-bit and 128-bit sizes, and the fixed leading bits that shrink the Class C network count. The fixed-length mask block (Q6 to Q9) is the core drill, and every question reduces to the same three moves: mask to prefix, count host bits, then 2 to the host bits minus 2 for usable hosts. The CIDR block (Q10 to Q12) adds block-boundary and longest-prefix reasoning, which is where the two-mark aggregation questions live.
For the method behind every conversion, work through our IP Addressing and Subnetting Explained deep dive, then drill the numericals in the Computer Networks learn module. GATE aspirants get the full networks sequence inside GATE Guidance by Sanchit Sir, and you can see where it fits across the paper on the GATE CS Exam page. Solve, redo the arithmetic by hand, and the speed follows on the second pass.