Configure Hyper-V NIC in Promiscuous Mode

Hyper-V NIC configured in promiscuous mode allows you to monitor external traffic.

  1. Open PowerShell on your Hyper-V host as an Administrator.

  2. Add Port Monitor Mode Feature to the vSwitch your NNM VM is connected to. You need to replace <vSwitchName> with name/ID of actual vSwitch.

    $A = Get-VMSystemSwitchExtensionPortFeature -FeatureName "Ethernet Switch Port Security Settings"

    $A.SettingData.MonitorMode = 2

    Add-VMSwitchExtensionPortFeature -ExternalPort -SwitchName <vSwitchName> -VMSwitchExtensionFeature $A

    Add-VMSwitchExtensionPortFeature -ExternalPort -SwitchName <vSwitchName> -VMSwitchExtensionFeature $A

  3. Verify that feature is added:

    VMSwitchExtensionPortFeature -ExternalPort -SwitchName <vSwitchName> –FeatureName "Ethernet Switch Port Security Settings"

  4. Change the PortMirroring attribute of the VM Networkdevice. This can also be done using the GUI. Replace <VMNAME> with the name of the NNM virtual machine and <MACAddr> of the NNM VM.

    Get-VMNetworkAdapter -VMName <VMName> | ? MacAddress -eq '<MACAddr>' | Set-VMNetworkAdapter -PortMirroring Destination