Use this when modelling device interfaces in NetBox.
Interfaces
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.
1. Interfaces model ports: type, mode, VLANs, IPs, cables.
2. Generate switchport configs.
3. Device type templates create interfaces.
4. Cables for topology.
5. Keep LAG/members accurate.
interface record → config generation
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
The negative fixture should deliberately exercise risks such as duplicate labels, stale inventory, conflicting authority, broad filters, race between read and write, orphaned relationships and automation acting on data not yet reconciled, choosing the cases most relevant to device/interface stable identity, name/type/status/addresses/cabling relationships and avoiding stale interface assumptions in generated configuration.
Step 2 Common mistakes Narrow the fault
- Interface names not matching the device (Gi1/0/1 vs GigabitEthernet1/0/1).
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.
- Interfaces have type, speed, mode, VLANs and cables.
- They drive switch and router config generation.
- Keep them in sync with devices.
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
ReferenceWhy it matters1 section · depth on demand
What it is
Interfaces belong to devices, carry IPs, VLAN modes and cable connections.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Interfaces in NetBox model each port on a device: name, type, enabled, mode (access/tagged), untagged and tagged VLANs, LAG membership, MTU and description. Together with cables, they describe the physical and Layer 2 design that automation can turn into switch configuration.
import pynetbox
nb = pynetbox.api("https://netbox.example.com", token=TOKEN)
for i in nb.dcim.interfaces.filter(device="sw-oslo-07", mode="access"):
print(i.name, i.untagged_vlan.vid if i.untagged_vlan else None, i.description)
Interface templates on device types create the right ports automatically when a device is added, so names match the real hardware. Mismatched interface names (e.g. Gi1/0/1 vs GigabitEthernet1/0/1) are a common source of broken automation — standardise on the platform's full names.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in NetBox > Interfaces. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://netbox.readthedocs.io/en/stable/ · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
For device/interface stable identity, name/type/status/addresses/cabling relationships and avoiding stale interface assumptions in generated configuration, prefer typed fields and stable IDs over human presentation text.