ITPEC FE Morning October 2022 Question 32

Topic: Networks

Which of the following is the subnet mask corresponding to an IP address in slash notation, 192.168.22.31/27?

Explanation

255.255.255.224 — the prefix /27 means the first 27 bits of the mask are 1 and the remaining 5 are 0.

  • •27 = 24 + 3: the first three octets are all ones, 255.255.255
  • •The fourth octet has 3 one-bits: 11100000 = 128 + 64 + 32 = 224
  • •The 5 host bits give 25 = 32 addresses per subnet

Answer (b)

Why not others:

  • •(a) 255.255.255.192 — 11000000 has only 2 one-bits in the last octet, so it is /26
  • •(c) 255.255.255.248 — 11111000 has 5 one-bits, so it is /29
  • •(d) 255.255.255.252 — 11111100 has 6 one-bits, so it is /30

Key rule: A last octet with n one-bits equals 256 − 28 − n: 128, 192, 224, 240, 248, 252, 254, 255 for n = 1 to 8.

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.