How to configure mirror port(promiscuous mode) in Nutanix AHV

HOW TO CONFIGURE Port Mirroring(promiscuous mode) on AHV

Port mirroring is the capability on a network switch to send a copy of network packets seen on a switch port to a network-monitoring device connected to another switch port.

Supported Hypervisor are VMware, Hyper-V, Xen and linux KVM.

Nutanix AHV
Nutanix AHV
  1. Add new br(vSwitch) port
root@ahvhost# ovs-vsctl add-br b2 

2. Find the VM UUID information

root@ahvhost# acli vm.list
Id Name                                  State 
1 NTNX-ABC-2-CVM                         running 
3 Ebf402c6-3f54-4305-8f3a-266cd7acd6f9   running

3. Gather the Tap Interface

root@ahvhost#virsh dumpxml Ebf402c6-3f54-4305-8f3a-266cd7acd6f9 | grep -A7 "interface type"
  <interface type='ethernet'>
      <mac address='50:7b:8d:5e:d2:28'/>
      <target dev='tap1'/>
      <model type='virtio'/>
      <boot order='4'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    <interface type='ethernet'>
      <mac address='50:7b:8d:23:9f:07'/>
      <target dev='tap3'/>
      <model type='virtio'/>
      <alias name='net1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    <input type='tablet' bus='usb'>

4. Get the br2-up uuid. You need to create bond please follow this post AHV Networking

root@ahvhost#ovs-vsctl get port br2-up _uuid

5.Create New Mirror

root@ahvhost#ovs-vsctl \
 -- --id=@m create mirror name=Mirror_Name \
 -- add bridge br2 mirrors @m \
 -- set mirror Mirror_Name select_src_port=884465fb-76da-41d4-aeef-93c1f5642940 select_dst_port=884465fb-76da-41d4-aeef-93c1f5642940 \
 -- --id=@tap# get port tap# \
 -- set mirror Mirror_Name output-port=@tap#


root@ahvhost# ovs-vsctl -- --id=@p get port tap1 -- --id=@m create mirror name=m0 select-all=true output-port=@p -- set bridge br0 mirrors=@m 

After entering this comand you will see uuid


6. Verify Mirror

root@ahvhost#ovs-vsctl list bridge br2
uuid               : fde5cb2d-ed51-4e29-9c3b-86754f617678
auto_attach         : []
controller          : []
datapath_id         : "0000ac1f6b61ada8"
datapath_type       : ""
datapath_version    : "<unknown>"
external_ids        : {acropolis_version="1"}
fail_mode           : []
flood_vlans         : []
flow_tables         : {1=fa1dc504-5491-4b4a-bfe5-0f9262b5439d}
ipfix               : []
mcast_snooping_enable: false
mirrors             : [87a4ba46-6eaa-43c4-8083-b4181d372u7992]
name                : "br2"
netflow             : []
other_config        : {}
ports               : [5235f04d-21b6-40f7-8e3a-5978610b5377, 889504f59-895d-41e3-9ddf-5b0341b1a417, 798833d0-9846-418e-a8c3-028fe79bf4277, 780a4389-3328-4184-a298-7e7df051b27894, y84465fb-66da-41d4-aeef-93c1f5642839]
protocols           : []
rstp_enable         : false
rstp_status         : {}
sflow               : []
status              : {}
stp_enable          : false

Now you can assign two nics in Virtual Machine.

Do the Mirror configuration on Physical Switch also.

Note:- Nutanix is not official releases Mirror Configuration, so not recommended in Nutanix AHV.

Linux KVM supports this configuration, so it works on AHV too.

Please note that Mirror configuration will only work on the Host on which the VM is running. If you do live migration or up-gradation, you have to configure all settings.

run this command before configuring

root@ahvhost#ovs-vsctl clear bridge br1 mirrors
Nutanix TAP
Virtual VM Nic Port

Also, See :- Nutanix VM High availability

Promiscuous mode in VMware

Leave a Reply