Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have configured my nameserver, and I want to test it before letting it go online. So, how could I say that a specific domain (let's say example.com) should be resolve using a specific nameserver (let's say ns.something.com). I expect some local configuration, because I don't want others to use this nameserver, of-course.

share|improve this question

4 Answers 4

  1. If you don't already know the FQDN of the nameserver(s) for example.com, then go to http://www.dnsstuff.com and do a WHOIS lookup to discover the nameservers. Let's assume they are ns1.dns.com and ns2.dns.com.
  2. Using that information, and assuming your new nameserver has IP address 192.168.1.10, add/save this in your C:\Windows\System32\drivers\etc\hosts file on your test machine:

    192.168.1.10 ns1.dns.com ns2.dns.com

  3. Open a command prompt and type ipconfig /flushdns

  4. Using the nslookup command at the command prompt, run some tests against your new nameserver. For example, nslookup www.example.com.

  5. Now look at the output from nslookup. The first pair of lines indicate the nameserver that answered your request and the IP address of that nameserver. It should be the IP address of your new nameserver. The next set of lines will show the name of the machine you asked for (www.example.com) and its IP address or addresses.

  6. Once you are satisfied and completed your testing, remove the entries you added to your hosts file in step 2, then repeat step 3.

share|improve this answer
up vote 1 down vote accepted

nslookup is able to do that. It would go like nslookup -debug example.com ns.something.com

share|improve this answer

The simplest test you can run is just to issue queries directly against the nameserver for some zone you have already setup for testing. If it responds it is most likely all set. Its just a matter of having some test domain out there you can then assign its NS records to point to your new box.

share|improve this answer

The local configuration for overriding specific entries in the name resolution process is the hosts file, which doesn't have the flexibility needed to override a certain part of the DNS lookup process as you're looking for.

Command line tools for domain lookups have the ability to specify a certain server to query against - just use that to verify that your system is responding the way that it's expected to.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.