配置Hyper-V网卡为混杂( Promiscuous)模式

 

1.Add a VMSwitch Port Feature, where "LAN2" is your virtual switch name.
$A=Get-VMSystemSwitchExtensionPortFeature -FeatureName "Ethernet Switch Port Security Settings"
$A.SettingData.MonitorMode = 2
Add-VMSwitchExtensionPortFeature -ExternalPort -SwitchName LAN2 -VMSwitchExtensionFeature $A

2.Change the PortMirroring Attribute of the VM Networkdevice, where "VMName 06_WinXPMonitor" is your VM name and "00155D016612" is the MAC address of your adapter
Get-VMNetworkAdapter -VMName 06_WinXPMonitor | ? MacAddress -eq '00155D016612' | Set-VMNetworkAdapter -PortMirroring Destination

posted on 2021-09-19 12:04  momingliu11  阅读(816)  评论(0编辑  收藏  举报