Server 2012 TAP adapter problem acquiring IP

This forum is for general conversation and user-user networking.
Post Reply
wahlfeld
OpenVpn Newbie
Posts: 1
Joined: Tue Dec 01, 2015 11:18 pm

Server 2012 TAP adapter problem acquiring IP

Post by wahlfeld » Tue Dec 01, 2015 11:24 pm

Hi there,

I am having a problem with a VPN provider's client software on my Windows Server 2012 R2 machine. I'm using TAP-Windows 9.21.1 and have two adapters in use: LAN adapter and the TAP adapter. I have NAT on the TAP adapter set to public and NAT on the LAN adapter set to private. I also have IPv4 routing and remote access server turned on. (let me know if you need any other details)

The issue seems to be that TAP adapter will incorrectly receive an IP address. The software will send the DHCP info to the TAP adapter:

Code: Select all

Set TAP-Windows TUN subnet mode network/local/netmask = 192.168.200.0/192.168.200.4/255.255.255.0 [SUCCEEDED]
Wed Dec 02 09:53:30 2015 Notified TAP-Windows driver to set a DHCP IP/netmask of 192.168.200.4/255.255.255.0 on interface {8C95CC8B-FD84-4DCE-A2AA-61DEE4B560DA} [DHCP-serv: 192.168.200.254, lease-time: 31536000]
But the TAP adapter will either revert to the previously sent DHCP info (192.168.200.8 for example) if it had connected successfully earlier, OR, the TAP adapter will not have an IP at all:

Code: Select all

Ethernet adapter VPN Adapter:
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : TAP-Windows Adapter V9
   Physical Address. . . . . . . . . : 00-FF-8C-95-CC-8B
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   Autoconfiguration IPv4 Address. . : 169.254.227.226(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :
   DNS Servers . . . . . . . . . . . : 8.8.8.8
                                       8.8.4.4
   NetBIOS over Tcpip. . . . . . . . : Enabled
The error message on software says:

Code: Select all

Warning: route gateway is not reachable on any active network adapters: 192.168.200.1
...
Initialization Sequence Completed With Errors 
If I close the software and disable/enable the TAP adapter, then repeat the above, it connects successfully. However, when I connect to another server the errors above occur again. For example I successfully to server A in which the TAP adapter received 192.168.200.5, but then when I tried to connect to server B the TAP adapter received 192.168.200.5 when it should have received 192.168.200.2.

Code: Select all

Set TAP-Windows TUN subnet mode network/local/netmask = 192.168.200.0/192.168.200.2/255.255.255.0 [SUCCEEDED]
Wed Dec 02 10:05:21 2015 Notified TAP-Windows driver to set a DHCP IP/netmask of 192.168.200.2/255.255.255.0 on interface {8C95CC8B-FD84-4DCE-A2AA-61DEE4B560DA} [DHCP-serv: 192.168.200.254, lease-time: 31536000]
...
Initialization Sequence Completed With Errors 

I cannot find any solutions on the internet and there's no issues at all on my Windows 8 machine. Does anyone using openvpn on Windows Server have these issues?

caribic
OpenVpn Newbie
Posts: 2
Joined: Thu Feb 15, 2018 7:43 am

Re: Server 2012 TAP adapter problem acquiring IP

Post by caribic » Thu Feb 15, 2018 7:58 am

Hello everybody,

I have a similar problem with server 2008. My TAP adapter receive no IP-Address and no routing information (i checked this with "ipconfig" and "route print" command) but in the openvpn log show this follow line:

Thu Feb 15 08:46:53 2018 open_tun
Thu Feb 15 08:46:53 2018 TAP-WIN32 device [LAN-Verbindung 2] opened: \\.\Global\{1FEFE625-84F5-4057-BFF2-9C3B9810DAA9}.tap
Thu Feb 15 08:46:53 2018 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.144.0.22/255.255.255.252 on interface {1FEFE625-84F5-4057-BFF2-9C3B9810DAA9} [DHCP-serv: 10.144.0.21, lease-time: 31536000]
Thu Feb 15 08:46:53 2018 Sleeping for 5 seconds...
Thu Feb 15 08:46:58 2018 Successful ARP Flush on interface [18] {1FEFE625-84F5-4057-BFF2-9C3B9810DAA9}
Thu Feb 15 08:46:58 2018 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Thu Feb 15 08:49:03 2018 Warning: route gateway is not reachable on any active network adapters: 10.144.0.21
Thu Feb 15 08:49:03 2018 env_block: add PATH=C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem

If I disable and enable the TAP-Adapter in the adapter-settings during the vpn connect, than it works.

OpenVPN run with administrator rights and the firewall is disable. I have also test it with delay and sleep command. Nothing helps. Can anyone help me? Thanks a lot!

caribic
OpenVpn Newbie
Posts: 2
Joined: Thu Feb 15, 2018 7:43 am

Re: Server 2012 TAP adapter problem acquiring IP

Post by caribic » Thu Feb 15, 2018 8:14 am

... if i restart the DHCP-Client Service than it works also...

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 5574
Joined: Fri Jun 03, 2016 1:17 pm

Re: Server 2012 TAP adapter problem acquiring IP

Post by TinCanTech » Thu Feb 15, 2018 12:31 pm

caribic wrote:
Thu Feb 15, 2018 7:58 am
Notified TAP-Windows driver to set a DHCP IP/netmask of 10.144.0.22/255.255.255.252 on interface {1FEFE625-84F5-4057-BFF2-9C3B9810DAA9} [DHCP-serv: 10.144.0.21, lease-time: 31536000]
OpenVPN requires the Windows DHCP client service.

JonatasPrust
OpenVpn Newbie
Posts: 2
Joined: Thu Mar 01, 2018 1:16 pm

Re: Server 2012 TAP adapter problem acquiring IP

Post by JonatasPrust » Thu Mar 01, 2018 1:35 pm

TinCanTech wrote:
Thu Feb 15, 2018 12:31 pm
caribic wrote:
Thu Feb 15, 2018 7:58 am
Notified TAP-Windows driver to set a DHCP IP/netmask of 10.144.0.22/255.255.255.252 on interface {1FEFE625-84F5-4057-BFF2-9C3B9810DAA9} [DHCP-serv: 10.144.0.21, lease-time: 31536000]
OpenVPN requires the Windows DHCP client service.
And, how to solve the problem?

noxesp
OpenVpn Newbie
Posts: 1
Joined: Thu Feb 07, 2019 8:16 pm

Re: Server 2012 TAP adapter problem acquiring IP

Post by noxesp » Thu Feb 07, 2019 8:24 pm

Check if the dhcp media sense option is disabled in the ipv4 global configuration:
command line: "netsh interface ipv4 show global"

If is disabled, enabled it:
command line: "netsh interface ipv4 set global dhcpmediasense=enabled"

Post Reply