VLSM: Allocate a /24 for Two Departments (100 + 50 Hosts)

Intermediate Calculate

Question

You have 192.168.5.0/24 and must allocate non-overlapping subnets for two departments: Engineering (needs 100 hosts) and Sales (needs 50 hosts). Using VLSM, assign the smallest possible subnet to each department and list the resulting allocations.

Given

{
  "network": "192.168.5.0/24",
  "departments": [
    {
      "name": "Engineering",
      "hosts": 100
    },
    {
      "name": "Sales",
      "hosts": 50
    }
  ]
}

Answer

{
  "allocations": [
    {
      "name": "Engineering",
      "subnet": "192.168.5.0/25",
      "usable": 126
    },
    {
      "name": "Sales",
      "subnet": "192.168.5.128/26",
      "usable": 62
    }
  ]
}

Try to solve it first, then click Reveal Answer

Step-by-Step Explanation

VLSM Rule: Allocate Largest First

Always assign the largest required subnet first to avoid fragmentation.


Allocation 1 — Engineering (100 hosts)

Find minimum host bits:

2^n - 2 >= 100
2^7 - 2 = 126  ✓  (n = 7)
prefix  = 32 - 7 = /25

Assign from the start of the parent block:

Subnet:    192.168.5.0/25
Range:     192.168.5.0 – 192.168.5.127
Usable:    192.168.5.1 – 192.168.5.126 (126 hosts)
Broadcast: 192.168.5.127

Allocation 2 — Sales (50 hosts)

Find minimum host bits:

2^n - 2 >= 50
2^6 - 2 = 62  ✓  (n = 6)
prefix  = 32 - 6 = /26

Assign from the next available address (192.168.5.128):

Subnet:    192.168.5.128/26
Range:     192.168.5.128 – 192.168.5.191
Usable:    192.168.5.129 – 192.168.5.190 (62 hosts)
Broadcast: 192.168.5.191

Remaining space

After both allocations, 192.168.5.192/26 (addresses .192 – .255) remains unallocated — 64 addresses available for future use.

Summary

Department Subnet Usable Hosts Waste
Engineering 192.168.5.0/25 126 26
Sales 192.168.5.128/26 62 12
Unallocated 192.168.5.192/26 — —

Related Terms

More Calculate Worksheets