netbox/docs/models/virtualization/vminterface.md
bctiemann 353214098b
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

2.5 KiB

Interfaces

Virtual machine interfaces behave similarly to device interfaces: They can be assigned to VRFs, may have IP addresses, VLANs, and services attached to them, and so on. However, given their virtual nature, they lack properties pertaining to physical attributes. For example, VM interfaces do not have a physical type and cannot have cables attached to them.

Fields

Virtual Machine

The virtual machine to which this interface is assigned.

Name

The interface's name. Must be unique to the assigned VM.

Parent Interface

Identifies the parent interface of a subinterface (e.g. used to employ encapsulation).

!!! 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

An interface on the same VM with which this interface is bridged.

Enabled

If not selected, this interface will be treated as disabled/inoperative.

Primary MAC Address

The MAC address 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 object.

MTU

The interface's configured maximum transmissible unit (MTU).

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.

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

VRF

The virtual routing and forwarding instance to which this interface is assigned.

VLAN Translation Policy

The VLAN translation policy that applies to this interface (optional).