GateAI
IPv4, CIDR and NAT

GATE CSE 2012 · Q34

MCQ2 marksMedium

Time

An Internet Service Provider (ISP) has the following chunk of CIDR-based IP addresses available with it: 245.248.128.0/20245.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?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) 245.248.136.0/21 and 245.248.128.0/22

IPv4, CIDR and NAT

The ISP has the block 245.248.128.0/20245.248.128.0/20, containing a total of 232−20=212=40962^{32-20} = 2^{12} = 4096 IP addresses.

  1. Organization A requires half of the chunk:

    40962=2048 addresses=211  ⟹  /21 prefix\frac{4096}{2} = 2048\text{ addresses} = 2^{11} \implies /21\text{ prefix}

    The original /20/20 block can be split into two equal /21/21 subnets:

    • Subnet 1: 245.248.128.0/21245.248.128.0/21 (range 245.248.128.0245.248.128.0 to 245.248.135.255245.248.135.255)

    • Subnet 2: 245.248.136.0/21245.248.136.0/21 (range 245.248.136.0245.248.136.0 to 245.248.143.255245.248.143.255)

  2. Organization B requires a quarter of the chunk:

    40964=1024 addresses=210  ⟹  /22 prefix\frac{4096}{4} = 1024\text{ addresses} = 2^{10} \implies /22\text{ prefix}

If Organization A is allocated 245.248.136.0/21245.248.136.0/21, the remaining half (245.248.128.0/21245.248.128.0/21) can be divided into two /22/22 subnets:

  • 245.248.128.0/22245.248.128.0/22 (range 245.248.128.0245.248.128.0 to 245.248.131.255245.248.131.255)

  • 245.248.132.0/22245.248.132.0/22 (range 245.248.132.0245.248.132.0 to 245.248.135.255245.248.135.255)

Organization B can be allocated 245.248.128.0/22245.248.128.0/22, and the remaining /22/22 block (245.248.132.0/22245.248.132.0/22) is retained by the ISP. Both allocations are non-overlapping and valid.

Thus, (A) is the valid allocation.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This IPv4, CIDR and NAT previous year question is Q34 of the GATE CSE 2012 paper. Find more GATE CSE PYQs on IPv4, CIDR and NAT in Computer Networks, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related IPv4, CIDR and NAT PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

IPv4, CIDR and NAT in GATE CSE

IPv4, CIDR and NAT has 14 GATE CSE PYQs across 10 papers from 2012 to 2025. 4 of them are 2-mark MCQs like this one, and GATE CSE 2012 has 2.

How GATE tests IPv4, CIDR and NAT

More from GATE CSE 2012

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2012 · Q34 · MCQ

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?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.