In a class A subnet, we know the IP address of one host and the mask as given…

2015

In a class A subnet, we know the IP address of one host and the mask as given below:

IP address: 125.134.112.66
Mask: 255.255.224.0

What is the first address (network address)?

Answer: A. 125.134.96.0The network address of a subnetted IP is found by applying (bitwise ANDing) the subnet mask to the address, octet by octet. Wherever a mask octet is neither…

  1. A.

    125.134.96.0

  2. B.

    125.134.112.0

  3. C.

    125.134.112.66

  4. D.

    125.134.0.0

Attempted by 438 students.

Show answer & explanation

Correct answer: A

The network address of a subnetted IP is found by applying (bitwise ANDing) the subnet mask to the address, octet by octet. Wherever a mask octet is neither 255 nor 0, the corresponding address octet must be rounded down to the nearest multiple of that octet's block size, where block size = 256 minus the mask value in that octet.

  1. The mask's first two octets are 255 and 255, so the network address keeps the host's first two octets unchanged: 125 and 134.

  2. The mask's third octet is 224, giving a block size of 256 − 224 = 32 for that position.

  3. The host's third octet is 112. Dividing 112 by 32 gives a quotient of 3 with a remainder of 16, so the octet is rounded down to the block boundary 3 × 32 = 96.

  4. The mask's fourth octet is 0, so the network address's fourth octet is always 0, regardless of the host's value of 66.

  5. Combining the four octets gives the network address 125.134.96.0.

This can be cross-checked with a direct bitwise AND: 112 in binary is 01110000 and 224 is 11100000; ANDing these bit by bit gives 01100000, which is 96 in decimal — the same result obtained from the block-size calculation.

So the first (network) address of this subnet is 125.134.96.0.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…