netbox/docs/models/dcim/interface.md

157 lines
6.2 KiB
Markdown
Raw Permalink Normal View History

# Interfaces
2020-03-05 11:44:18 -05:00
Interfaces in NetBox represent network interfaces used to exchange data with connected devices. On modern networks, these are most commonly Ethernet, but other types are supported as well. IP addresses and VLANs can be assigned to interfaces.
2020-03-05 11:44:18 -05:00
!!! tip
Like most device components, interfaces are instantiated automatically from [interface templates](./interfacetemplate.md) assigned to the selected device type when a device is created.
2021-03-29 10:35:07 -04:00
!!! note
Although both devices and virtual machines both can have interfaces assigned, a separate model is used for each. Thus, device interfaces have some properties that are not present on virtual machine interfaces and vice versa.
2021-03-29 10:35:07 -04:00
## Fields
2021-03-29 10:35:07 -04:00
### Device
2020-03-05 11:44:18 -05:00
The device to which this interface belongs.
2020-03-05 11:44:18 -05:00
### Module
The installed module within the assigned device to which this interface belongs (optional).
### Name
The name of the interface, as reported by the device's operating system. Must be unique to the parent device.
### Label
An alternative physical label identifying the interface.
### Type
The type of interface. Interfaces may be physical or virtual in nature, but only physical interfaces may be connected via cables.
2022-07-12 12:30:07 -04:00
!!! note
The interface type refers to the physical termination or port on the device. Interfaces which employ a removable optic or similar transceiver should be defined to represent the type of transceiver in use, irrespective of the physical termination to that transceiver.
### Speed
The operating speed, in kilobits per second (kbps).
### Duplex
The operation duplex (full, half, or auto).
### VRF
The [virtual routing and forwarding](../ipam/vrf.md) instance to which this interface is assigned.
4867 multiple mac addresses (#17902) * Create MACAddress model and migrations to convert existing .mac_address fields to standalone objects * Add migrations * All views/filtering working and documentation done; no unit tests yet * Redo migrations following VLAN Translation * Remove mac_address filter fields and add table columns for device/vm * Remove unnecessary "bulk rename" * Fix filterset tests for Device * Fix filterset tests for Interface * Fix tests on single-object forms * Fix serializer tests * Fix filterset tests for VMInterface * Fix filterset tests for Device and VirtualMachine * Move new field check into lookup_map iteration * Fix general MACAddress filter tests * Add GraphQL types/filters/schema * Fix bulk edit/create tests (bulk editing Interfaces will be unsupported because of inheritance from ComponentBulkEditForm) * Make mac_address read_only on InterfaceSerializer/VMInterfaceSerializer * Undo unrelated work * Cleanup unused IPAddress derived stuff * API endpoints * Add serializer objects to interface serializers * Clean up unnecessary bulk create forms/views/routes * Add SearchIndex and adjust indexable fields for Interface and VMInterface * Reorganize MACAddress classes out of association with DeviceComponents * Move MACAddressSerializer * Enforce saving only a single is_primary MACAddress per interface/vminterface * Perform is_primary validation on MACAddress model and just check if one already exists for the interface * Remove form-level validation * Fix check for current is_primary setting when reassigning * Model cleanup * Documentation notes and cleanup * Simplify serializer and add ip_addresses * Add to VMInterfaceSerializer too * Style cleanup * Standardize "MAC Address" instead of "MAC" * Remove unused views * Add is_primary field for bulk edit * HTML cleanup and add copy-to-clipboard button * Remove mac_address from Interface and VMInterface bulk-edit forms * Add device and VM filtering * Use combined assigned_object_parent in table to match structure of IPAddressTable * Add GFK fields to MACAddressSerializer * Reorganize "Addressing" sections to remove from proximity to "Device Components" and related groupings * Clean up migrations * Misc cleanup * Add filterset test * Remove mac_address field from interface forms * Designate primary MAC address via a ForeignKey on the interface models * Add serializer fields for primary_mac_address * Update docs --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-18 15:11:24 -05:00
### Primary MAC Address
4867 multiple mac addresses (#17902) * Create MACAddress model and migrations to convert existing .mac_address fields to standalone objects * Add migrations * All views/filtering working and documentation done; no unit tests yet * Redo migrations following VLAN Translation * Remove mac_address filter fields and add table columns for device/vm * Remove unnecessary "bulk rename" * Fix filterset tests for Device * Fix filterset tests for Interface * Fix tests on single-object forms * Fix serializer tests * Fix filterset tests for VMInterface * Fix filterset tests for Device and VirtualMachine * Move new field check into lookup_map iteration * Fix general MACAddress filter tests * Add GraphQL types/filters/schema * Fix bulk edit/create tests (bulk editing Interfaces will be unsupported because of inheritance from ComponentBulkEditForm) * Make mac_address read_only on InterfaceSerializer/VMInterfaceSerializer * Undo unrelated work * Cleanup unused IPAddress derived stuff * API endpoints * Add serializer objects to interface serializers * Clean up unnecessary bulk create forms/views/routes * Add SearchIndex and adjust indexable fields for Interface and VMInterface * Reorganize MACAddress classes out of association with DeviceComponents * Move MACAddressSerializer * Enforce saving only a single is_primary MACAddress per interface/vminterface * Perform is_primary validation on MACAddress model and just check if one already exists for the interface * Remove form-level validation * Fix check for current is_primary setting when reassigning * Model cleanup * Documentation notes and cleanup * Simplify serializer and add ip_addresses * Add to VMInterfaceSerializer too * Style cleanup * Standardize "MAC Address" instead of "MAC" * Remove unused views * Add is_primary field for bulk edit * HTML cleanup and add copy-to-clipboard button * Remove mac_address from Interface and VMInterface bulk-edit forms * Add device and VM filtering * Use combined assigned_object_parent in table to match structure of IPAddressTable * Add GFK fields to MACAddressSerializer * Reorganize "Addressing" sections to remove from proximity to "Device Components" and related groupings * Clean up migrations * Misc cleanup * Add filterset test * Remove mac_address field from interface forms * Designate primary MAC address via a ForeignKey on the interface models * Add serializer fields for primary_mac_address * Update docs --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-11-18 15:11:24 -05:00
The [MAC address](./macaddress.md) assigned to this interface which is designated as its primary.
!!! note "Changed in NetBox v4.2"
The MAC address of an interface (formerly a concrete database field) is available as a property, `mac_address`, which reflects the value of the primary linked [MAC address](./macaddress.md) object.
### WWN
The 64-bit world-wide name (for Fibre Channel interfaces).
### MTU
The interface's configured maximum transmissible unit (MTU).
### Transmit Power
The interface's configured output power, in dBm (for optical interfaces).
### Enabled
If not selected, this interface will be treated as disabled/inoperative.
### Management Only
Designates the interface as handling management traffic only (e.g. for out-of-band management connections).
### Mark Connected
If selected, this component will be treated as if a cable has been connected.
### Parent Interface
Virtual interfaces can be bound to a physical parent interface. This is helpful for modeling virtual interfaces which employ encapsulation on a physical interface, such as an 802.1Q VLAN-tagged subinterface.
!!! note
An interface with one or more child interfaces assigned cannot be deleted until all its child interfaces have been deleted or reassigned.
### Bridged Interface
Interfaces can be bridged to other interfaces on a device in two manners: symmetric or grouped.
* **Symmetric:** For example, eth0 is bridged to eth1, and eth1 is bridged to eth0. This effects a point-to-point bridge between the two interfaces, which NetBox will follow when tracing cable paths.
* **Grouped:** Multiple interfaces are each bridged to a common virtual bridge interface, effecting a multiaccess bridged segment. NetBox cannot follow these relationships when tracing cable paths, because no forwarding information is available.
### LAG Interface
Physical interfaces may be arranged into link aggregation groups (LAGs, also known as "trunks") and associated with a parent LAG (virtual) interface. LAG interfaces can be recursively nested to model bonding of trunk groups. Like all virtual interfaces, LAG interfaces cannot be connected physically.
### PoE Mode
The power over Ethernet (PoE) mode for this interface. (This field must be left empty for interfaces which do not support PoE.) Choices include:
* Powered device (PD)
* Power-supplying equipment (PSE)
### PoE Type
The classification of PoE transmission supported, for PoE-enabled interfaces. This can be one of the listed IEEE 802.3 standards, or a passive setting (24 or 48 volts across two or four pairs).
### 802.1Q Mode
For switched Ethernet interfaces, this identifies the 802.1Q encapsulation strategy in effect. Options include:
* **Access:** All traffic is assigned to a single VLAN, with no tagging.
* **Tagged:** One untagged "native" VLAN is allowed, as well as any number of tagged VLANs.
* **Tagged (all):** Implies that all VLANs are carried by the interface. One untagged VLAN may be designated.
2024-11-26 12:38:29 -05:00
* **Q-in-Q:** Q-in-Q (IEEE 802.1ad) encapsulation is performed using the assigned SVLAN.
This field must be left blank for routed interfaces which do employ 802.1Q encapsulation.
### Untagged VLAN
The "native" (untagged) VLAN for the interface. Valid only when one of the above 802.1Q mode is selected.
### Tagged VLANs
The tagged VLANs which are configured to be carried by this interface. Valid only for the "tagged" 802.1Q mode above.
### Q-in-Q SVLAN
The assigned service VLAN (for Q-in-Q/802.1ad interfaces).
### Wireless Role
Indicates the configured role for wireless interfaces (access point or station).
### Wireless Channel
The configured channel for wireless interfaces.
2022-07-12 12:30:07 -04:00
!!! tip
Selecting one of the pre-defined wireless channels will automatically populate the channel frequency and width upon saving the interface.
### Channel Frequency
2021-10-20 11:22:56 -04:00
The configured operation frequency of a wireless interface, in MHz. This is typically inferred by the configured channel above, but may be set manually e.g. to identify a licensed channel not available for general use.
2021-10-20 11:22:56 -04:00
### Channel Width
2021-10-20 11:22:56 -04:00
The configured channel width of a wireless interface, in MHz. This is typically inferred by the configured channel above, but may be set manually e.g. to identify a licensed channel not available for general use.
2021-10-20 11:22:56 -04:00
### Wireless LANs
The [wireless LANs](../wireless/wirelesslan.md) for which this interface carries traffic. (Valid for wireless interfaces only.)
Fixes: #7336 - VLAN Translation (#17745) * VLANTranslationPolicy and VLANTranslationRule models and all associated UI classes * Change VLANTranslationPolicy to a PrimaryModel and make name unique * Add serializer classes to InterfaceSerializer * Remake migrations * Add GraphQL typing * Skip tagged models in test * Missing migration * Remove get_absolute_url methods * Remove package-lock.json * Rebuild migration and add constraints and field options * Rebuild migrations * Use DynamicModelChoiceField for policy field * Make vlan_translation_policy fields on filtersets more consistent with existing __name convention * Add vlan_translation_table to VMInterface detail page * Add vlan_translation_policy to VMInterfaceSerializer * Move vlan_translation_policy fields to model and filterset mixins * Protect in-use policies against deletion * Add vlan_translation_policy to fields in VMInterfaceSerializer * Cleanup indentation * Remove unnecessary ordering column * Rebuild migrations * Search methods and registration * Ensure 'id' column is present by default * Add graphql types/filters/schema for VLANTranslationRule * Filterset tests * View tests * API and viewset tests (incomplete) * Add tags to VLANTranslationRuleForm * Complete viewset tests for VLANTranslationRule * Make VLANTranslationRule.policy nullable (but still required) * Revert "Make VLANTranslationRule.policy nullable (but still required)" This reverts commit 4c1bb437ef1a0a3593e5fbb87f08a0f158ea8c47. * Revert nullability * Explicitly prefetch policy in graphql * Documentation of new and affected models * Add note about select_related in graphql * Rework policy/rule documentation * Move vlan_translation_policy into 802.1Q Switching fieldset * Remove redundant InterfaceVLANTranslationTable * Conditionally include vlan_translation_table in interface.html and vminterface.html * Add description field to VLANTranslationRule * Define vlan_translation_table conditionally * Add policy (name) filter to VLANTranslationRuleFilterSet * Revert changes to adding-models.md (moved to another PR) * Dynamic table for linked rules in vlantranslationpolicy.html * Misc cleanup --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
2024-10-30 17:09:46 -04:00
### VLAN Translation Policy
The [VLAN translation policy](../ipam/vlantranslationpolicy.md) that applies to this interface (optional).