Question

Difficulty: MediumIPv4 Addressing and Subnetting

A cloud network engineer is provisioning a subnetwork for a microservices cluster within a virtual private cloud (VPC). The subnetwork is assigned the IPv4 block 10.240.12.128/2510.240.12.128/25. Which of the following IPv4 addresses represents the last usable host IP address that can be assigned to a container instance in this subnet?

  1. 10.240.12.254Answer
  2. B
    10.240.12.255
  3. C
    10.240.12.128
  4. D
    10.240.12.253

Answer

10.240.12.254 is the last usable host IPv4 address in the 10.240.12.128/25 subnet.
With a /25 network mask, 7 host bits are available, creating a subnet size of 128 total IP addresses (27=1282^7 = 128). The subnet range spans from 10.240.12.128 to 10.240.12.255. The network address is 10.240.12.128 and the broadcast address is 10.240.12.255. The usable host IP range is 10.240.12.129 through 10.240.12.254, making 10.240.12.254 the last usable host address.

Step-by-Step Solution

1
Determine the host bits and total addresses in the subnet
The prefix /25/25 leaves 3225=732 - 25 = 7 host bits. The total address block size is 27=1282^7 = 128 addresses.
Calculating the block size identifies the IP boundary range.
2
Identify the network boundary range
Starting at 10.240.12.12810.240.12.128, adding 128128 addresses yields the range 10.240.12.12810.240.12.128 through 10.240.12.25510.240.12.255.
The network address is the first address (10.240.12.12810.240.12.128) and the broadcast address is the last address (10.240.12.25510.240.12.255).
3
Calculate the last usable host IP address
Subtract 11 from the broadcast address: 10.240.12.2551=10.240.12.25410.240.12.255 - 1 = 10.240.12.254.
Usable host addresses reside between the network address and broadcast address.

Key Concept

IPv4 Subnet Boundaries and Usable Host Range Calculation
Estimated Time:1m 30s
Rate this question