thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Networking Fundamentals · Foundational

Usable Hosts Formula

The calculation 2^h - 2, where h is the number of host bits, giving the assignable IPv4 addresses in a subnet.

Definition

Two addresses are subtracted for the network and broadcast addresses. For example, /24 gives 254, /25 gives 126, /26 gives 62, /27 gives 30, /28 gives 14, /29 gives 6 and /30 gives 2. The exception is /31 point-to-point links (RFC 3021), which use both addresses, and /32, which identifies a single host.

Example

A subnet needing 50 hosts requires 6 host bits (62 usable), so use a /26.

Exam tip

When asked for the smallest subnet that fits N hosts, find the smallest h where 2^h - 2 is at least N.

Related terms