IP address 172.16.123.213 is found to be residing on a sub-network with the…
2024
IP address 172.16.123.213 is found to be residing on a sub-network with the following subnet mask: 255.255.255.240. What is the network address of this subnet?
Answer: D. 172.16.123.208 — ConceptThe address of a subnet is obtained by a bitwise AND of a host IP address with its subnet mask. Wherever the mask holds a 1 the bit is a network bit…
- A.
172.16.123.213
- B.
172.16.123.240
- C.
172.16.123.245
- D.
172.16.123.208
- E.
Question not attempted
Attempted by 207 students.
Show answer & explanation
Correct answer: D
Concept
The address of a subnet is obtained by a bitwise AND of a host IP address with its subnet mask. Wherever the mask holds a 1 the bit is a network bit and passes through unchanged; wherever the mask holds a 0 the bit is a host bit and is forced to 0. So the mask splits every address into a fixed network prefix and a host field, and zeroing that host field names the subnet itself rather than any machine on it.
Applying it here
Write the mask in binary: 255.255.255.240 = 11111111.11111111.11111111.11110000. That is 24 + 4 = 28 network bits, so the prefix length is /28.
The first three mask octets are all 1s, so the first three octets of the address survive the AND untouched: 172.16.123.
Only the final octet is split. In binary 213 = 110101012 and 240 = 111100002.
AND them bit by bit. The leading four bits 1101 sit under mask bits of 1, so they are preserved. The trailing four bits 0101 sit under mask bits of 0, so they become 0000. Result: 110100002.
Convert back to decimal: 128 + 64 + 16 = 208.
Network address = 172.16.123.208.
Cross-check with the block-size method
Four host bits give a block size of 24 = 16 addresses per subnet, which is also the familiar shortcut 256 - 240 = 16.
So every /28 boundary in the final octet is a multiple of 16: 0, 16, 32, ... 192, 208, 224, 240.
213 falls between the boundary 208 (= 13 x 16) and the next boundary 224 (= 14 x 16), so its subnet runs 208-223 and starts at 208 - the same value the AND produced.
Note that "network address" means the base of that range. The first usable host would be 209 and the broadcast address would be 223; neither is what the question asks for.
Comparing the offered values
Final octet | Low four bits | Role under /28 |
|---|---|---|
213 | 0101 | A host inside its block, not a boundary |
240 | 0000 | A /28 boundary (15 x 16), base of 240-255 |
245 | 0101 | A host inside the block 240-255 |
208 | 0000 | A /28 boundary (13 x 16), base of 208-223 |
The value 240 is a genuine /28 boundary, but it is the base of the block 240-255, which does not contain 213; 213 and 245 both carry a non-zero host field, so neither can name a subnet.