1

I have a Centos5 server on internet, say srv1.example.com with IP address say 1.1.1.1.
I have changed the A records example.com, www.example.com and ny.example.com to say 2.2.2.2.

I have not restarted BIND since the server hosts zones for other domains too.

The zone file has the $TTL of 86400.

After changing the A records, I tried nslookup, host, dig commands to see if I could get the IP address 2.2.2.2 for example.com, www.example.com and ny.example.com. However, I am still getting the old IP address, 1.1.1.1

I have even flushed dns cache on client pc but no luck.

Can anyone think of anything that might have gone wrong in changing the A records? Or is there any other step that I still have to perform on the server?

  • 1
    Appart the TTL, changes will not apply by magic, you have to restart/reload something. If you don't want to restart bind, did you try "rndc reload" ? – krisFR Dec 12 '13 at 1:43
  • 1
    Also, did you update the serial number? You need to update the serial and reload for Bind to know a file has been changed. – Zoredache Dec 12 '13 at 1:45
  • 1
    You can use named-checkconf and named-checkzone to verify your changes before restarting bind to be sure it will come back up. – Ladadadada Dec 12 '13 at 1:59
  • I have increased the serial number and ran named-checkconf and named-checkzone. named-checkconf echoed 0 and named-checkzone returned OK which I believe that the two commands completed without any error. Server reload successful. Then I performed rndc reload as root. But the ip address is still the old one... – i_ch3ry Dec 12 '13 at 3:02
  • if you used nsupdate to make your changes you wouldn't have this problem. – Red Cricket Dec 12 '13 at 3:59
2

Your changes will not take effect until you:

  1. Increment the serial in your zone file.
  2. Run rndc reload as root.
  • Incremented serial in my zone file and performed rndc reload. Reload was successful but the IP address is still the old one. I flushed dns cache on client pc again but still no luck. – i_ch3ry Dec 12 '13 at 3:07
  • On ubuntu, performed sudo service nscd restart and then ran command host -t A example.com and host -t A ny.example.com but still showing the old IP address. – i_ch3ry Dec 12 '13 at 3:16
  • You didn't query your DNS server directly? – Michael Hampton Dec 12 '13 at 3:22
  • @MichaelHampton I just performed dig @ns1.example.com ny.example.com and it returned the new IP address. Now should I just wait till the TTL expires? – i_ch3ry Dec 12 '13 at 3:30
  • 2
    That's how DNS works. See Why does DNS work the way it does? – Michael Hampton Dec 12 '13 at 3:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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