Skip to content
Official PYQ · 2024

GATE CS 2024 Set 2 Q28 — Fragmentation and IP Addressing, IPv4, CIDR

Explain with AI

​​​​​Which one of the following CIDR\text{CIDR} prefixes exactly represents the range of IP\text{IP} addresses 10.12.2.010.12 .2 .0 to 10.12.3.25510.12 .3 .255?

Choose one option
View worked solution

Answer: A

To find the CIDR prefix that exactly represents the range of IP addresses from 10.12.2.010.12.2.0 to 10.12.3.25510.12.3.255, we can analyze the binary representation of the addresses.

Step 1: Calculate the total number of addresses

  • The range spans from 10.12.2.010.12.2.0 to 10.12.3.25510.12.3.255.
  • This includes all addresses in 10.12.2.x10.12.2.x (256256 addresses) and all addresses in 10.12.3.x10.12.3.x (256256 addresses).
  • Total addresses = 256+256=512=29256 + 256 = 512 = 2^9 addresses.

Step 2: Determine the prefix length

Since the total number of addresses is 292^9, the number of host bits is 99.

Prefix length=32−9=23 bits\text{Prefix length} = 32 - 9 = 23 \text{ bits}

Step 3: Find the network address

Let's write the first address of the block, 10.12.2.010.12.2.0, focusing on the third octet in binary:

  • 10=00001010210 = 00001010_2 (8 bits)
  • 12=00001100212 = 00001100_2 (8 bits)
  • 2=0000001022 = \mathbf{0000001}0_2 (First 7 bits are part of the prefix)

Combining the first 1616 bits of the first two octets and the first 77 bits of the third octet gives a prefix length of 2323 bits. The remaining 99 bits (the last bit of the third octet and all 88 bits of the fourth octet) are set to 00 for the network address:

Network Address=10.12.2.0/23\text{Network Address} = 10.12.2.0/23

Evaluating the Options:

  • Option A (10.12.2.0/2310.12.2.0/23): Correct. It represents exactly the range 10.12.2.010.12.2.0 to 10.12.3.25510.12.3.255.
  • Option B (10.12.2.0/2410.12.2.0/24): Represents only 10.12.2.010.12.2.0 to 10.12.2.25510.12.2.255 (256256 addresses).
  • Option C (10.12.0.0/2210.12.0.0/22): Represents the range 10.12.0.010.12.0.0 to 10.12.3.25510.12.3.255 (10241024 addresses).
  • Option D (10.12.2.0/2210.12.2.0/22): Invalid CIDR notation because the host portion is not all zeros for a /22/22 prefix.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Fragmentation and IP Addressing, IPv4, CIDR questions