@zhouyy
2017-09-06T09:34:27.000000Z
字数 3094
阅读 558
Azure
定义
域名解析服务,host domain
定义
used to host the DNS records for a particular domain.
To start hosting your domain in Azure DNS, you need to create a DNS zone for that domain name.Each DNS record for your domain is then created inside this DNS zone
parent:{ DNS zone: com[yy.com A xx] ## this is NS(Name Server) record set##at the zone apex (name '@'-root domain) is created automatically with each DNS zone, and is deleted automatically when the zone is deleted (it cannot be deleted separately).}child:{ DNS zone: yy.com[yy.com A xxx] ## itself[hr.yy.com A xx] ## this is NS(Name Server) record set##at the zone apex (name '@'-root domain) is created automatically with each DNS zone, and is deleted automatically when the zone is deleted (it cannot be deleted separately).[ www A mail.yy.com;www.yy.com(fully qualified domain name (FQDN) ) A www.yy.com; ] ## this is a record set; one name to multiple domains}How does a parent zone 'point' to the name servers for a child zone?It does this using a special type of DNS record called an NS record (NS stands for 'name server'). For example, the root zone contains NS records for 'com' and shows the name servers for the 'com' zone. In turn, the 'com' zone contains NS records for 'contoso.com', which shows the name servers for the 'contoso.com' zone. Setting up the NS records for a child zone in a parent zone is called delegating the domain.
| exp | 层级 |
|---|---|
. |
root |
com |
top-level-domain : "COM"、"NET"、"ORG"、"BIZ"、"INFO" |
yy.com |
second-level-domain |
New > Networking > and then click DNS zone

| Setting | Value | Detail |
|---|---|---|
| Name | yy-test-web.net | The name of the DNS zone |
Azure DNS allocates name servers from a pool each time a zone is created.Azure DNS automatically creates authoritative NS records in your zone containing the assigned name servers.
PS:
# The record name "@" is used to refer to records at the top of the zone.$zone = Get-AzureRmDnsZone -Name contoso.net -ResourceGroupName contosoRGGet-AzureRmDnsRecordSet -Name "@" -RecordType NS -Zone $zone
CLI:
az network dns record-set show --resource-group contosoRG --zone-name contoso.net --type NS --name @
In the registrar's DNS management page, edit the NS records and replace the NS records with the ones Azure DNS created.
nslookup -type=SOA partners.contoso.com

2、Delegating sub-domains in Azure DNS
$parent = New-AzureRmDnsZone -Name contoso.net -ResourceGroupName contosoRG$child = New-AzureRmDnsZone -Name partners.contoso.net -ResourceGroupName contosoRG# Retrieve the authoritative NS records from the child zone as shown in the next example. This contains the name servers assigned to the child zone.$child_ns_recordset = Get-AzureRmDnsRecordSet -Zone $child -Name "@" -RecordType NS# Create the corresponding NS record set in the parent zone to complete the delegation. The record set name in the parent zone matches the child zone name, in this case "partners".$parent_ns_recordset = New-AzureRmDnsRecordSet -Zone $parent -Name "partners" -RecordType NS -Ttl 3600$parent_ns_recordset.Records = $child_ns_recordset.RecordsSet-AzureRmDnsRecordSet -RecordSet $parent_ns_recordset
CLI
#!/bin/bash# Create the parent and child zones. These can be in same resource group or different resource groups as Azure DNS is a global service.az network dns zone create -g contosoRG -n contoso.netaz network dns zone create -g contosoRG -n partners.contoso.net