Failure to configure TAP device under Windows
I installed OpenVPN on Windows 7 64-bit using openvpn-install-2.3.2-I003-x86_64.exe and ported the OpenConnect VPN client¹ to use the TAP device.
It created a TAP device as part of the installation, named 'Local Area Connection 3'. Attempting to configure IP addresses on this device fails thus:
C:\> netsh interface ip set address "Local Area Connection 3" static 10.0.0.1 255.0.0.0 Element not found.
I was able to configure the IP addresses using the Control Panel GUI, and managed to get things working at least for Legacy IP. If I attempt to configure IPv6 the same way, it tells me that it needs to reboot to assign an IPv6 address to the interface (yay, Windows!), and then when it comes back up still has no IPv6 address. Repeating causes another reboot and the same behaviour.
But although I can make it pass packets with manual configuration, 'netsh' never works on this device.
I can find no clue what the 'Element not found' error actually means, or why it happens. Is it a known problem with the TAP driver, or with Windows networking?
If I create a *new* TAP device using the 'Add a new TAP virtual ethernet[sic] adapter' menu option (after manually running it as Administrator because it doesn't work out of the box), I *can* use netsh to configure the new one — at least for Legacy IP. IPv6 still fails with 'Element not found'.
On another Windows 7 machine, it all worked fine.
I am not particularly familiar with Windows — is this just the kind of unreliable behaviour one normally expects with it, and not worth mentioning? Or is there some bug here that we could actually deal with?
Signature · 3 lines
dwmw2 ¹ http://www.infradead.org/openconnect/
Hi,
Quoted 3 lines · David Woodhouse
I am not particularly familiar with Windows ??? is this just the kind of unreliable behaviour one normally expects with it, and not worth mentioning? Or is there some bug here that we could actually deal with?
It actually *should* work just fine.
I've never used the control panel to set up IPv6 addresses, but using netsh worked nicely for me (and OpenVPN) - look into the openvpn sources to see the necessary invocations.
We had our share of issues if tap adapter names included non-7bit-characters, but that was completely different to what you are describing.
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...Quoted 2 lines · Gert Doering
It actually *should* work just fine.
Thanks for the response.
Quoted 3 lines
I've never used the control panel to set up IPv6 addresses, but using netsh worked nicely for me (and OpenVPN) - look into the openvpn sources to see the necessary invocations.
Yeah, that's where I'd looked (and vpnc's vpnc-script-win.js, since OpenConnect is designed to spawn an identical vpnc-script with identical environment variables rather than reinventing that particular wheel).
There isn't a problem with the command line. If I change 'Local Area Connection 3' to 'Local Area Connection 4', the same command line works.
If I change it to a name that doesn't exist, I get a relatively sane error. If I change it in other ways to break it, I get other errors that make at least a little bit of sense. But the command that *should* work, on just the *first* interface that was created, is failing with 'Element not found'.
On a Linux system I'd be able to work out what was happening and fix the issue. but with Windows I'm stuck. I know Windows tends to be horribly unreliable like this — if it's just an unlucky coincidence that it happened on the first Windows system on which I was testing my nascent OpenConnect Windows support, I can live with that. I just wanted to check whether it was something that other people were seeing.
Quoted 2 lines
We had our share of issues if tap adapter names included non-7bit-characters, but that was completely different to what you are describing.
Right. These just have the default names. I have yet to contemplate the true horror of the Windows so-called "Unicode" support.
(And speaking of character set support, are you aware you're replying in the us-ascii charset, so the U+2014 emdash in my original mail turned into three question marks in your citation?)
Signature · 1 line
dwmw2