Networking & Infrastructure

How Do I Subnet a Network for Multiple Departments or VLANs?

Learn subnetting techniques for organizing networks by department or VLAN, including practical examples, planning strategies, and implementation best practices.

By Inventive HQ Team

To subnet a network for multiple departments or VLANs, assign one subnet to each VLAN, size each subnet to its host count plus 20-30% growth headroom, and allocate the blocks sequentially so none overlap. The practical recipe: pick a private range (10.0.0.0/8 for room to grow), give every department its own VLAN and matching subnet, choose a mask that fits the device count (a 50-device department needs a /26 for 62 usable hosts), configure the gateway on a router or Layer 3 switch, and enforce cross-department policy with ACLs on that Layer 3 device. Devices in different VLANs cannot talk directly — every packet between them passes through the router, which is exactly where you apply security rules.

That's the summary an AI Overview will hand you. What it can't show is the actual address math, the overlap traps, and the decision of when to keep it simple versus squeeze address space. Below is a worked allocation you can copy, a diagram of how a single /24 carves into departments, a flat-vs-VLSM decision table, and the exact switch, router, DHCP, and ACL config that turns the plan into a running network.

One /24 carved into department subnets A 192.168.1.0/24 block split into Engineering /26, Sales /26, HR /27, IT /27, and Guest /27, with usable host ranges and a shared router applying inter-VLAN policy. Splitting 192.168.1.0/24 by department Each VLAN gets its own subnet, gateway, and firewall policy Engineering .0 /26 .1 – .62 (62 hosts) bcast .63 Sales .64 /26 .65 – .126 (62 hosts) bcast .127 HR .128 /27 .129 – .158 bcast .159 IT .160 /27 .161 – .190 bcast .191 Guest .192 /27 .193 – .222 isolated Router / L3 switch inter-VLAN routing + ACLs Guest denied to all internal subnets

Understanding Subnetting for Organizational Structure

Subnetting allows you to divide a large network into smaller logical networks, each serving a specific purpose or department. This enables better organization, improved security through isolation, and more efficient IP address management. Whether you're organizing networks by department, function, or security level, proper subnetting is foundational to network design.

Basic Subnetting Concepts

Before dividing networks, understand the fundamentals:

Network Address - The lowest address in a subnet, identifying the network itself Broadcast Address - The highest address, used for broadcasting to all devices Usable Addresses - Everything between network and broadcast address Subnet Mask - Determines which bits represent the network

A /24 network (255.255.255.0) provides:

  • Network address: X.X.X.0
  • Usable addresses: X.X.X.1 through X.X.X.254
  • Broadcast: X.X.X.255
  • Total usable IPs: 254

Example: Subnetting for Multiple Departments

Scenario: Company with 192.168.0.0/16 network needs subnetting for:

  • Engineering department (50 devices)
  • Sales department (30 devices)
  • HR department (20 devices)
  • IT department (20 devices)
  • Guest network (25 devices)

Planning Process:

  1. Determine requirements:

    • Engineering: Need 50 IPs → /26 provides 62 usable IPs ✓
    • Sales: Need 30 IPs → /26 provides 62 usable IPs ✓
    • HR: Need 20 IPs → /27 provides 30 usable IPs ✓
    • IT: Need 20 IPs → /27 provides 30 usable IPs ✓
    • Guest: Need 25 IPs → /27 provides 30 usable IPs ✓
  2. Allocate subnets:

    • Engineering: 192.168.1.0/26 (192.168.1.0 - 192.168.1.63)
    • Sales: 192.168.1.64/26 (192.168.1.64 - 192.168.1.127)
    • HR: 192.168.1.128/27 (192.168.1.128 - 192.168.1.159)
    • IT: 192.168.1.160/27 (192.168.1.160 - 192.168.1.191)
    • Guest: 192.168.1.192/27 (192.168.1.192 - 192.168.1.223)
  3. Document allocation:

