Organizations have been tracking SFPs in NetBox using Inventory Items for a long time now, and recently there have been discussions about them being deprecated in a future release. The actual deprecation timeframe hasn’t been announced, but rather than resisting this change we strongly suggest embracing it, as this change represents a significant upgrade to NetBox’s capabilities.
The previous Inventory Items approach for SFPs always felt like working against the system. While functional, it was cumbersome. Manual association of SFPs with interfaces using naming conventions, limited tracking of spare modules, and minimal automation possibilities meant everything required manual intervention.
The new Modules and Module Types system represents a fundamental shift in how NetBox handles modular hardware.
The traditional workflow was straightforward but limited:
This approach worked, but it was fundamentally a workaround. The biggest limitation was the lack of automatic relationship between the SFP and its interface. Everything relied on manual association through naming conventions or descriptions.
The new Modules system treats SFPs as what they actually are – modular components that create interfaces when installed.
Consider this scenario: Create a module type for standard SFP+ modules with an interface template named GigabitEthernet{module}. When that module gets installed into module bay position 3 on a switch, NetBox automatically creates interface GigabitEthernet3 and properly associates it with the module.
This represents true automation of the relationship between hardware and configuration.
Automatic Interface Creation: No more manually creating interfaces and trying to remember which SFP corresponds to which port. Install the module, and the interface appears automatically.
Proper Relationships: NetBox now understands that the SFP and interface are connected. Change the module, and the interface updates accordingly.
Hierarchical Support: Complex equipment with line cards that accept SFPs can now be modeled properly with nested modules.
Future-Proof Architecture: This aligns with NetBox’s development direction. Inventory Items are being phased out, while Modules continue to receive enhancements.
Let’s examine a real-world scenario with a 48-port switch that has SFP+ capabilities and how we would model that using Modules and Module Types.
Step 1: Module Type Profile Create a Module Type Profile to organize and standardize SFP modules:
(This is a simplified schema used for illustration purposes and to keep things simple. A proper production schema would probably include additional information such as data rate, reach distance, fiber type, etc.)
Step 2: Module Types Create reusable SFP module types:
Repeat for “SFP-10G-LR” and “SFP-1G-T” Module Types
Step 3: Device Type Create device type for a 48-port switch:
Step 4: Device Create a device instance:
Step 5: SFP Installation
Repeat for all SFPs installed in the device
Step 6: Operational Benefits
As you plan out your migration from Inventory Items to Modules and Module Types, here are some best practices to consider:
Template Naming: Invest time in getting the {module} templates correct. They must match existing interface names for automation compatibility.
Position Mapping: The module bay position becomes part of the interface name. Ensure positions correspond to physical equipment layout.
Incremental Approach: Avoid migrating everything simultaneously. Refine the process on a few devices before scaling.
Documentation: Document the mapping between previous inventory items and new module types for future reference. See our In-Depth Guide to Writing Network Documentation for more resources.
Nested Modules: For complex equipment (line cards with SFPs), the new system supports nested modules. While more complex to configure, this provides powerful modeling capabilities.
Change is challenging, particularly when current systems are functional. However, this represents a fundamental improvement in how NetBox handles modular hardware rather than change for its own sake.
Once NetBox begins automatically creating interfaces upon module installation, the previous manual approach will seem unnecessarily complex. The future of network infrastructure management emphasizes modular design, and NetBox is leading this evolution.