Changes between Initial Version and Version 1 of Ticket #399, comment 7


Ignore:
Timestamp:
03/22/16 16:34:35 (8 years ago)
Author:
maglub
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #399, comment 7

    initial v1  
    1 Hi,
    2 
    3 I can reproduce this issue, which in my case show the symptom (even if openvpn is started as administrator) that DNS resolution is not properly working, and it took me a while to figure out what is going on. The issue is reproducible on Windows 7, Windows 8, and Windows 10.
    4 
    5 The root cause is that the TAP device is not the primary interface, as can be confirmed by checking the interface "Ethernet" compared to "Ethernet0". The TAP device gets an automatic interface metric, which is higher than Ethernet0, and even if the DNS is set on the Ethernet device, windows will only use the dns settings from Ethernet0.
    6 
    7 Show the interface metric:
    8 
    9 {{{
    10 netsh interface ip show config
    11 
    12 Configuration for interface "Ethernet"
    13     DHCP enabled:                         Yes
    14     IP Address:                           10.99.0.6
    15     Subnet Prefix:                        10.99.0.4/30 (mask 255.255.255.252)
    16     InterfaceMetric:                      1
    17     DNS servers configured through DHCP:  10.20.0.5
    18                                           10.20.0.6
    19     Register with which suffix:           Primary only
    20     WINS servers configured through DHCP: None
    21 
    22 Configuration for interface "Ethernet0"
    23     DHCP enabled:                         Yes
    24     IP Address:                           172.16.41.132
    25     Subnet Prefix:                        172.16.41.0/24 (mask 255.255.255.0)
    26     Default Gateway:                      172.16.41.2
    27     Gateway Metric:                       0
    28     InterfaceMetric:                      10
    29     Statically Configured DNS Servers:    172.16.41.2
    30     Register with which suffix:           Primary only
    31     WINS servers configured through DHCP: 172.16.41.2
    32 }}}
    33 
    34 If your TAP device has an "InterfaceMetric: 20", you will need to set the device order.
    35 
    36 Start Control Panel, search for the word "adapter", click "View network connections", right click on "Ethernet", "IPv4"->Advanced, uncheck Automatic metric and set the metric to i.e 1.
    37 
    38 You can also, if your TAP ethernet adapter is named "Ethernet" use the following command in a cmd window started as Administrator:
    39 
    40 {{{
    41 netsh interface ipv4 set interface Ethernet metric=1
    42 }}}
    43 
    44 Once the interfacemetric is set properly, I can use the right dns servers.