Soru

Zorluk: OrtaIPv4 Addressing and Subnetting

A network engineer is provisioning a high-availability database cluster across a single network segment. The segment is assigned the IPv4 address block 10.250.32.0/2010.250.32.0/20. How many total usable host IPv4 addresses are available for assignable endpoints in this subnet?

Cevap: 4094 addresses

Cevap

4094 usable host IPv4 addresses
For a /20 prefix length, there are 12 host bits available (32 - 20 = 12). The total number of IP addresses is 2^12 = 4096. Subtracting 2 for the reserved network ID and broadcast address gives 4094 usable host IP addresses.

Adım Adım Çözüm

1
Calculate the number of host bits in the CIDR prefix /20
12 host bits (32 - 20 = 12)
An IPv4 address consists of 32 total bits; subtracting the prefix length yields the bits allocated for host addressing.
2
Calculate the total size of the address block
4096 total addresses (2^12 = 4096)
The number of total addresses in a subnet is calculated using 2 raised to the power of the host bits.
3
Subtract the non-assignable network and broadcast addresses
4094 usable host addresses (4096 - 2 = 4094)
The first address (network ID) and the last address (directed broadcast) are reserved and cannot be assigned to host interfaces.

Anahtar Kavram

Calculating usable IPv4 host addresses from a CIDR prefix length
Bu soruyu puanla