Automation · NetBox
Prefixes
Cheat sheet · https://pcornel.dk/topic.php?topic=5878
Answer
Prefixes in NetBox are subnets with VRF, site, VLAN, role and status, nested hierarchically, showing utilization and offering available child prefixes and IPs via the API.
Remember
- Prefixes have VRF, site, VLAN, role and status.
- They are nested.
- API offers available child prefixes and IPs.
First checks
curl -s -H 'Authorization: Token <t>' https://<netbox>/api/ipam/prefixes/<id>/available-prefixes/— free subnets- Prefix status and role — meaning
- is_pool flag — pool behaviour
Verify in this order
parent prefix → child prefixes → IPs
Where it usually breaks
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5878