Skip to contentSkip to conversation

Introducing the OpenVPN Data Channel Offload Windows driver

Openvpn-devel Lev Stipakov 1 participant 2 messages Mar 24, 2021 – May 5, 2021

lore
Share & tools
lore
#0 lore raw

Dear all,

OpenVPN Inc. and I are happy to announce that we've released ovpn-dco-win, which stands for
"OpenVPN Data Channel Offload for Windows". It is a modern Windows driver, which functions
as a virtual network adapter and implements required functionality to handle the OpenVPN data channel.
When using ovpn-dco-win, the OpenVPN software doesn't send data traffic back and forth between user
and kernel space, but operations on payload take place in the Windows kernel. The driver is being developed
using modern frameworks - WDF, NetAdapterCx and DMF. Because of that, the code is easy to read
and maintain. Speed-wise the new driver performs significantly better compared to tap-windows6,
so it should eliminate the main bottleneck which hampers the performance of OpenVPN on Windows.

Source code repository is hosted here: https://github.com/OpenVPN/ovpn-dco-win

Performance numbers below are iperf3 test results conducted on AMD ThreadRipper 3970x
between Hyper-V Windows and Linux guests. Cipher algorithm used is AES-256-GCM.

OpenVPN 2.5 dco-win <-> OpenVPN 2.5 dco-linux: Down
1.74Gbit/s, Up 1.51Gbit/s
OpenVPN 2.5 wintun <-> OpenVPN 2.5 dco-linux: Down
1.20Gbit/s, Up 1.20Gbit/s
OpenVPN 2.5 tap-windows6 <-> OpenVPN 2.5 dco-linux: Down 500Mbit/s, Up 600Mbit/s

Thanks to Arne Schwabe, there is now a beta version of the openvpn-gui client with dco-win support.
Installer could be found here:
https://swupdate.openvpn.net/beta-downloads/win-dco/openvpn-install-dco-preview-Win10.exe
It was built from "dco" branch in Arne's github repo
https://github.com/schwabe/openvpn/tree/dco.
See https://github.com/schwabe/openvpn/blob/dco/README.dco.md for more info about current and general limitations.

To use ovpn-dco-win with openvpn2, add the following lines to the .ovpn profile:

windows-driver ovpn-dco-win
tun-mtu 1428

OpenVPN3 support is in progress and coming soon.

Please note that ovpn-dco-win only works with Windows 10 2004 and newer versions.

Looking forward to feedback and patches!

#1 lore raw

Hello all,

I would like to announce a new version of "ovpn-dco-win"-enabled client. Here are some changes from the previous version:

1) MSI based installer. This makes upgrades from existing installations more smooth, since starting from version 2.5 openvpn has switched to MSI.

- ovpn-dco-win driver is installed only on Windows 10 2004 and
newer, on other versions the driver feature won't be even visible in installer dialog

- (un)installer should correctly handle cases when ovpn-dco-win
adapter is in use. It shuts down openvpn service and, if that doesn't help, prompts to
reboot at the end of (un)installation

- driver is deleted from Windows driver store on uninstallation

2) Fixes to the driver itself:

- control packets from the previous VPN session could be delivered to
a client which has started a new VPN session. This happened in rare cases when control packets were read by the driver from the network and the app hasn't issued read requests

- crypto: when adding a new key, data channel packet-id hasn't been
re-initialized. In some cases this caused VPN session to stop functioning
after key renegotiation

3) The client code is based on the latest version of Arne Schwabe's dco branch (https://github.com/schwabe/openvpn/tree/dco, commit ceefcaf),
which, comparison the previous version, includes deferred authentication improvements, openvpn state machine refactoring and many other nice things.

The signed installation package could be downloaded from
https://build.openvpn.net/downloads/snapshots/OpenVPN-2.6-dco-win-preview-amd64.msi

The driver repo is hosted here: https://github.com/openvpn/ovpn-dco-win

As before, to enable ovpn-dco-win driver, add following options to the ovpn profile:

    windows-driver ovpn-dco-win
    tun-mtu 1428

Please give it a try (since this is a feature preview, avoid installation on production systems) and report your feedback (especially performance improvements if you notice any) to help us get ovpn-dco-win into the next major release.

Signature · 1 line
-Lev