I recently stumbled across a problem with updating my new BIND DNS server.
To maintain security, my DHCP server will perform updates to BIND using a TSIG key. This means my main Zone file is setup to receive updates.
I also have some devices configured on my network with static IP addresses (routers and such), which won't contact DHCP for an IP, and so cannot have their records updated automatically.
Previously I've just gone and put a line in the zone master file and had done with it. After a reboot my DNS failed with the error:
journal rollforward failed: journal out of sync with zone
Bummer. The fix to this is to delete the *.jnl file for that zone and restart BIND, it will rebuild it and everybody is happy. Apart from me. As this is hardly the answer.
The obvious answer is to send a dynamic update to the DNS server in the same manner DHCP would. Using the "nsupdate" tool. Thanks to this article for the pointer.
Basically you need to run (putting in the appropriate TSIG key file name):
nslookup -v -k /etc/named.d/mykey.key
You will be presented with a console and you simply do this:
update add myhost.mydomain 86400 a 192.168.0.100
send
update add 100.0.168.192.in-addr.arpa 86400 ptr myhost.mydomain.
send
Note the trailing dot on the reverse lookup FQDN. This is required.
Type quit to quit!