Automation · NetBox
Interfaces
Cheat sheet · https://pcornel.dk/topic.php?topic=5876
Answer
Interfaces in NetBox are device ports with type, speed, mode (access or tagged), VLANs, cable connections and IP addresses, used to generate switch and router configurations.
Remember
- Interfaces have type, speed, mode, VLANs and cables.
- They drive switch and router config generation.
- Keep them in sync with devices.
First checks
curl -s -H 'Authorization: Token <t>' 'https://<netbox>/api/dcim/interfaces/?device=<name>' | jq '.results[].name'— interfaces- Mode/VLAN assignments — switchport intent
- Cables/connections — topology
Verify in this order
interface record → config generation
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=5876