Department    | Network            | Usable Range              | Broadcast
============================================================
Engineering   | 192.168.1.0/26     | .1 - .62                 | .63
Sales         | 192.168.1.64/26    | .65 - .126               | .127
HR            | 192.168.1.128/27   | .129 - .158              | .159
IT            | 192.168.1.160/27   | .161 - .190              | .191
Guest         | 192.168.1.192/27   | .193 - .222              | .223
Advertisement

VLANs and Subnetting

VLANs (Virtual LANs) allow logical network segmentation on the same physical infrastructure. Typically, each VLAN gets its own subnet.

VLAN Configuration Example:

VLAN 10 (Engineering)      → 192.168.10.0/24
VLAN 20 (Sales)             → 192.168.20.0/24
VLAN 30 (HR)                → 192.168.30.0/24
VLAN 40 (IT)                → 192.168.40.0/24
VLAN 50 (Guest)             → 192.168.50.0/24
VLAN 60 (Servers)           → 192.168.60.0/24

Each VLAN:

  • Has its own subnet
  • Cannot directly communicate with other VLANs without a router
  • Can be managed and controlled independently
  • Improves security through isolation

Security Through Isolation

Subnetting enables security policies:

Subnet 1: Financial Systems

  • 10.0.1.0/24
  • Restricted access (who can connect?)
  • Encrypted traffic required
  • Audit all traffic

Subnet 2: Development

  • 10.0.2.0/24
  • More permissive for developer productivity
  • Isolated from financial systems
  • Development tools and testing allowed

Subnet 3: Guest Network

  • 10.0.3.0/24
  • No access to other subnets
  • Limited bandwidth
  • Time-based access

This segmentation means a compromise of the guest network doesn't affect development or financial systems.

Variable Length Subnet Masking (VLSM)

VLSM allows different subnet sizes within the same major network, maximizing address efficiency.

Efficient VLSM Example:

Instead of assigning /24 to every department, use different sizes:

Department       | Hosts Needed | Subnet      | Size
==================================================
Engineering      | 120          | /24         | 256
Sales            | 60           | /25         | 128
HR               | 30           | /26         | 64
IT               | 25           | /26         | 64
Guest            | 50           | /25         | 128
Servers          | 15           | /28         | 16
IoT Devices      | 8            | /28         | 16

Starting with 172.16.0.0/16:

  • Engineering: 172.16.0.0/24
  • Sales: 172.16.1.0/25
  • HR: 172.16.1.128/26
  • IT: 172.16.1.192/26
  • Guest: 172.16.2.0/25
  • Servers: 172.16.2.128/28
  • IoT: 172.16.2.144/28

VLSM provides significant IP address efficiency, especially important with limited address space.

Flat /24-per-VLAN vs VLSM: which should you use?

FactorUniform /24 per VLANVLSM (right-sized subnets)
Address space neededHigh — 254 hosts reserved per VLANLow — each subnet fits its host count
ReadabilityExcellent (10.0.10.0, 10.0.20.0…)Harder — masks vary per subnet
DHCP/documentationTrivial, every scope looks the sameMust track mask per subnet
Overlap riskVery low (fixed boundaries)Higher — boundaries shift with mask
Best forPlenty of RFC 1918 space, small-to-mid networksTight blocks, ISP-assigned /24, service-provider edge
When to useDefault choice — you have 10.0.0.0/8 or 192.168.0.0/16 to spendWhen address space is genuinely scarce and sizes vary widely

Rule of thumb: reach for VLSM only when you are constrained. If you own all of 10.0.0.0/8, a clean 10.<site>.<vlan>.0/24 scheme is easier to run for years than a tightly packed VLSM plan that nobody can read six months later.

Implementation Steps

Step 1: Document Current Network

  • What's your current network? (e.g., 192.168.0.0/16)
  • How many departments/VLANs needed?
  • How many devices in each?

Step 2: Plan Subnets

  • Allocate sufficient space for growth (add 20-30% buffer)
  • Document subnet purposes
  • Ensure no overlapping addresses
  • Use Subnet Calculator to verify

Step 3: Configure Network Infrastructure

