Use this when modelling VRFs with route distinguishers and route targets in NetBox.
VRFs · NetBox
VRFs in NetBox model separate routing tables with route distinguishers and route targets, allowing overlapping prefixes and IP addresses to be tracked correctly.
1. VRFs and route targets model L3 separation.
2. Assign prefixes/IPs.
3. Generate VRF configs.
4. enforce_unique.
5. Tenants for ownership.
VRF + RTs → device configs
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 VRF identity/route-distinguisher context, overlapping prefix namespaces, tenancy and ensuring address/prefix queries include the correct routing domain.
Step 2 Common mistakes Narrow the fault
- Leaving everything in the global table when VRFs exist.
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.
- VRFs have route distinguishers and route targets.
- They allow overlapping prefixes.
- Enforce unique prefixes per VRF if needed.
curl -s -H 'Authorization: Token <t>' https://<netbox>/api/ipam/vrfs/— VRFs- Route targets import/export — MPLS/EVPN
- Tenant association — multi-tenancy
ReferenceWhy it matters1 section · depth on demand
What it is
VRFs separate address spaces; prefixes and IPs reference their VRF.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
VRFs in NetBox model separate routing tables. Prefixes and IP addresses belong to a VRF (or the global table), which lets NetBox hold overlapping address spaces — for different customers, or for the guest network reusing the same private range as the corporate one.
| Field | Meaning |
|---|---|
| Name | GUEST, CUST-A |
| RD | Route distinguisher (65000:120) |
| Enforce unique | Disallow duplicate IPs within the VRF |
| Import/export targets | Route targets for MPLS L3VPN modelling |
When querying IPAM by API, always include the VRF filter (vrf_id or vrf=GUEST, or vrf_id=null for global) — otherwise lookups can return an address from the wrong routing table.
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 > VRFs. 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 VRF identity/route-distinguisher context, overlapping prefix namespaces, tenancy and ensuring address/prefix queries include the correct routing domain, prefer typed fields and stable IDs over human presentation text.