Pcornel
Automation · IPAM Automation

Prefixes

Cheat sheet · https://pcornel.dk/topic.php?topic=5864

Back to the Topic

Answer

Prefixes in IPAM are subnets such as 10.20.0.0/24, organized hierarchically with status, role, site and VLAN, from which automation allocates child prefixes and addresses.

Remember

  • Prefixes are organized hierarchically.
  • Status and role describe use.
  • Child prefixes and IPs are allocated from parents.

First checks

  • curl -s -H 'Authorization: Token <t>' https://<netbox>/api/ipam/prefixes/?site=<site> | jq '.results[].prefix' — list prefixes
  • Prefix roles/VRF assignment — context
  • Overlaps allowed only in separate VRFs — uniqueness

Verify in this order

prefix → VRF/site/VLAN → 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=5864

Confirmation

Confirm action

Continue?