Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Interfaces

Direct 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.

When to use this

Use this when modelling device interfaces in NetBox.

First 30 seconds

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.

Operational verification

interface record → config generation

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
NetBox source-of-truth 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.

PlatformNetBox source-of-truth 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 modelling device interfaces in NetBox.
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.

2 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 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 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
  • Interfaces have type, speed, mode, VLANs and cables.
  • They drive switch and router config generation.
  • Keep them in sync with devices.
Key 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
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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
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 docNetBox source-of-truth automation current

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%
Depth when you need it

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.

Confirmation

Confirm action

Continue?