Core Networking · Study deck

Subnetting and CIDR for IoT Networks

Picture a school adding thirty air sensors beside cameras, printers, and staff laptops.

Packet Pete is your guide for this deck.

addrsubnetting
Packet Pete, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Explain: A /24 suits a floor LAN, a /26 a camera group, a /28 a small cluster, and a /30 exists for a router-to-router link where only two addresses are ever needed.
  • Explain: The next row shows the cut, and the pieces are deliberately unequal: the two largest device groups take a quarter of the block each, while the smallest take a sixteenth.
  • Explain: The installer must know which devices should speak directly, which must cross a checked boundary, and how many spare places the next term will need.
  • Size CIDR prefixes from counted address demand
Variable-length subnet masking lets large and small device groups share a parent block without forcing one size everywhere.
Variable-length subnet masking lets large and small device groups share a parent block without forcing one size everywhere.
iotclass.org

Major section

Start With the Boundary Line

Giving every device an address is not enough.

  • The installer must know which devices should speak directly, which must cross a checked boundary, and how many spare places the next term will need.
  • A subnet is a group of addresses treated as one local area.
  • This example does not replace address arithmetic or policy design.

Key terms

Subnetting
Subnetting is the moment an address becomes a design decision.

Why it matters

The arithmetic matters because the deployment will inherit every boundary the design creates.

iotclass.org

Major section

Start With the Boundary Line (continued)

The arithmetic matters because the deployment will inherit every boundary the design creates.

  • A gateway is the device that carries traffic from that area toward another one.
  • The deeper sections show how prefixes, host counts, route summaries, address assignment, and security rules make the boundary reviewable.
  • Subnetting is the moment an address becomes a design decision.
iotclass.org

Major section

Overview: A Subnet Is an Address Boundary

Addresses with the same reviewed prefix are treated as local; other destinations use the configured gateway.

  • That relationship connects the arithmetic to broadcast scope, routing policy, DHCP capacity, and the failure clues a deployment will expose.
IPv4 address divided into network and host portions by a subnet prefix
IPv4 address divided into network and host portions by a subnet prefix
iotclass.org

Major section

Practitioner: Build the Subnet Plan From Inventory

Four device families run across the table.

  • Cameras and HVAC take a /26 each, while access and environmental take a /27, which is half the size.
  • The bottom row shows why this holds up in operations.

Why it matters

The reason for splitting them is on the second row, and it is different every time: cameras for bandwidth, HVAC for control safety, access control for security, and environmental sensors because they are low-rate.

Device families can need different subnet sizes because cameras, sensors, lighting, access control, and infrastructure grow differently.
Device families can need different subnet sizes because cameras, sensors, lighting, access control, and infrastructure grow differently.
iotclass.org

Major section

Under the Hood: Prefix Bits Define the Address Budget

The prefixes run from /24 to /30 across the table.

  • Under each one is the usable host count, and it halves at every step: 254, then 126, 62, 30, 14, and finally 2.
  • The bottom row gives each size a job.
  • Everything below is spent from that one total.

Key terms

Prefix length
Prefix length is chosen from the device count, not from a habit of splitting evenly.

Why it matters

The two slices at the end deserve a look, because one is held for growth and one is held back entirely.

Shorter prefixes leave more host bits; longer prefixes create smaller subnets.
Shorter prefixes leave more host bits; longer prefixes create smaller subnets.
iotclass.org

Major section

Under the Hood: Prefix Bits Define the Address Budget (continued)

A /24 suits a floor LAN, a /26 a camera group, a /28 a small cluster, and a /30 exists for a router-to-router link where only two addresses are ever needed.

  • The next row shows the cut, and the pieces are deliberately unequal: the two largest device groups take a quarter of the block each, while the smallest take a sixteenth.
  • Prefix length is chosen from the device count, not from a habit of splitting evenly.
  • A block allocated with no spare is a block that will be renumbered later.
iotclass.org

Major section

Divide a Building by Device Population

