Skip to content
AdminKit

How do you use a subnet calculator to plan VLANs across a network?

AdminKit walks through using a subnet calculator to plan VLANs from one address block: decide the maximum hosts each VLAN needs, pick the smallest CIDR prefix that covers that count plus headroom, then carve each VLAN's range out of the parent block in sequence so none overlap — variable-length subnet masking, sizing each VLAN to what it needs.

By AdminKit team, Netbase JSC · Updated

Key takeaways

  • Planning VLANs is the single-subnet calculation repeated against one parent block, plus one extra rule: no two ranges may overlap.
  • Size each VLAN by its real host count plus growth, then pick the smallest prefix that fits (VLSM, from RFC 4632).
  • Allocate from the parent block largest-first and keep every range in one table, so there is always aligned room left for the next one.
  • Two CIDR blocks either nest or don’t touch at all, so an overlap check is a single “is this network address inside that block?” test.
  • IPv6 is simpler: one /64 per VLAN from a larger delegated prefix.

How is planning several subnets different from reading one?

AdminKit’s subnet and CIDR basics guide covers how to read a single subnet calculator result — network address, broadcast address, usable range, host count. Planning a network with several VLANs is the same calculation done repeatedly against one parent block, with one extra constraint that a single calculation doesn’t need to worry about: making sure none of the ranges you carve out overlap each other. This guide covers that repeated, comparative process, using AdminKit’s subnet calculator as the arithmetic engine for each individual VLAN.

Step 1: how many addresses does each VLAN really need?

Before touching a calculator, list every VLAN you’re planning — each one a separate Layer 2 broadcast domain IEEE 802.1Q creates by tagging Ethernet frames, distinct from the IP addressing this guide sizes on top of it — and a realistic maximum host count for each: the office data VLAN, a voice VLAN for desk phones, a guest Wi-Fi VLAN, an IoT or camera VLAN, a management VLAN for switches and access points. Resist the common habit of giving every VLAN an identical, generously oversized range (a /24 for everything, for instance) regardless of how many devices it will actually carry; RFC 4632 (also on the IETF Datatracker) defines classless addressing (CIDR), including variable-length subnet masking (VLSM), specifically so each subnet can be sized to what it needs rather than forced into a uniform block. A guest network with ten expected devices and a server VLAN with two hundred should not consume the same amount of address space just because it’s simpler to type.

Step 2: which prefix is the smallest one that fits?

Once you have a target host count per VLAN, pick the smallest standard IPv4 prefix whose usable range covers it with reasonable room for growth: a /28 gives 14 usable addresses, a /27 gives 30, a /26 gives 62, a /25 gives 126, and a /24 gives 254. A VLAN with 20 current devices and realistic growth to 40 fits comfortably in a /26 (62 usable addresses) without needing the much larger /24 some default configurations reach for automatically. Run each candidate prefix through AdminKit’s subnet calculator to see its exact network address, broadcast address, and usable range before committing to it.

PrefixTotal addressesUsable hosts (IPv4)Typical VLAN use
/24256254Large office data VLAN
/25128126Guest Wi-Fi for a busy site
/266462Voice phones, cameras or IoT
/273230Management for switches and access points
/281614Small server or printer segment
/2986A few appliances
/3042Router-to-router link
/3122Point-to-point link, per RFC 3021

Usable hosts are the total minus the network and broadcast addresses, except for a /31, where RFC 3021 lets both addresses be used on a point-to-point link. Remember the default gateway also takes one of the usable addresses. Microsoft’s TCP/IP addressing and subnetting guide works through the same arithmetic: a 255.255.255.192 (/26) mask splits a /24 into four networks of 62 hosts each, because the first and last address in any subnet can’t be assigned to an individual host.

Step 3: how do you carve ranges out of the parent block without overlapping?

