A VLAN is a Layer 2 broadcast domain. An IP subnet is a Layer 3 address range. Network engineers often assign one IPv4 subnet to each user VLAN because it makes addressing, routing, DHCP and policy easier to operate, but the two concepts are not identical. A switch does not need to know a device’s IP subnet to forward an Ethernet frame within a VLAN; a router or Layer 3 switch decides when traffic must cross between IP networks.
A workable VLAN-subnet plan therefore starts with who must communicate, where the default gateway lives, and what controls apply between groups. Choosing /24 everywhere because it is familiar often wastes addresses and obscures the actual requirements. At the other extreme, shaving every subnet to the last available host makes growth and recovery painful.
Define the segmentation boundary before the mask
Imagine a small campus with finance workstations, a voice network, printers and infrastructure management. They may share physical switches, but they should not necessarily share a broadcast domain or unrestricted routing path. Finance users need access to accounting services, phones require access to call-control systems, and management interfaces should be reachable only from approved administration stations.
Before allocating addresses, document expected devices, peak growth, routing gateways, DHCP ownership, broadcast-sensitive applications and any isolation requirements. Some technologies—such as voice VLANs and wireless client segmentation—can change how devices attach to the chosen domain. A VLAN is not automatically a security boundary once a Layer 3 gateway routes between networks; apply appropriate ACL or firewall rules at the point where traffic crosses.
Build a small VLSM example that can actually be deployed
Suppose the site owns 10.40.10.0/24 for several small VLANs. Variable-length subnet masking (VLSM) allocates differently sized prefixes, provided they do not overlap. The following plan leaves unused room in the /24 for future networks.
| VLAN | Example purpose | Subnet | Usable host range | Gateway example |
|---|---|---|---|---|
| 110 | Finance endpoints | 10.40.10.0/26 |
.1–.62 |
10.40.10.1 |
| 120 | VoIP phones | 10.40.10.64/27 |
.65–.94 |
10.40.10.65 |
| 130 | Shared printers | 10.40.10.96/27 |
.97–.126 |
10.40.10.97 |
| 199 | Switch/AP management | 10.40.10.128/28 |
.129–.142 |
10.40.10.129 |
The first subnet has 64 IPv4 addresses, of which 62 are conventionally usable host addresses. A /27 provides 30 usable host addresses; a /28 provides 14. Network and broadcast addresses are not assignable to ordinary IPv4 hosts in these multi-access subnets. These are design examples, not a recommendation to use tiny management networks regardless of future needs.
The next available portion starts at 10.40.10.144, but it cannot arbitrarily host a /26 that begins there: a /26 boundary must start at a multiple of 64. This is one reason to reserve aligned blocks in advance. CIDR notation and prefix aggregation provide the network-boundary arithmetic needed to avoid guessing ranges from the final octet.
Put the default gateway where the policy is enforced
A Layer 3 switch commonly provides a switched virtual interface (SVI) for each VLAN. An SVI on VLAN 110 might use 10.40.10.1/26. Hosts in that VLAN send off-subnet packets to the gateway, which consults the routing table before forwarding them toward another VLAN or upstream firewall. An alternative is a routed interface or router-on-a-stick subinterface, depending on the design and platform.
Trunk links carry VLAN identification between supported switch/router interfaces; they do not assign IP subnets. An 802.1Q trunk can carry frames from multiple VLANs over the same cable, while endpoint access ports normally carry one untagged access VLAN. 802.1Q VLAN tagging and native VLANs explain why incorrect trunk membership or tagging can look like an IP failure.
Do not treat “VLAN 110” and 10.40.10.0/26 as interchangeable configuration values. The VLAN ID identifies a Layer 2 domain; the prefix is an addressing choice; and the gateway interface bridges their operating requirements. Two sites may reuse a VLAN number without using the same IP subnet. Conversely, putting the same overlapping subnet on unrelated routed interfaces can create reachability ambiguity unless the topology is intentionally engineered for it.
Plan DHCP, voice and wireless clients explicitly
For a client VLAN, define its DHCP scope, excluded addresses, default-router option, DNS servers and lease behavior. If the DHCP server sits in another subnet, the gateway often needs a DHCP relay/helper to forward client broadcasts. Check that DHCP snooping and security policy allow the authorized server path while blocking rogue offers; a valid subnet plan does not fix a blocked relay.
VoIP handsets may use a voice VLAN advertised by the access switch while a connected workstation remains on the data VLAN. Their signaling and media flows, quality-of-service settings and access controls differ. Wireless clients may enter different VLANs based on SSID, role or controller policy. Capacity estimates should count real simultaneous clients, not merely the number of ports or access points purchased.
Reserve static addresses for gateway interfaces, infrastructure services and devices whose operational model requires them. Document reservations to avoid DHCP conflicts. For client groups that move among sites, consider whether a consistent addressing model aids roaming, but don’t promise that every roaming event retains the same IP if the client crosses to another routed network.
Size for growth without making each VLAN enormous
A /24 gives 254 conventional usable IPv4 addresses, which can be wasteful for a small isolated printer group but too small for a dense wireless population. A /26 gives 62 and a /25 gives 126. Use the forecasted concurrent devices plus operational headroom—not the current exact headcount—to choose the prefix.
Broadcast and discovery traffic also matter. Very large Layer 2 domains may carry unnecessary broadcast traffic and create fault-containment problems; very many tiny VLANs can overwhelm management and policy complexity. Choose a size at which troubleshooting and lifecycle tasks remain manageable, then measure broadcast rates and actual utilization after deployment.
A site hierarchy can help with routing summaries. If one location owns 10.40.0.0/16, address its campus blocks so the upstream router can advertise a sensible aggregate, but do not summarize a block that includes destinations the site does not actually route. Aggregation should follow true routing ownership, not a desire to make the routing table appear smaller.
Leave room for IPv6 and multiple routing domains
Even when the immediate project uses IPv4, record how IPv6 will attach to the same VLANs. A common IPv6 enterprise LAN allocation uses a /64 per segment when SLAAC is expected; copying small IPv4 /27 allocations into IPv6 design makes no sense. Router advertisements, DHCPv6 behavior and neighbor discovery have their own requirements. The security goal—controlled crossing between segments—remains, but IPv6 rules and routes need explicit review rather than assuming IPv4 ACLs cover both stacks.
In an environment with tenants or overlapping acquisitions, separate routing tables or VRFs may be appropriate. A VLAN on its own separates Layer 2 traffic, whereas a VRF can isolate Layer 3 forwarding decisions across many VLANs. If routes are intentionally leaked between VRFs, that leak is another policy boundary requiring ownership and filtering. Avoid inventing duplicate subnets across ordinary interfaces and assuming VLAN numbers will resolve the ambiguity automatically.
Build documentation from the actual configuration after cutover: VLAN ID and purpose, interface or SSID assignment, exact network prefix, gateway address, DHCP scope, permitted inter-VLAN flows, and site or tenant owner. Reconcile the diagram periodically with switch and routing state so it remains reliable during outages and staff changes.
Enforce inter-VLAN access at the routing boundary
Creating VLANs alone does not stop a finance PC from reaching the printer or management VLAN when the gateway routes traffic freely. A policy should permit exact required services: finance to its application, phones to call-control and DNS, printers from approved print servers, and restricted administrator access to management interfaces. Record who owns each exception and remove temporary diagnostic rules after testing.
Switch port security, 802.1X and DHCP snooping address other threats at the access edge. They complement rather than replace routed ACLs or firewalls. If a printer should be reachable from only a print server, placing it on a separate VLAN makes policy placement easier, but the actual denial is enforced by a configured control.
Diagnose failures by layer instead of changing masks blindly
If a host cannot reach its gateway, verify the switch port’s access VLAN, trunk VLAN allow-list, native-tagging expectations, link state and local ARP. If the gateway is reachable but another VLAN is not, inspect the SVI/routed gateway status, route table, ACLs and firewalls. If a client has the wrong address, inspect the actual DHCP offer, relay configuration and scope—not just the prefix on the network diagram.
Before production, test five paths: a same-VLAN neighbor, the default gateway, an explicitly allowed cross-VLAN service, a deliberately denied cross-VLAN service and an internet or WAN destination. Record the result with source/destination IP, ports and observed network device. Good subnet planning is visible in predictable operating behavior, not merely a neat list of IP blocks.
A VLAN-subnet design succeeds when operations staff can tell which segment a device belongs to, why it needs its address range, where traffic leaves that segment and which authority approves the route across the boundary. The CIDR arithmetic is necessary; the accountable segmentation model makes it useful.