A school has 50 cameras, 20 room sensors, and 10 door controllers.

  • A /26 leaves 6 host bits, so it contains 26=642^6=6426=64 addresses and normally 62 usable IPv4 host addresses.
  • The 20 room sensors need a /27: 25=322^5=3225=32 total and 30 usable.
  • The valid network start covering 80 is 64.
IPv4 address divided into network and host portions by a subnet prefix
IPv4 address divided into network and host portions by a subnet prefix
iotclass.org

Major section

Divide a Building by Device Population (continued)

The 10 controllers fit a /28: 24=162^4=1624=16 total and 14 usable.

  • Those three allocations consume 112 address slots while preserving a clear subnet boundary for each device family.
  • A camera should not receive the broadcast address, and a controller should not collide with the router.
  • Its addresses run from 10.20.0.0 through 10.20.0.63.
  • Routing and firewall policy still decide which device families may exchange unicast traffic.
iotclass.org

Major section

Summary

CIDR prefix length determines how many host bits remain and therefore how many addresses are available.

  • A subnet plan should count endpoints, gateways, infrastructure, DHCP reservations, static addresses, and spare capacity.
  • VLSM lets different IoT zones use different subnet sizes when device counts and growth records differ.
  • A defensible subnet design includes route summaries, gateway placement, security policy, monitoring scope, and recheck triggers.
iotclass.org

Deck summary

Key takeaways

Giving every device an address is not enough.

  • The arithmetic matters because the deployment will inherit every boundary the design creates.
  • Addresses with the same reviewed prefix are treated as local; other destinations use the configured gateway.
  • Four device families run across the table.
  • The prefixes run from /24 to /30 across the table.
iotclass.org

Retrieval practice

Recall check 1 of 3

Packet Pete says: answer from memory, then check your reasoning.

Q1Why is subnetting useful in an IoT deployment beyond simply creating more address ranges?

AIt lets all devices communicate directly without any route checks.
BIt removes the need to budget gateways, leases, and spare addresses.
CIt matters only on public networks, not private IoT segments.
DIt creates operational boundaries for segments and policies.
Show answer

Answer: D Subnetting connects address math to operational boundaries: security zones, broadcast domains, routing, ownership, and troubleshooting.

iotclass.org

Retrieval practice

Recall check 2 of 3

Packet Pete says: answer from memory, then check your reasoning.

Q2A site has 180 sensors, 12 infrastructure addresses, 8 reserved maintenance addresses, and a documented need for 40 spare addresses. Which review step matters before choosing a prefix?

ACount all 240 required addresses, then choose sufficient usable subnet capacity.
BCount only 180 sensors, omitting infrastructure, maintenance and spare capacity.
CPick the smallest diagram prefix and plan to renumber after deployment.
DUse any prefix as if CIDR length did not determine usable host capacity.
Show answer

Answer: A Subnet sizing should include every address consumer and the documented spare capacity, not just the endpoint device count.

iotclass.org

Retrieval practice

Recall check 3 of 3

Packet Pete says: answer from memory, then check your reasoning.

Q3For an ordinary IPv4 host subnet using /26, why are there 62 usable host addresses?

AA /26 has 6 host bits: 64 total addresses, minus network and broadcast.
BA /26 leaves 26 host bits, but most addresses are reserved for routing protocols.
CA /26 always supports 254 hosts because it is smaller than a /24.
DThe usable count is unrelated to the prefix length and depends only on DHCP configuration.
Show answer

Answer: A CIDR host capacity comes from the number of host bits left by the prefix, with ordinary IPv4 host subnets reserving network and broadcast addresses.

iotclass.org

Print reference

Answers

Answer key.

  1. D · Subnetting connects address math to operational boundaries: security zones, broadcast domains, routing, ownership, and troubleshooting.
  2. A · Subnet sizing should include every address consumer and the documented spare capacity, not just the endpoint device count.
  3. A · CIDR host capacity comes from the number of host bits left by the prefix, with ordinary IPv4 host subnets reserving network and broadcast addresses.
iotclass.org