With each VLAN’s required prefix size decided, allocate them in sequence from your parent block (for example, a 10.0.0.0/22 internal range), starting with the largest subnet first — this avoids the common mistake of carving a mid-sized range from the middle of the block and later discovering there’s no contiguous room left for an even larger one you still need to place. After calculating each VLAN’s range, write down its network address, prefix, and broadcast address in a simple table as you go, and check every new range against everything already listed before moving to the next VLAN. A subnet calculator computes one block’s arithmetic correctly every time; it has no memory of your other VLANs, so catching an overlap is a manual comparison step you do yourself, not something the tool does for you.

What does a finished VLAN plan look like?

Here is a worked example for a small office using 10.0.0.0/22 as the parent block. A /22 holds 1,024 addresses, from 10.0.0.0 to 10.0.3.255. Six VLANs are needed, and they are allocated largest-first:

VLANHosts (with growth)BlockUsable rangeBroadcast
10 Office data18010.0.0.0/2410.0.0.1–10.0.0.25410.0.0.255
20 Guest Wi-Fi10010.0.1.0/2510.0.1.1–10.0.1.12610.0.1.127
30 Voice5010.0.1.128/2610.0.1.129–10.0.1.19010.0.1.191
40 Cameras / IoT4010.0.1.192/2610.0.1.193–10.0.1.25410.0.1.255
50 Management2010.0.2.0/2710.0.2.1–10.0.2.3010.0.2.31
60 Firewall link210.0.2.32/3010.0.2.33–10.0.2.3410.0.2.35

Because each range starts where the previous one ended, and each starts on a boundary of its own size, nothing overlaps. The space left over is still usable in aligned pieces: 10.0.2.36/30, 10.0.2.40/29, 10.0.2.48/28, 10.0.2.64/26, 10.0.2.128/25 and the whole of 10.0.3.0/24. If the order were reversed and the /30 had been placed at 10.0.0.0, the /24 could no longer start at 10.0.0.0, and the plan would need more of the parent block.

There is a useful shortcut for checking overlaps. Two CIDR blocks can never partly overlap: either one sits entirely inside the other, or they don’t share any address. So the check is simply whether one block’s network address falls inside the other block. AdminKit’s IP in CIDR check answers exactly that question, and a few lines of Python using the standard library’s ipaddress module do the same for a whole table:

>>> import ipaddress
>>> guest = ipaddress.ip_network("10.0.1.0/25")
>>> typo  = ipaddress.ip_network("10.0.1.64/26")   # meant 10.0.1.128/26
>>> guest.overlaps(typo)
True

Why is an overlap a real fault, not just untidy planning?

Two VLANs whose calculated ranges overlap, even partially, create a genuine routing ambiguity: a router with interfaces on both can’t consistently determine which connected subnet should receive traffic addressed to a value both ranges claim. The failure this produces is often confusing precisely because it isn’t a clean, immediate error — it shows up as some addresses in the overlapping region working and others not, or as connectivity that depends on which device happens to answer first, which is exactly the kind of intermittent symptom that’s expensive to trace back to its root cause after a network is already in production. Checking for overlaps before deployment, while every range is still just a row in a planning table, is far cheaper than diagnosing one afterward.

How does IPv6 VLAN planning differ?

IPv6 VLAN planning swaps the sizing question for a different one. Rather than matching prefix size to host count, standard practice gives every subnet a full /64 regardless of how many devices actually use it, since Stateless Address Autoconfiguration (SLAAC) assumes a 64-bit host portion to generate each device’s own address — see IPv6 and home devices: why no NAT means a firewall for what that directly-routable address space means for securing each device individually. Instead of VLSM-style resizing, IPv6 VLAN planning is usually just carving consecutive /64s out of a larger block your ISP hands your router via IPv6 prefix delegation (commonly a /56 or /48), one /64 per VLAN — simpler arithmetic, but the same discipline of tracking which /64s are already assigned applies just as much as it does for IPv4’s variably sized ranges.

How do you name the hosts in a new range?

Once a VLAN’s range is finalized, giving its hosts actual DNS names is a separate step from the addressing math above — AdminKit’s DNS lookup tool confirms what a hostname you plan to assign currently resolves to (or doesn’t) before you publish an A/AAAA record pointing it into the new range, which avoids accidentally reusing a name that’s already live elsewhere. This guide is part of AdminKit’s DNS cluster of DNS and addressing guides and tools.

