You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**vSwitch_Span**|Newly added SPAN virtual switch name |
45
+
|**Ethernet**|Physical adapter name |
46
+
47
+
Learn how to [Create and configure a virtual switch with Hyper-V](/windows-server/virtualization/hyper-v/get-started/create-a-virtual-switch-for-hyper-v-virtual-machines?tabs=powershell#create-a-virtual-switch)
48
+
49
+
### Create a new virtual switch with Hyper-V Manager
34
50
35
51
1. Open the Virtual Switch Manager.
36
52
@@ -48,13 +64,13 @@ Before you start:
48
64
49
65
## Attach a SPAN Virtual Interface to the virtual switch
50
66
51
-
Use Windows PowerShell or Hyper-V Manager to attach a SPAN virtual interface to the virtual switch you'd[created earlier](#configure-a-traffic-mirroring-port-with-hyper-v).
67
+
Use Windows PowerShell or Hyper-V Manager to attach a SPAN virtual interface to the virtual switch you [created earlier](#create-new-hyper-v-virtual-switch-to-relay-the-mirrored-traffic-into-the-vm).
52
68
53
69
If you use PowerShell, define the name of the newly added adapter hardware as `Monitor`. If you use Hyper-V Manager, the name of the newly added adapter hardware is set to `Network Adapter`.
54
70
55
71
### Attach a SPAN virtual interface to the virtual switch with PowerShell
56
72
57
-
1. Select the newly added SPAN virtual switch you'd configured [earlier](#configure-a-traffic-mirroring-port-with-hyper-v), and run the following command to add a new network adapter:
73
+
1. Select the newly added SPAN virtual switch you[created earlier](#create-new-hyper-v-virtual-switch-to-relay-the-mirrored-traffic-into-the-vm), and run the following command to add a new network adapter:
@@ -84,17 +100,25 @@ If you use PowerShell, define the name of the newly added adapter hardware as `M
84
100
85
101
:::image type="content" source="../media/tutorial-install-components/vswitch-span.png" alt-text="Screenshot of selecting the following options on the virtual switch screen.":::
86
102
87
-
1. In the **Hardware** list, under the **Network Adapter** drop-down list, select **Hardware Acceleration** and clear the **Virtual Machine Queue** option for the monitoring network interface.
88
-
89
103
1. In the **Hardware** list, under the **Network Adapter** drop-down list, select **Advanced Features**. Under the **Port Mirroring** section, select **Destination** as the mirroring mode for the new virtual interface.
90
104
91
105
:::image type="content" source="../media/tutorial-install-components/destination.png" alt-text="Screenshot of the selections needed to configure mirroring mode.":::
92
106
93
107
1. Select **OK**.
94
108
95
-
## Turn on Microsoft NDIS capture extensions
109
+
## Turn on Microsoft NDIS capture extensions with PowerShell
110
+
111
+
Turn on support for [Microsoft NDIS Capture Extensions](/windows-hardware/drivers/network/capturing-extensions) for the virtual switch you [created earlier](#create-new-hyper-v-virtual-switch-to-relay-the-mirrored-traffic-into-the-vm).
112
+
113
+
**To enable Microsoft NDIS capture extensions for your new virtual switch**:
## Turn on Microsoft NDIS capture extensions with Hyper-V Manager
96
120
97
-
Turn on support for [Microsoft NDIS Capture Extensions](/windows-hardware/drivers/network/capturing-extensions) for the virtual switch you'd [created earlier](#configure-a-traffic-mirroring-port-with-hyper-v).
121
+
Turn on support for [Microsoft NDIS Capture Extensions](/windows-hardware/drivers/network/capturing-extensions) for the virtual switch you [created earlier](#create-new-hyper-v-virtual-switch-to-relay-the-mirrored-traffic-into-the-vm).
98
122
99
123
**To enable Microsoft NDIS capture extensions for your new virtual switch**:
100
124
@@ -110,7 +134,7 @@ Turn on support for [Microsoft NDIS Capture Extensions](/windows-hardware/driver
110
134
111
135
## Configure the switch's mirroring mode
112
136
113
-
Configure the mirroring mode on the virtual switch you'd [created earlier](#configure-a-traffic-mirroring-port-with-hyper-v) so that the external port is defined as the mirroring source. This includes configuring the Hyper-V virtual switch (vSwitch_Span) to forward any traffic that comes to the external source port to a virtual network adapter configured as the destination.
137
+
Configure the mirroring mode on the virtual switch you [created earlier](#create-new-hyper-v-virtual-switch-to-relay-the-mirrored-traffic-into-the-vm) so that the external port is defined as the mirroring source. This includes configuring the Hyper-V virtual switch (vSwitch_Span) to forward any traffic that comes to the external source port to a virtual network adapter configured as the destination.
114
138
115
139
To set the virtual switch's external port as the source mirror mode, run:
116
140
@@ -124,7 +148,7 @@ Where:
124
148
125
149
| Parameter | Description |
126
150
|--|--|
127
-
|**vSwitch_Span**| Name of the virtual switch you'd[created earlier](#configure-a-traffic-mirroring-port-with-hyper-v)|
151
+
|**vSwitch_Span**| Name of the virtual switch you [created earlier](#create-new-hyper-v-virtual-switch-to-relay-the-mirrored-traffic-into-the-vm)|
128
152
|**MonitorMode=2**| Source |
129
153
|**MonitorMode=1**| Destination |
130
154
|**MonitorMode=0**| None |
@@ -139,6 +163,24 @@ Get-VMSwitchExtensionPortFeature -FeatureName "Ethernet Switch Port Security Set
139
163
|--|--|
140
164
|**vSwitch_Span**| Newly added SPAN virtual switch name |
141
165
166
+
## Configure VLAN settings for the Monitor adapter (if needed)
167
+
168
+
If the Hyper-V server is located in a different VLAN than the VLAN from which the mirrored traffic originates, set the Monitor adapter to accept traffic from the mirrored VLANs.
169
+
170
+
Use this PowerShell command to enable the Monitor adapter to accept the monitored traffic from different VLANs:
0 commit comments