Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

IP Allocation

Direct answer

IP allocation automation picks the next free address or prefix from the right pool, marks it as used atomically to avoid two jobs taking the same one, and releases it when the system is removed.

When to use this

Use this when allocating addresses automatically.

First 30 seconds

1. Allocate IPs via API (available-ips/available-prefixes).

2. Check for existing allocations first (idempotency).

3. Tag/describe owner.

4. Release on decommission.

5. Sync DNS.

Operational verification

request → available-ips → allocated IP

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
IPAM automation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformIPAM automation · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior.
Scope / prerequisiteUse this when allocating addresses automatically.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Common mistakes Narrow the fault
  • Reading the free list and then creating the IP in a second call (race).
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Allocation must be atomic to avoid duplicates.
  • Allocate from the correct pool or prefix.
  • Release addresses on decommission.
Key checks
  • curl -s -X POST -H 'Authorization: Token <t>' -H 'Content-Type: application/json' -d '{"description":"vm01"}' https://<netbox>/api/ipam/prefixes/<id>/available-ips/ — allocate next IP
  • Idempotency (check existing by name/tag first) — no duplicates
  • Release on decommission — cleanup
ReferenceWhy it matters1 section · depth on demand

What it is

IP allocation requests the next free address or prefix from IPAM via API, atomically.

ReferenceImportant terms & boundaries2 sections · depth on demand

How it works

Atomic allocation means the IPAM picks and records the address in one API call, so two parallel jobs never get the same IP. NetBox does this with POST to available-ips or available-prefixes.

Example

curl -X POST -H "Authorization: Token $T" -H 'Content-Type: application/json' \
  https://netbox.example.com/api/ipam/prefixes/12/available-ips/ -d '{"dns_name":"web01.example.com"}'
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docIPAM automation current

Authoritative/upstream documentation reviewed for bounded claims in IPAM Automation > IP Allocation. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://netbox.readthedocs.io/en/stable/models/ipam/ · confidence 94%
Confirmation

Confirm action

Continue?