1---2name: netbox-review-datamodel3description: Audit and review NetBox data model design choices. Use when evaluating site hierarchy, IPAM organization, device modeling, tenancy patterns, custom field vs tag decisions, naming conventions, and extensibility strategy. Identifies modeling anti-patterns and suggests improvements aligned with NetBox best practices.4license: Apache-2.05---67# NetBox Data Model Review89> **Your knowledge of NetBox data models may be outdated.** Available model types, relationships, and extensibility mechanisms evolve between releases. Verify against current docs before recommending changes.1011## Retrieval Sources1213| Source | URL / Method | Use for |14|--------|-------------|---------|15| Data model docs | `https://netboxlabs.com/docs/netbox/models/` | All available model types |16| Custom fields docs | `https://netboxlabs.com/docs/netbox/customization/custom-fields/` | Field types and behavior |17| Custom Objects docs | `https://netboxlabs.com/docs/extensions/custom-objects/` | No-code extensibility |18| NetBox MCP server | If configured — inspect the current data model, count objects, find inconsistencies | Live model audit |1920## Review Workflow2122Follow this checklist when auditing a NetBox data model:23241. **Understand the organization** — what kind of network? (enterprise, DC, ISP, hybrid)252. **Check hierarchy** — is the Region → Site Group → Site → Location → Rack hierarchy appropriate?263. **Check IPAM** — are prefixes properly nested? VRFs used where needed? Aggregates defined?274. **Check naming** — are slugs consistent? Are names human-readable and grep-friendly?285. **Check extensibility choices** — custom fields vs tags vs config contexts vs custom objects296. **Check tenancy** — is multi-tenancy used correctly? Over-tenanted or under-tenanted?307. **Check for modeling smell** — overloaded fields, misuse of description for structured data3132## Critical Rules3334### Hierarchy (HIER)3536| ID | Rule | Severity |37|----|------|----------|38| HIER-1 | Use Regions for geography, Site Groups for function — don't conflate | High |39| HIER-2 | Locations are recursive — don't flatten (Floor > Room > Row is better than Row alone) | Medium |40| HIER-3 | Every device should be in a Site (never orphaned at top level) | High |41| HIER-4 | Racks should have a Location when the site has locations defined | Medium |42| HIER-5 | Don't create single-child hierarchies — they add complexity without value | Low |43| HIER-6 | On 4.6+, **RackGroups** offer a flat, cross-location way to group racks (e.g. "cage-7", "cold-aisle-B") independent of the Location tree — use them when rack grouping doesn't map cleanly onto site/location nesting, not as a substitute for Locations | Low |4445### IPAM (IPAM)4647| ID | Rule | Severity |48|----|------|----------|49| IPAM-1 | Define RIR Aggregates to track address space allocation boundaries | Medium |50| IPAM-2 | Prefixes should nest correctly (child within parent CIDR) | High |51| IPAM-3 | Use VRFs to separate overlapping address spaces — never duplicate prefixes in global table | Critical |52| IPAM-4 | IP Addresses must have prefix length (`/32` for loopbacks, actual mask for interfaces) | High |53| IPAM-5 | Use Roles to classify prefix purpose (infrastructure, customer, management); on NetBox 4.6+ **ASNs can also carry a Role** — use it to classify ASN purpose | Medium |54| IPAM-6 | VLANs should be in VLAN Groups with an appropriate **scope**. Scope can be Region/SiteGroup/Site/Location/Rack/ClusterGroup/Cluster (and **RackGroup** on 4.6+) — don't assume site/location are the only options; pick the tightest scope that matches the VLANs' reuse boundary | Medium |5556### Device Modeling (DEV)5758| ID | Rule | Severity |59|----|------|----------|60| DEV-1 | Every device needs a Device Type (not just a name) — this enables port planning | High |61| DEV-2 | Use Roles to classify function (router, switch, firewall) — not naming convention alone | High |62| DEV-3 | Platforms indicate software — assign them for config template compatibility | Medium |63| DEV-4 | Virtual chassis members should have proper VC position and master assignment | Medium |64| DEV-5 | Interface types must match reality (1000base-t vs 10gbase-sr) for capacity planning | Medium |6566### Extensibility (EXT)6768| ID | Rule | Severity |69|----|------|----------|70| EXT-1 | Use **custom fields** for single-valued structured data attached to one object type | — |71| EXT-2 | Use **tags** for cross-object-type classification and boolean "has this property" | — |72| EXT-3 | Use **config contexts** for hierarchical key-value data that merges by scope | — |73| EXT-4 | Use **custom objects** when you need a new first-class entity with its own relationships | — |74| EXT-5 | Never store structured data (JSON, lists) in description or comments fields | High |75| EXT-6 | Don't create custom fields that duplicate built-in fields (e.g., custom "location" field) | High |76| EXT-7 | Prefer custom objects over dozens of custom fields when the data is really a related entity | Medium |77| EXT-8 | On 4.6+, attach a **`validation_schema`** (JSON Schema) to JSON custom fields to enforce structure instead of leaving them free-form; flag JSON fields holding structured data with no schema | Medium |7879### Naming (NAME)8081| ID | Rule | Severity |82|----|------|----------|83| NAME-1 | Slugs should be lowercase, hyphenated, grep-friendly (`nyc-dc1` not `NYC_DC1`) | Medium |84| NAME-2 | Device names should encode location + function + index (`sw-nyc-dc1-01`) | Low |85| NAME-3 | Be consistent — pick one naming scheme and apply it everywhere | High |86| NAME-4 | Avoid embedding metadata in names (don't put VLAN ID in site name) | Medium |8788### Tenancy (TEN)8990| ID | Rule | Severity |91|----|------|----------|92| TEN-1 | Use tenants for logical ownership boundaries (customer, department, project) | — |93| TEN-2 | Don't over-tenant — if everything belongs to one tenant, you probably don't need tenancy | Medium |94| TEN-3 | Tenant Groups organize tenants hierarchically (e.g., by business unit) | Low |95| TEN-4 | Shared infrastructure (management networks, core routers) can be untenanted | Medium |9697## Anti-Patterns to Flag9899| Anti-Pattern | Why It Matters | Fix |100|-------------|---------------|-----|101| Flat site hierarchy (no locations) | Can't track floor/room/row placement | Add Location hierarchy |102| All IPs in global VRF with duplicates | IPAM conflicts, broken reports | Separate into VRFs |103| Custom fields used as foreign keys | No referential integrity, hard to query | Use custom objects or tags |104| JSON blobs in description fields | Not searchable, not validated, not filterable | Use custom fields or config contexts |105| One giant "catch-all" custom field per type | Defeats the purpose of structured data | Split into individual fields |106| Devices without Device Types | Loses port/bay/slot modeling | Always specify hardware model |107| Mixing naming conventions | Impossible to script against, confusing | Standardize and bulk-rename |108| Tags with spaces or special characters | Breaks API filtering, scripts | Use slug-friendly tag names |109| Over-nested regions (> 3 levels) | Adds complexity without improving navigation | Flatten to 2-3 levels max |110| Prefix hierarchy gaps | Parent/child relationships broken | Fill missing intermediate prefixes |111112## Scope113114This skill covers **data model design and organization**. It does NOT cover:115- Code that interacts with the API → use [netbox-review-integration](../netbox-review-integration/SKILL.md)116- How to model from scratch → use [netbox-data-modeling](../netbox-data-modeling/SKILL.md)117- Custom Objects plugin specifics → use [netbox-custom-objects](../netbox-custom-objects/SKILL.md)118119## Principles120121- **Context matters.** A 5-site enterprise has different needs than a 500-site ISP. Don't over-engineer.122- **Audit the real instance.** If MCP is available, query actual data rather than reviewing documentation alone.123- **Suggest, don't dictate.** Many modeling choices are valid — flag clear anti-patterns, but acknowledge trade-offs for judgment calls.124- **Prioritize data integrity.** Issues that cause broken relationships or duplicate data are more important than cosmetic naming issues.125- **Consider migration cost.** Flagging an anti-pattern is more useful if you also explain how hard it is to fix with existing data.