Subnetting questions become manageable when every answer comes from the same few decisions: how many bits are fixed, how large each block is, which block contains the address, and whether the available host count fits the requirement.

Suppose a host is configured as 192.168.40.77/26. The first three octets look familiar, but they do not settle the subnet. A /26 splits the fourth octet into blocks of 64. Address 77 belongs to the 64-127 block, so the network is 192.168.40.64 and the broadcast address is 192.168.40.127.

That process works for unfamiliar addresses because it does not depend on recognizing a memorized example. Use the tables as accelerators, not substitutes for the method.

Check your work: The IPv4 Subnet Calculator shows the network, broadcast, usable range, host counts, mask, wildcard mask, address status, binary octets, and the steps behind the result.

The 32-bit subnetting model

An IPv4 address contains 32 bits arranged as four 8-bit octets. CIDR notation places a slash and prefix length after the address. The prefix length tells you how many leading bits identify the network.

For 192.168.40.77/26:

  • 26 bits identify the network.
  • 6 bits remain for addresses inside the subnet.
  • The mask contains 26 ones followed by 6 zeros.
  • The total address count is 2^6, which equals 64.
  • Traditional usable host count is 64 minus the network and broadcast addresses, which equals 62.

A dependable calculation follows this order:

  1. Identify the prefix and subnet mask.
  2. Find the changing octet.
  3. Calculate the block size.
  4. Locate the boundary below the entered address.
  5. Find the next boundary, then subtract one for the broadcast address.
  6. Move one address inward from each boundary for the traditional usable range.
  7. Confirm that the host count satisfies the requirement.

This order prevents a common mistake: finding the right host count but attaching it to the wrong network boundary.

Common IPv4 CIDR blocks

The table combines masks, address counts, and familiar uses. Large blocks are included because route tables and private ranges often use them. Treat the usable-host column as subnet math, not a recommendation to place millions of devices in one broadcast domain.

Prefix Subnet mask Total addresses Traditional usable Useful clue
/00.0.0.04,294,967,2964,294,967,294IPv4 default route, matches every destination
/8255.0.0.016,777,21616,777,214Historical Class A size; 10.0.0.0/8 is private
/12255.240.0.01,048,5761,048,574172.16.0.0/12 private range
/16255.255.0.065,53665,534Historical Class B size; two octets fixed
/20255.255.240.04,0964,094Third-octet block size 16
/21255.255.248.02,0482,046Third-octet block size 8
/22255.255.252.01,0241,022Third-octet block size 4
/23255.255.254.0512510Spans two /24-sized ranges
/24255.255.255.0256254Fourth-octet block size 256
/25255.255.255.128128126Fourth-octet boundaries 0 and 128
/26255.255.255.1926462Boundaries 0, 64, 128, 192
/27255.255.255.2243230Fourth-octet block size 32
/28255.255.255.2401614Fourth-octet block size 16
/29255.255.255.24886Fourth-octet block size 8
/30255.255.255.25242Traditional small point-to-point subnet
/31255.255.255.25422 on supported point-to-point linksRFC 3021 endpoint pair, no directed broadcast
/32255.255.255.25511One host address or host route

For prefixes between rows, keep halving or doubling. Moving from /24 to /25 adds one network bit and halves the block from 256 to 128 addresses. Moving back from /25 to /24 removes one network bit and doubles the block.

Powers of two and host requirements

Host counts come from the number of host bits:

Total addresses = 2^(32 - prefix)

For ordinary subnets through /30:

Traditional usable hosts = total addresses - 2

The subtraction accounts for the network and broadcast addresses. /31 and /32 follow the special behavior covered later.

Memorize the small powers of two because they appear in both host calculations and block sizes:

Host bits Power Total addresses Traditional usable
12Special `/31` case
242
386
42⁴1614
52⁵3230
62⁶6462
72⁷128126
82⁸256254
92⁹512510
102¹⁰1,0241,022
112¹¹2,0482,046
122¹²4,0964,094

When a question asks for the smallest subnet supporting 50 hosts, find the first usable count that reaches 50. A /27 provides 30, which fails. A /26 provides 62, which fits. A /25 also fits, but it consumes twice the address space.

Watch the wording. “50 devices” may not be the same as “50 endpoint addresses” when the subnet also needs router interfaces, appliances, printers, access points, growth, or reserved addresses. Use the requirement the scenario actually gives.

Borrowed subnet bits

Borrowed bits describe how a parent block is divided. The parent prefix must be stated or implied before the phrase has useful meaning.

Suppose an organization owns 192.168.50.0/24 and divides it into /27 subnets:

  • Parent prefix: /24
  • New prefix: /27
  • Borrowed bits: 27 - 24 = 3
  • Number of equal subnets: 2^3 = 8
  • Host bits per new subnet: 32 - 27 = 5
  • Addresses per new subnet: 2^5 = 32
  • Traditional usable hosts per subnet: 30

