Fix poor network performance when using Hyper-V external network with Wi-Fi adapter

If you bridge a Wi-Fi adapter to Hyper-V as I do

You may notice a significant drop in upload speed, which makes it difficult to transfer any file out of your computer. This has an effect on the host and your VMs.

More precisely, is the retransmission rate skyrockets, your NIC needs to retransmit many times to send a single packet out.

To fix this, we simply need to disable all offload features for our virtual network adapter.
Is the virtual network adapter on host, NOT the physical network adapter.
You don’t need to change any thing for your physical network adapter.

Fix for Host and Windows VMs

For example, the wifi adapter I use for Hyper-V is
Intel(R) Wi-Fi 6E AX211 160MHz
And the associate virtual network adapter is
Hyper-V Virtual Ethernet Adapter #3

You can check it by using this command
Get-NetAdapter

Next, open Device Manager and open the properties of your virtual NIC, open tab “Advanced”

Disable the following options:

Large Send Offload V1 (IPv4)   # If exist
Large Send Offload V2 (IPv4)
Large Send Offload V2 (IPv6)
# powershell

Get-NetAdapter
Set-NetAdapterAdvancedProperty -Name "vEthernet (Hyper-V Wi-Fi)" -RegistryKeyword "*LsoV1IPv4" -RegistryValue "0"
Set-NetAdapterAdvancedProperty -Name "vEthernet (Hyper-V Wi-Fi)" -RegistryKeyword "*LsoV2IPv4" -RegistryValue "0"
Set-NetAdapterAdvancedProperty -Name "vEthernet (Hyper-V Wi-Fi)" -RegistryKeyword "*LsoV2IPv6" -RegistryValue "0"

That’s it, Your wifi performance should now be back to normal.

Fix for Linux VMs

Create a script file with the following code
/usr/local/sbin/disable-offloading.sh

#!/bin/bash

# Change this to your virtual NIC that is using hosts wifi
INTERFACE="eth0"

ethtool -K $INTERFACE tso off

Run it

sudo chmod +x /usr/local/sbin/disable-offloading.sh
sudo /usr/local/sbin/disable-offloading.sh

And now your VM should have full performance with wifi.

If you want to auto run the script on system starts, you can use rc.local file

echo '#!/bin/bash -e' >> /etc/rc.local
echo '/usr/local/sbin/disable-offloading.sh' >> /etc/rc.local
sudo chmod +x /etc/rc.local

By Eisai