ITPEC FE Morning April 2018 Question 33

Topic: Networks

Which of the following is a pair of IP addresses belonging to the same subnet, when the subnet mask is 255.255.255.240?

Explanation

192.168.1.17 and 192.168.1.29 — both fall in the block 16 to 31 that the mask defines.

The mask 255.255.255.240 ends in 11110000, so the last 4 bits are the host part and each subnet is a block of 24 = 16 addresses: 0–15, 16–31, 32–47, 48–63, and so on. Two addresses share a subnet when their last octets lie in the same block, that is, when the last octet AND 240 gives the same value.

  • •17 is 00010001 and 29 is 00011101; both AND 240 give 16

Answer (b)

Why not others:

  • •(a) — 14 is in 0–15 and 17 in 16–31; they are only three apart but on either side of the boundary at 16
  • •(c) — 29 is in 16–31 and 33 in 32–47, split by the boundary at 32
  • •(d) — 33 is in 32–47 and 49 in 48–63; they are exactly 16 apart, one whole block

Key rule: Block size is 256 minus the last non-255 mask octet; addresses share a subnet only if they sit in the same block, however close their numbers are.

Networks · AI-written, may contain errors

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.