The eight boundaries are 0, 32, 64, 96, 128, 160, 192, and 224 in the fourth octet.

Important qualifier: An address does not carry its parent allocation with it. You cannot say how many bits were borrowed from `/27` alone. You need the original prefix, such as `/24`, for that comparison.

The block-size shortcut

Find the first mask octet that is not 255. That is the changing octet. Subtract its value from 256:

Block size = 256 - changing mask octet

For /26, the mask is 255.255.255.192:

256 - 192 = 64

Fourth-octet boundaries therefore occur every 64 values: 0, 64, 128, and 192.

For /20, the mask is 255.255.240.0. The third octet changes:

256 - 240 = 16

Third-octet boundaries occur at 0, 16, 32, 48, and so on through 240. Every block includes all 256 values of the fourth octet.

Use this sequence when locating an address:

  1. Write the mask.
  2. Identify the changing octet.
  3. Calculate the block size.
  4. Count boundaries until one is less than or equal to the entered octet.
  5. The next boundary minus one is the final value in that block.

For 172.20.77.9/20, the third octet is 77 and the block size is 16. Boundaries around 77 are 64 and 80. The network begins at 172.20.64.0, and the broadcast address is one before the next boundary: 172.20.79.255.

Private and special-use IPv4 ranges

Subnet math still works inside special ranges, but the address category changes how the result should be interpreted.

Range Category Operational clue
10.0.0.0/8PrivateRFC 1918 private-use space
172.16.0.0/12PrivatePrivate range ends at 172.31.255.255
192.168.0.0/16PrivateCommon home and small-office private space
100.64.0.0/10Shared address spaceCommonly associated with carrier-grade NAT, not RFC 1918
127.0.0.0/8LoopbackTraffic remains on the local host
169.254.0.0/16IPv4 link-localOften called APIPA in Windows; DHCP failure is a common clue
192.0.2.0/24DocumentationTEST-NET-1 for examples
198.51.100.0/24DocumentationTEST-NET-2 for examples
203.0.113.0/24DocumentationTEST-NET-3 for examples
198.18.0.0/15BenchmarkingReserved for network-device benchmarking tests
224.0.0.0/4MulticastGroup delivery, not ordinary unicast host assignment
240.0.0.0/4ReservedSpecial-use rules take precedence over ordinary public addressing
255.255.255.255/32Limited broadcastLocal-link broadcast destination, not normally routed

A private address does not automatically provide security. Firewall policy, segmentation, authentication, exposed services, and routing determine risk. A public address is not automatically reachable either. It must be allocated, configured, routed, and allowed by policy.

Legacy class labels may still appear in exam questions. Class A historically used a /8 default, Class B a /16, and Class C a /24. Modern subnetting and routing use the stated CIDR prefix. An address such as 192.168.10.10 is not automatically /24 just because it falls in the old Class C first-octet range.

How /31 and /32 behave

/31 point-to-point links

A /31 contains two addresses. Traditional subtraction would leave zero usable hosts, but RFC 3021 defines a different model for supported point-to-point links. Both addresses can act as endpoints, and the link does not use a directed broadcast address.

For 203.0.113.10/31:

  • Lower endpoint: 203.0.113.10
  • Upper endpoint: 203.0.113.11
  • Total endpoint addresses: 2
  • Directed broadcast: none for the RFC 3021 point-to-point design

Use /31 only when the scenario and devices support point-to-point behavior. A normal Ethernet LAN with several hosts still needs an appropriate multi-access subnet.

/32 host routes

A /32 fixes all 32 address bits. The block contains exactly one address. Route tables use /32 to identify one IPv4 destination, and loopback interfaces often receive /32 addresses because the route should represent one stable endpoint rather than a connected multi-host subnet.

For 192.0.2.44/32, the network and only address are both 192.0.2.44. There is no separate broadcast address.

Worked subnetting examples

Example 1: Find the boundaries of a /26

Address: 192.168.40.77/26

  1. /26 mask: 255.255.255.192
  2. Changing octet: fourth
  3. Block size: 256 - 192 = 64
  4. Boundaries: 0, 64, 128, 192
  5. Address 77 falls between 64 and 127
  6. Network: 192.168.40.64
  7. Broadcast: 192.168.40.127
  8. Usable range: 192.168.40.65 through 192.168.40.126
  9. Usable hosts: 62

Example 2: Work in the third octet

Address: 10.50.38.200/21

  1. /21 mask: 255.255.248.0
  2. Changing octet: third
  3. Block size: 256 - 248 = 8
  4. Boundaries around 38: 32 and 40
  5. Network: 10.50.32.0
  6. Broadcast: 10.50.39.255
  7. Usable range: 10.50.32.1 through 10.50.39.254
  8. Total addresses: 2,048
  9. Traditional usable hosts: 2,046

