Configuring a Virtual NIC to Operate in Access or Trunk Mode | Nutanix Community
Skip to main content
By default, a virtual NIC on a guest VM operates in access mode. In this mode, the virtual NIC can send and receive traffic only over its own VLAN, which is the VLAN of the virtual network to which it is connected. If restricted to using access mode interfaces, a VM running an application on multiple VLANs (such as a firewall application) must use multiple virtual NICs—one for each VLAN. Instead of configuring multiple virtual NICs in access mode, you can configure a single virtual NIC on the VM to operate in trunk mode. A virtual NIC in trunk mode can send and receive traffic over any number of VLANs in addition to its own VLAN. You can trunk specific VLANs or trunk all VLANs. You can also convert a virtual NIC from the trunk mode to the access mode, in which case the virtual NIC reverts to sending and receiving traffic only over its own VLAN.

Hey @Agnesh,

Below is the procedure that you can follow for mentioning a VLAN mode.

  1. logon to CVM with SSH
  2. create a vNIC and configure it in required mode using the following command:
    nutanix@cvm$ acli vm.nic_create vm network=network [vlan_mode=] [trunked_networks=networks]
  3. Specify appropriate values for the following parameters:
    vm. Name of the VM.

    network. Name of the virtual network to which you want to connect the virtual NIC.
    trunked_networks. A comma-separated list of the VLAN IDs that you want to trunk. The parameter is processed only if vlan_mode is set to kTrunked and is ignored if vlan_mode is set to kAccess. To include the default VLAN, VLAN 0, include it in the list of trunked networks. To trunk all VLANs, set vlan_mode to kTrunked and skip this parameter.

    vlan_mode. A mode in which the virtual NIC must operate. Set the parameter to kAccess for access mode and to kTrunked for trunk mode. Default: kAccess

    Let me know if this answered whatever you were looking for.

    -Regards,
    Chaitrali


The process is also explained in detail in AHV Administration Guide - Configuring a Virtual NIC to Operate in Access or Trunk Mode