Soru

Zorluk: KolayIPv4 Addressing and Subnetting

A network administrator is assigning subnets for small remote branch offices. Each office requires an IPv4 subnet that can support at least 3030 usable host IP addresses. What is the minimum CIDR prefix length (enter the integer prefix number, such as 24 for a /24/24 subnet) that satisfies this requirement?

Cevap: 27

Cevap

The minimum CIDR prefix length required to support 30 usable hosts is 27.
To host 30 usable devices, a subnet must provide at least 32 total IP addresses (3030 usable +2+ 2 reserved for network and broadcast). Using the formula 2h322^h \ge 32, we find h=5h = 5 host bits are needed. Subtracting 55 host bits from the total 3232 bits in an IPv4 address yields a prefix length of 2727 (a /27/27 subnet).

Adım Adım Çözüm

1
Calculate the total number of IP addresses required per subnet including overhead.
30 usable hosts+1 network ID+1 broadcast ID=32 total IP addresses30\text{ usable hosts} + 1\text{ network ID} + 1\text{ broadcast ID} = 32\text{ total IP addresses}.
Every IPv4 subnet requires two reserved IP addresses: one for the network ID and one for the broadcast address.
2
Determine the required host bits (hh).
2h=32    h=52^h = 32 \implies h = 5 host bits.
Five host bits provide 25=322^5 = 32 total IP addresses.
3
Calculate the prefix length by subtracting host bits from the total bits in an IPv4 address.
325=2732 - 5 = 27.
The prefix length represents the network portion of the address, calculated as 32h32 - h.

Anahtar Kavram

Calculating CIDR Subnet Prefix Length for Host Requirements
Bu soruyu puanla