Configure external network traffic to allow Virtual Network Sensor to monitor data.
Procedure
- On the host machine, access the Hyper-V Manager.
- Verify the virtual switch connecting to the Virtual Network Sensor data port has the connection type set to External network.
- Set the Virtual Network Sensor as the traffic mirror target.
- Right-click the Virtual Network Sensor virtual machine, and select Settings...
- In the settings window, use the navigation bar to go to .
- Under the Port mirroring section, set Mirroring mode to Destination.
- Click Apply, then click OK.
- Access PowerShell.
- Use the following commands to configure the monitor mode of the data
port.The example code uses
Data Switch
as the name of the switch the data port connects to.$DataSwitch = "Data Switch" $extFeature = Get-VMSystemSwitchExtensionPortFeature -FeatureName "Ethernet Switch Port Security Settings" $extFeature.SettingData.MonitorMode = 2 Add-VMSwitchExtensionPortFeature -ExternalPort -SwitchName $DataSwitch -VMSwitchExtensionFeature $extFeature
- Use the following commands to configure the VM VLAN mode of the data
port.These commands are used to set the VLAN ID to be mirrored. The example code uses
VirtualNetworkSensor_0101
as the target VLAN to mirror traffic from.$DataSwitch
is the name of the switch the data port connects to.$VMName = "VirtualNetworkSensor_0101" $DataSwitch = "Data Switch" Get-VMNetworkAdapter -VMName $VMName | ? SwitchName -eq "$DataSwitch" | % { Set-VMNetworkAdapterVlan -VMNetworkAdapter $_ -Trunk -AllowedVlanIdList 1-4094 -NativeVlanId 0 }