Skip to content
GATEiit

GATE CSE 2019 Q38: Which of three machines share a subnet with mask 255.255.255.252

Syllabus topic: IPv4: fragmentation, CIDR notation and network address translation (NAT)

Question

Consider three machines M, N, and P with IP addresses 100.10.5.2, 100.10.5.5, and 100.10.5.6 respectively. The subnet mask is set to 255.255.255.252 for all the three machines. Which one of the following is true?

Try it: multiple choice: exactly one correct option

Select one option
Wrong answer costs 2/3 mark in GATE.
Show answer and explanation

Answer: C (official GATE 2019 final answer key)

Concept used: Two hosts are in the same subnet exactly when the bitwise AND of each address with the subnet mask gives the same network address.

Concept notes

Loading notes…

First step: The mask 255.255.255.252 leaves 2 host bits, so each subnet is a block of 4 addresses; AND the last octet of each address (2, 5, 6) with 252 and compare.

Full step-by-step solution

Loading…

Answer from the official final answer key. Found a mistake? Use Report issue and we will fix it.

More questions on IPv4: fragmentation, CIDR notation and network address translation (NAT)

Every PYQ on this topic →

Share this question

WhatsAppDownload image

Source: official GATE 2019 CS question paper and final answer key, organised by IIT Madras. Question paper · Answer key