What should you check before deploying?

  1. List every VLAN and its realistic maximum host count, including reasonable growth — not a uniform guess applied to all of them.
  2. Pick the smallest prefix per VLAN that comfortably fits that count, using AdminKit’s subnet calculator to confirm the exact range for each candidate.
  3. Allocate ranges from the parent block largest-first, recording each VLAN’s network address and prefix in one table as you go.
  4. Check every new range against the table before finalizing it — the calculator verifies one block’s own arithmetic, not whether it collides with another VLAN already in your table.
  5. For IPv6, assign one /64 per VLAN from your larger allocated block rather than sizing by host count.

Segmenting a network into separate VLANs this way is also a security boundary, not just an addressing exercise — isolating guest or IoT traffic from internal systems limits what a compromise in one segment can reach, which is also why cutting down on unnecessary local-network broadcast traffic, as covered in mDNS, SSDP and UPnP: LAN discovery leaks, matters more once a network is actually split into multiple VLANs rather than one flat segment. See our network engineers and ISPs page for the wider set of AdminKit tools for planning and checking addresses.

This guide is general information, not a security audit of your specific network — see our disclaimer for what AdminKit's guidance does and does not commit to.

Frequently asked questions

Why not just split a network into equal-sized subnets for each VLAN?

Equal splitting wastes address space whenever VLANs have genuinely different sizes, which is the normal case — a guest Wi-Fi VLAN with a handful of devices doesn't need the same range as a main office VLAN with two hundred. Variable-length subnet masking (VLSM), defined as part of classless addressing in RFC 4632, lets each VLAN use the smallest prefix that fits its actual host count, leaving more of the parent block free for other VLANs or future growth instead of reserving an identically oversized range for every one of them.

How many addresses does a VLAN actually need, including growth?

Count the devices that will realistically need an address on that VLAN today, add a reasonable growth margin (commonly doubling the current count for anything expected to grow, less for something genuinely static like a point-to-point link), then pick the smallest standard prefix whose usable host count covers that total — a /26 gives 62 usable IPv4 addresses, a /25 gives 126, and so on. Oversizing every VLAN 'just in case' is the most common reason a /24 parent block runs out of room for its last subnet before you've even deployed everything.

Can I plan this with IPv6 the same way as IPv4?

Not quite the same way — IPv6 practice is to give every subnet a full /64 regardless of how many hosts it has, since that size is what Stateless Address Autoconfiguration (SLAAC) assumes to generate a device's own address. Rather than sizing each VLAN's IPv6 range by host count the way you would with IPv4, you instead typically carve consecutive /64s out of a larger allocated block (commonly a /56 or /48 from your ISP or RIR), one /64 per VLAN, with no VLSM-style resizing needed because address exhaustion within a /64 isn't a practical concern.

Do overlapping subnet ranges actually cause a real problem, or is it just untidy?

It's a real, often hard-to-diagnose problem, not just untidiness. Two VLANs with overlapping address ranges confuse routing: a router can't reliably determine which interface should receive traffic for an address that two different connected subnets both claim, which shows up as intermittent, address-dependent connectivity failures rather than a clean, immediate error — exactly the kind of fault that's expensive to track down after the fact and cheap to avoid by checking ranges against each other before deployment.

Does a subnet calculator check whether my VLAN ranges overlap?

No — AdminKit's subnet calculator computes the network address, broadcast address, usable range and host count for one CIDR block at a time, entirely as arithmetic; it has no memory of other ranges you've already calculated, so checking that a new VLAN's range doesn't overlap an existing one is a manual comparison you do yourself, typically by listing out each VLAN's calculated range in a simple table as you plan them one by one.

Want AdminKit to watch this for you?

Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.

Huy Nguyen (David), Founder and CEO of Netbase JSC

Talk to an expert

Huy Nguyen (David), Founder & CEO, Netbase JSC

Ask whether this fix applies to your setup, or get a second pair of eyes on your DNS and mail records.