The fourth octet spans 0 through 255 because the changing boundary occurs in the third octet.

Example 3: Decide whether two hosts are local

Hosts:

  • 10.20.30.62/27
  • 10.20.30.65/27

A /27 uses blocks of 32. Address 62 falls in the 32-63 block. Address 65 falls in the 64-95 block. The addresses differ by only 3, yet they belong to separate subnets and require routing between them.

Example 4: Choose the smallest subnet

A segment requires 120 usable addresses.

  • /26 provides 62, too small.
  • /25 provides 126, fits.
  • /24 provides 254, fits but wastes more space.

The smallest suitable answer is /25, assuming the stated 120 includes every address the design needs.

VLSM allocation example

Variable-length subnet masking lets one parent block use several prefix sizes. Allocate the largest requirement first so small early choices do not fragment the remaining space.

Suppose 192.168.60.0/24 must support:

  • User LAN: 100 hosts
  • Voice LAN: 50 hosts
  • Server LAN: 20 hosts
  • Router point-to-point link: 2 endpoints with /31 support

A clean allocation is:

Need Assigned block Usable range or endpoints Reason
User LAN192.168.60.0/25192.168.60.1-192.168.60.126126 traditional usable addresses
Voice LAN192.168.60.128/26192.168.60.129-192.168.60.19062 traditional usable addresses
Server LAN192.168.60.192/27192.168.60.193-192.168.60.22230 traditional usable addresses
Point-to-point192.168.60.224/31192.168.60.224 and 192.168.60.225Two RFC 3021 endpoints

The remaining addresses begin at 192.168.60.226. Future allocations must still begin on a valid boundary for their chosen prefix. For example, another /29 needs a multiple-of-8 boundary, so 192.168.60.232/29 is aligned while 192.168.60.226/29 is not.

Common subnetting mistakes

Assuming the first three octets define the subnet

That shortcut works only for a /24. A /23 crosses two third-octet values, while /25 through /30 divide the fourth octet into smaller blocks.

Using the old address class instead of the stated prefix

172.20.10.5/24 uses /24, even though 172 historically fell in the Class B range. CIDR controls the modern network boundary.

Subtracting two before finding total addresses

The exponent gives total addresses. Calculate 2^(host bits) first, then subtract two for traditional subnets. Subtracting from the exponent produces the wrong scale.

Forgetting the network and broadcast addresses

A /27 has 32 total addresses and 30 traditional usable hosts. The first and last addresses are boundaries, not ordinary endpoint choices.

Treating every /31 as unusable

RFC 3021 allows two endpoints on supported point-to-point links. Context determines whether that special design applies.

Calling every 172 address private

Only 172.16.0.0/12 is RFC 1918 private space. The range ends at 172.31.255.255.

Calling APIPA a private DHCP lease

169.254.0.0/16 is IPv4 link-local space. In a Windows troubleshooting scenario, it often indicates that normal DHCP configuration was not obtained.

Allocating small VLSM blocks first

A handful of small subnets can leave gaps that no longer fit the largest requirement. Sort needs from largest to smallest before assigning boundaries.

Rounding a boundary to a convenient-looking number

Valid boundaries follow the block size. A /27 begins on multiples of 32. 192.168.1.96/27 is aligned; 192.168.1.100/27 is an address inside that block, not its network address.

A subnetting practice routine

Use short repetitions rather than one long memorization session:

  1. Write the powers of two from 2 through 256.
  2. Rebuild the /24 through /30 mask and host table from those values.
  3. Solve five fourth-octet examples using block size.
  4. Solve two third-octet examples such as /20 or /21.
  5. Choose the smallest prefix for three host requirements.
  6. Decide whether several address pairs share a subnet.
  7. Check the answers with the IPv4 Subnet Calculator.
  8. Explain one error in words before moving on.

A calculation error usually belongs to one of four categories: wrong mask, wrong block size, wrong boundary, or wrong host formula. Naming the category makes the next practice set more useful.

Official references

Network+ Acronyms and Terms Look up full expansions, practical meanings, related terms, and the domains where each abbreviation appears. IPv4 Subnet Calculator Check network and broadcast boundaries, usable ranges, masks, wildcard masks, address status, and binary work. Domain 1: Networking Concepts Place subnetting inside the larger traffic-flow model for IPv4, devices, protocols, cloud networks, and troubleshooting. Domain 2: Network Implementation Apply prefixes to route selection, VLAN gateways, subinterfaces, NAT, and implementation scenarios. Network+ N10-009 Study Guide Return to the roadmap for all five N10-009 domains. Network+ N10-009 Practice Test Apply subnetting and other networking concepts in randomized questions with detailed explanations.