Friday, March 10, 2017

domain name system - DNS Subdomain delegation issue



(Updated the post with more detailed example)







I have my domain: example.com setup at DNS provider 1. Provider 1 has nameservers:




  1. ns1.dns1.com

  2. ns2.dns1.com



I want to delegate authority for subdomain.example.com to another DNS provider, provider 2, which has nameservers:





  1. ns1.dns2.com

  2. ns2.dns2.com



For this my zone at provider 1 looks like this:



example.com IN NS ns1.dns1.com
example.com IN NS ns2.dns1.com
example.com IN A 127.0.0.1
subdomain.example.com IN NS ns1.dns2.com

subdomain.example.com IN NS ns2.dns2.com


At provider 2 i setup the zone: subdomain.example.com as follows:



subdomain.example.com IN NS ns1.dns2.com
subdomain.example.com IN NS ns2.dns2.com
subdomain.example.com IN A 1.1.1.1
test.subdomain.example.com IN A 1.1.1.2



The test:



# i get a reply (OK here)
dig a subdomain.example.com

# i don't get a reply for this (error)
dig a test.subdomain.example.com



Is this normal ?



Update 2: For command dig a test.subdomain.example.com i get in the result the SOA record of domain example.com.



;; QUESTION SECTION:
;test.subdomain.example.com. IN A

;; AUTHORITY SECTION:
example.com. 86400 IN SOA ns1.dns1.com. hostmaster.example.com. 2011032805 28800 7200 604800 86400


Answer



I'd first make sure you're getting ns1/2.provider-dns.com back as an answer to this query:



dig subdomain.example.com ns


You might also want to check that the zone is loaded on the nameservers to which you've delegated. Check that you get a correct serial number back:



dig @ns1.provider-dns.com subdomain.example.com soa



If that isn't working, check with whomever is running ns1/2.provider-dns.com to make sure your zone is being loaded.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...