GATE | GATE-CS-2003 | Question 90


The subnet mask for a particular network is Which of the following pairs of IP addresses could belong to this network?
(A) and
(B) and
(C) and
(D) and

Answer: (D)

Background required – Subnetting and SubNet Mask

Answer – D

Explanation – Suppose we have a host A with IP Address IPA and Subnet mask of the subnet of which A is a part is Ms. Now when A wants to send packet to a host B with an IP address say IPB, then A will first AND the subnet-Mask Ms with IPA to find out the subnet-id IDN of the subnet in order to identify whether IPB belongs to the same network. Now if B also belongs to the same network, then IPB BITWISE-AND Ms must be equal to IDN which A has calculated.

If IPA and IPB belongs to same network, we must have


Out of the 4 options, only option D matches. BITWISE-AND = BITWISE-AND =

You can check rest of the options.

This explanation has been provided by Pranjul Ahuja.

Quiz of this Question

GATE CS Corner    Company Wise Coding Practice

Recommended Posts:

3 Average Difficulty : 3/5.0
Based on 1 vote(s)