GATE / CS ARCHIVE

SIMILAR QUESTIONS / COMPUTER NETWORKS

Select sufficiently large aligned CIDR allocations

2 questions solved the same way, newest first. Back to Computer Networks

How these are solved

Choose power-of-two block capacity meeting host demand, require canonical network alignment, and check containment within the ISP block. Shared question structure with different demand, prefixes and answer cardinality.

2 marks · MSQ
Report issue

CIDR capacity and network alignment

IP Addressing, Fragmentation & Address Resolution

Question 56, GATE 2026: An ISP controls 202.16.0.0/15 and must allocate a single CIDR block able to hold 6000 addresses. Which proposed allocations are valid: A 202.16.0.0/19; B 202.17.64.0/19; C 202.16.32.0/19; D 202.17.24.0/19?
Tap to enlarge
Select all that apply
Answer & solution

Official answer: A, B, C

Step through it (6 steps)

Givens and goal

An ISP controls 202.16.0.0/15 and must allocate a single CIDR block able to hold 6000 addresses. Which proposed allocations are valid: A 202.16.0.0/19; B 202.17.64.0/19; C 202.16.32.0/19; D 202.17.24.0/19?

Approach

Round the requested count up to a power of two, then check both containment in the parent network and alignment of the network address.

Step-by-step solution

1. A single CIDR allocation must have a power-of-two address count. Since 212=4096<6000≤8192=213, the smallest fitting block is /19, containing 8192 addresses.
2. A /19 boundary leaves thirteen host bits. Its mask is 255.255.224.0, so the fourth octet must be zero and the third octet must be a multiple of 32.
3. The ISP's /15 block spans second-octet values 16 and 17 with first octet 202. The candidates in A, B and C are all within that range and use aligned third octets 0, 64 and 32 respectively.
4. D uses third octet 24, which is not a multiple of 32. It is a host address inside the /19 network starting at third octet 0, not the canonical start of a distinct /19 allocation. Therefore exclude D.

Interpretation note: A request for 6000 addresses is rounded up to a CIDR block that can hold at least that many; a single /19 does not contain exactly 6000. The eligibility result is unchanged if a conventional subnet reserves two addresses, since 8190 remains sufficient.

Network-range check: A spans 202.16.0.0 through 202.16.31.255; C spans 202.16.32.0 through 202.16.63.255; B spans 202.17.64.0 through 202.17.95.255. All lie inside the parent range 202.16.0.0 through 202.17.255.255. For D, masking third octet 24 by 224 gives 0, demonstrating that 202.17.24.0/19 normalizes to 202.17.0.0/19 rather than naming an aligned block beginning at 24.

Original paper, page 43 · Answer key

2 marks · MCQ
Report issue

IP Addressing, Fragmentation & Address Resolution

Question 38, GATE 2020: An ISP owns 202.61.0.0/17 and wants one aggregatable block for 1500 computers. Candidate network starts: I 202.61.84.0/21; II 202.61.104.0/21; III 202.61.64.0/21; IV 202.61.144.0/21. Which candidates are valid? A I,II; B II,III; C III,IV; D I,IV.
Question 38, GATE 2020: An ISP owns 202.61.0.0/17 and wants one aggregatable block for 1500 computers. Candidate network starts: I 202.61.84.0/21; II 202.61.104.0/21; III 202.61.64.0/21; IV 202.61.144.0/21. Which candidates are valid? A I,II; B II,III; C III,IV; D I,IV.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step through it (6 steps)

Worked explanation

Host capacity first: /22 has 1024 total addresses and cannot serve 1500 machines; /21 has 2048 total, conventionally 2046 usable, so it suffices. A /21 mask is 255.255.248.0, making its third-octet start a multiple of 8. The available /17 spans third octets 0 through 127. I fails alignment because 84 mod 8=4. II starts at 104 and ends at 111, inside the allocation. III spans 64–71, also inside. IV is aligned but spans 144–151 outside the /17. Interpreting 84.0/21 as an arbitrary address within the 80.0/21 network would silently change the listed network start; the intended assessment uses actual aligned block bases.

Derivation and answer

A/21 block provides 2048 addresses, enough for 1500 hosts, and must begin on a multiple-of 8 boundary in the third octet.104 and 64 are aligned and lie within the/17 allocation’s third-octet range 0–127.84 is not an aligned network address, and 144 lies outside the allocation. Thus II andIII, B. This treats the supplied address as the claimed network start rather than silently normalizing a host-bearing prefix.

Original paper, page 13 · Answer key