Every usable address in the subnet is written to the database when you save, so allocation is collision-free under load. The network address, the broadcast address and the gateway are excluded automatically.
@csrf
{{-- Sizing guidance up front: the /22 ceiling is a real constraint of the materialisation approach, not a whim. --}}

Sizing

  • /24 — 254 hosts (253 after the gateway). Typical.
  • /23 — 510 hosts.
  • /{{ $maxPrefix }} — {{ number_format((1 << (32 - $maxPrefix)) - 2) }} hosts. The widest allowed.

Wider subnets are rejected because each address becomes a database row. Add a second pool instead of one enormous range.

Create pool Cancel