Soru

Zorluk: OrtaIPv4 Addressing and Subnetting

A network administrator is configuring a subnet dedicated to security IP cameras in a warehouse facility. The subnet must support at least 5858 host devices, with each camera assigned a static IPv4 address. To minimize wasted IP address space, what is the minimum CIDR prefix length (represented as an integer NN for /N/N) that should be assigned to this subnet?

Cevap: 26

Cevap

The minimum CIDR prefix length required to support at least 58 usable host addresses is 26.
To support 58 static host devices, the subnet must contain at least 58 usable host IP addresses. The formula for usable host addresses is 2h22^h - 2, where hh is the number of host bits. Setting h=5h = 5 gives 252=302^5 - 2 = 30 usable addresses (insufficient). Setting h=6h = 6 gives 262=622^6 - 2 = 62 usable addresses (sufficient). Subtracting 6 host bits from the 32 total bits in an IPv4 address yields 326=2632 - 6 = 26. Thus, the minimum CIDR prefix length is 26.

Adım Adım Çözüm

1
Determine the minimum host bits required
6 host bits (h=6h = 6)
Using 5 host bits yields 252=302^5 - 2 = 30 usable IP addresses, which cannot accommodate 58 devices. Using 6 host bits yields 262=622^6 - 2 = 62 usable addresses, which satisfies the requirement.
2
Calculate the CIDR prefix length
Prefix length of 26 (326=2632 - 6 = 26)
IPv4 addresses consist of 32 total bits. Subtracting the 6 host bits leaves 26 bits dedicated to the network prefix.

Anahtar Kavram

Calculating minimum CIDR prefix length from host capacity requirements
Bu soruyu puanla