On switches (VLAN configuration):

vlan 10
  name Engineering

vlan 20
  name Sales

interface vlan 10
  ip address 192.168.10.1 255.255.255.0

interface vlan 20
  ip address 192.168.20.1 255.255.255.0

On routers (routing between VLANs):

router ospf 1
  network 192.168.10.0 0.0.0.255 area 0
  network 192.168.20.0 0.0.0.255 area 0

Step 4: Configure DHCP If using DHCP, configure separate pools for each subnet:

dhcp-server:
  scope Engineering:
    network 192.168.1.0/26
    gateway 192.168.1.1
    dns 8.8.8.8
    lease-time 86400

  scope Sales:
    network 192.168.1.64/26
    gateway 192.168.1.65
    dns 8.8.8.8
    lease-time 86400

Step 5: Configure Access Control Lists (ACLs) Control traffic between subnets:

# Allow Engineering to Sales
permit ip 192.168.1.0 0.0.0.63 192.168.1.64 0.0.0.63

# Deny Guest to any other subnet
deny ip 192.168.1.192 0.0.0.31 192.168.0.0 0.0.255.255
permit ip 192.168.1.192 0.0.0.31 any

Subnet Calculator Usage

When planning subnets, use Subnet Calculator to:

  1. Verify calculations: Enter a subnet and verify breakdown
  2. Find available subnets: Calculate multiple sequential subnets
  3. Validate overlaps: Ensure subnets don't overlap
  4. Plan growth: See what's available for future expansion

Example: Entering 192.168.0.0/16 and converting to /24 shows 256 possible subnets, helping you plan which ones to use.

Best Practices

Plan for Growth:

  • Don't exactly fill each subnet with devices
  • Leave 20-30% headroom for expansion
  • If a department needs 30 IPs, assign /25 (62 usable) not /26 (30 usable)

Use Meaningful Addressing:

  • Keep departments in sequential IP ranges
  • Use similar numbering for related subnets
  • Document the addressing scheme clearly

Secure Sensitive Subnets:

  • Servers, databases: Restricted VLAN
  • Financial: Even more restricted
  • Guest: Completely isolated
  • Development: More permissive but isolated from production

Monitor and Audit:

  • Track IP usage in each subnet
  • Identify unused subnets for reclamation
  • Monitor unusual traffic patterns
  • Ensure ACLs are still appropriate

Document Everything:

## Network Subnetting Plan

**Parent Network:** 192.168.0.0/16

### Department Subnets
| Department | VLAN | Subnet         | Gateway      | Notes |
|------------|------|----------------|--------------|-------|
| Engineering| 10   | 192.168.1.0/24 | 192.168.1.1  | 200+ users |
| Sales      | 20   | 192.168.2.0/24 | 192.168.2.1  | 100+ users |
| ...        | ...  | ...            | ...          | ... |

### Current Utilization
- Engineering: 85/252 IPs used
- Sales: 42/252 IPs used
- ...

### Future Expansion
- Available: 192.168.3.0/24, 192.168.4.0/24, ...

Common Mistakes to Avoid

Overlapping Subnets: If you assign 192.168.1.0/25 to Engineering and 192.168.1.64/26 to Sales, they overlap (192.168.1.64-.95 appears in both). Use Subnet Calculator to verify no overlaps.

Too-Small Subnets: Assigning /28 (14 usable IPs) to a department with 15 devices breaks immediately. Always add headroom.

Not Documenting: Forgetting to document which VLAN is which leads to confusion and errors.

Poorly Planned ACLs: ACLs controlling traffic between subnets should be carefully designed to match business needs.

Subnet Calculator for Planning

Use the Subnet Calculator tool to:

  1. Enter your parent network (e.g., 192.168.0.0/16)
  2. Calculate what smaller subnets fit (e.g., /24, /25, /26)
  3. Verify sequential non-overlapping allocations
  4. Document the breakdown

Example output:

