Windows: Configure DNS Server, Suffix, FQDN
DNS Server:
- Registry
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces
- 通过GUI
-
Group Policy
Local Computer Policy => Computer Configuration => Administrative Templates => Network => DNS Client => DNS servers
Primary DNS Suffix: To be precise: the "Primary DNS Suffic" policy requires reboot to be applied.
- sysdm.cpl => Computer Name => Change => More
- gpedit.msc => Local Computer Policy => Computer Configuration => Administrative Templates => Network => DNS Client => Primary DNS Suffix
DNS Suffix:
- GPO group policy object
- Registry
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
-
GUI
Dnscache Service:
terminology:
顶级域名(top-level domain):国际域名中的最后一部分,就是在最后一个点后面的字符部分。比如说这个域名叫wpad.corp.contoso.com.cn,那么顶级域名就是".cn"。顶级域名分成两类,国家顶级域名和通用顶级域名。国家顶级域名是两个字母的国家的缩写。cn是中国的顶级域名,而us是美国的国家顶级域名。通用顶级域名是3个字母(或更多)组成的.com,.net,.org等域名。你可以参考网上的顶级域名列表。
主DNS后缀(Primary DNS Suffix):用于放在主机名后,完整域名(FQDN)是由<主机名〉.<主DNS后缀>构成的。缺省情况下的主DNS后缀等于主机所加入的域。但是可以配置成其他的值。比如一台叫:mailserver的主机加入了corp.contoso.com.cn域,那么主机的完整域名就是:mailserver.corp.contoso.co.cn,其主DNS后缀就是corp.contoso.co.cn。
第二级域名(second-level domain):实在顶级域名“之下”或是左边的域。在前一个例子中,wpad.corp.contoso.com.cn中的com就是二级域名。
illume:
Primary DNS Suffix & Connection-s'pecific DNS Suffix:
ipconfig /all
Powershell:
get-netadapter
get-netipaddress
clear-dnsclientcache
FQDN:
invoke-command -ScriptBlock {hostname}
$sysinfo=Get-Wmiobject -class win32_computerSystem
$fqdn="{0}.{1}" -f $sysinfo.name,$sysinfo.domain
"$env.computername.$env:userdnsdomain"
(get-wmiObject win32_computerSystem).name+"."+(get-wmiObject win32_computerSystem).domain
[system.net.dns]::getHostEntry([string]$env:computerName).hostName
[system.net.dns]::getHostEntry([string]"localhost").hostName