Enable VLAN trunking on Nutanix AHV VM

Shares

Nutanix AHV offers several different options to configure VM networking. One of them is change vNIC from access mode to trunked mode. VM with vNIC with access mode enabled can send or listen traffic over single VLAN. VM with vNIC in trunk mode can send or receive traffic from multiple VLANs. One of the use cases is IDS (Intruder Detection Systems), IPS (Intruder Prevention System), virtual firewalls appliances or virtual load balancers where a single VM needs access to multiple networks.

To enable VLAN trunking on Nutanix AHV VM network adapter, you have to invoke acli command.

acli vm.nic_update vm mac_addr [update_vlan_trunk_info={true | false}] [vlan_mode={kAccess | kTrunked}] [trunked_networks=networks]

In below example, 2 networks were trunked to single Nutanix AHV vNIC

vm.nic_update AWS-Win2k16-01 50:6b:8d:d9:0e:ad update_vlan_trunk_info=true vlan_mode=kTrunked trunked_networks=555,556

You can check if changes were applied, by getting VM details. As you noticed, vlan_mode is “kTrunked” and two trunked networks are listed.

 acropolis$ vm.get AWS-Win2k16-01
AWS-Win2k16-01 {
    }
    hwclock_timezone: "America/Phoenix"
    machine_type: "pc"
    memory_mb: 1024
    name: "AWS-Win2k16-01"
    nic_list {
      mac_addr: "50:6b:8d:d9:0e:ad"
      network_name: "VLAN568"
      network_type: "kNativeNetwork"
      network_uuid: "d26a8da7-adfd-4870-b64d-d377f27ecbd2"
      trunked_networks: 555
      trunked_networks: 556
      type: "kNormalNic"
      uuid: "72493bb9-a076-45e7-aa73-85a0ef7896f9"
      vlan_mode: "kTrunked"
    }
acropolis>

I have recorded short video where you can watch the process.

Enable VLAN trunking on Nutanix AHV VM

To revert Nutanix AHV VM network configuration from trunked to access mode, execute below command

vm.nic_update VM_NAME MAC_ADDRESS update_vlan_trunk_info=true vlan_mode=kAccess

Youtube video made by Jason with a deep explanation of how VM trunking works on Nutanix AHV

Nutanix AHV VM network trunking
5 1 vote
Article Rating

Artur Krzywdzinski

Artur is Consulting Architect at Nutanix. He has been using, designing and deploying VMware based solutions since 2005 and Microsoft since 2012. He specialize in designing and implementing private and hybrid cloud solution based on VMware and Microsoft software stacks, datacenter migrations and transformation, disaster avoidance. Artur holds VMware Certified Design Expert certification (VCDX #077).

You may also like...

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x

FOR FREE. Download Nutanix port diagrams

Join our mailing list to receive an email with instructions on how to download 19 port diagrams in MS Visio format.

NOTE: if you do not get an email within 1h, check your SPAM filters

You have Successfully Subscribed!

Pin It on Pinterest