Parent: 192.168.0.0/16
  ├─ 192.168.1.0/24 (Engineering)
  ├─ 192.168.2.0/24 (Sales)
  ├─ 192.168.3.0/24 (HR)
  ├─ 192.168.4.0/24 (IT)
  ├─ 192.168.5.0/24 (Guest)
  └─ 192.168.6.0/24 - 192.168.255.0/24 (Available)

Conclusion: Strategic Subnetting Improves Network Management

Subnetting by department or VLAN dramatically improves network organization, security, and manageability. By carefully planning subnet allocations, implementing VLANs appropriately, and configuring access controls, you create a network that is easier to manage, more secure, and better prepared for growth. The Subnet Calculator helps verify your plans are mathematically sound, preventing configuration errors. Invest time in proper subnet planning—it pays dividends in network reliability and security.

Frequently Asked Questions

How many subnets do I need for my departments and VLANs?

Create one subnet per broadcast domain, which in practice means one subnet per VLAN. If you have five departments (Engineering, Sales, HR, IT, Guest) you need at least five VLANs and five subnets — plus separate subnets for shared resources like servers, printers, VoIP phones, and management interfaces. Most small networks end up with 6-12 subnets. A one-to-one VLAN-to-subnet mapping keeps routing and firewall rules simple.

What size subnet should I use for each department?

Size the subnet to the number of devices plus 20-30% growth headroom, then round up to the next CIDR boundary. A department with 30 devices needs a /26 (62 usable hosts) rather than a /27 (30 usable) so it does not fill up. For simplicity many teams give every VLAN a /24 (254 usable hosts), which wastes address space but eliminates resizing headaches. Use VLSM only when address space is tight.

Should every VLAN get its own subnet?

Yes. A VLAN is a Layer 2 broadcast domain and a subnet is a Layer 3 address range; the clean design maps exactly one subnet to one VLAN. Putting multiple subnets on one VLAN (secondary addressing) or spanning one subnet across multiple VLANs breaks the correspondence and makes DHCP, routing, and ACLs confusing. Keep it one VLAN, one subnet, one gateway.

How do devices in different VLANs communicate?

They cannot talk directly at Layer 2 — traffic must pass through a router or a Layer 3 switch that has an interface (an SVI or router-on-a-stick subinterface) in each VLAN. This is called inter-VLAN routing. Because all cross-VLAN traffic funnels through that Layer 3 device, it is the natural place to apply access control lists and firewall policy between departments.

What is the difference between a VLAN and a subnet?

A VLAN is a Layer 2 construct that segments a switch into isolated broadcast domains, identified by a VLAN ID (1-4094). A subnet is a Layer 3 construct that groups IP addresses under a shared network prefix. They are independent technologies that are almost always paired one-to-one: the VLAN controls which ports share a broadcast domain, and the subnet defines the IP addressing inside it.

When should I use VLSM instead of giving every VLAN a /24?

Use VLSM (variable-length subnet masking) when you are working inside a limited address block — for example a single /24 from an ISP or a tight RFC 1918 range — and need to fit departments of very different sizes without waste. If you have plenty of private address space (all of 10.0.0.0/8 or 192.168.0.0/16), a uniform /24 per VLAN is simpler to read, document, and troubleshoot. VLSM trades simplicity for efficiency.

How do I prevent subnets from overlapping?

Allocate subnets sequentially and verify that each new block starts on a valid boundary for its mask. Overlaps happen when a larger and smaller block share addresses — for example 192.168.1.0/25 (.0-.127) and 192.168.1.64/26 (.64-.127) collide. Run each proposed range through a subnet calculator and keep a master allocation table so no two subnets claim the same addresses.

Which private IP ranges should I use for internal subnets?

Use the RFC 1918 private ranges: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16. For anything beyond a handful of subnets, 10.0.0.0/8 gives the most room and lets you encode meaning into octets (for example 10.<site>.<vlan>.0/24). Reserve 192.168.0.0/16 for small offices and avoid the very common 192.168.0.0/24 and 192.168.1.0/24 to reduce VPN address conflicts with home networks.

networkingsubnettingvlansinfrastructureip-addressing