I'm on a Windows 10 laptop, connected to an Open VPN endpoint in AWS, with the following setting in the config file:
dhcp-option DOMAIN domain2.com
And it looks like the suffix is being added to the search suffix list, as when I check the DNS Search Suffix List:
PS C:\> Get-DnsClientGlobalSetting
I can see the suffix listed:
UseSuffixSearchList : True
SuffixSearchList : {domain1.co.uk, domain2.com, domain3.box}
UseDevolution : True
DevolutionLevel : 0
However, when I try to resolve the hostname without the suffix specified:
PS C:\> Resolve-DnsName -Name hostname1
It doesn't resolve:
Resolve-DnsName : hostname1 : DNS name does not exist
At line:1 char:1
+ Resolve-DnsName -Name hostname1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (hostname1:String) [Resolve-DnsName], Win32Exception
+ FullyQualifiedErrorId : DNS_ERROR_RCODE_NAME_ERROR,Microsoft.DnsClient.Commands.ResolveDnsName
Yet I know that should work, as when I resolve the hostname with the suffix manually specified:
PS C:\> Resolve-DnsName -Name hostname1.domain2.com
It successfully resolves:
Name Type TTL Section IPAddress
---- ---- --- ------- ---------
hostname1.domain2.com A 300 Answer 10.10.10.234
hostname1.domain2.com A 300 Answer 10.10.11.197
Why isn't the suffix "domain2.com" being used to resolve "hostname1" to the IP addresses, as is possible when the suffix is added manually? This should be hapenning automatically, shouldn't it?
I've tried running
ipconfig /flushdns
And I've tried restarting, but it still won't take. What's happening here?