Friday 12 July 2013

Updation of dynamic DNS zones with nsupdate utility


 This Document is mainly for updation of Dynamic DNS from DHCP Server. If DNS is being dynamically updated from DHCP Server, static entry in DNS Server by editing files will not be reflected properly. In this scenario we have to update Dynamic DNS from DHCP Server by using nsupdate utility.

Before starting update we should get the DHCP key defined in Dynamic DNS Server configuration. You can find dhcpupdate key in named.conf file in DNS Server.

key "dhcpupdate" {
algorithm hmac-md5;
secret "XXX"
}

I mentioned dhcpupdate key with “XXX”, this value will be different generated by system. So use secret key from configuration file of named.conf.

Now by using following step we can add dynamic forward and Reverse DNS entry from DHCP Server.

1.      Adding Forward Zone Entry:

[root@dhcp named]#  nsupdate
> key dhcpupdate  XXX
>update add jitendrakumar.example.com in 604800 A 10.226.1.201
>send

Here 6048400 is TTL in DNS.

2.      Adding Reverse Zone Entry:

[root@dhcp named]# nsupdate
> key dhcpupdate  XXX
> update add 201.1.226.10.in-addr.arpa  604800 PTR jitendrakumar.example.com
>send

Here 6048400 is TTL in DNS.

3.      If you have to delete any entry, use delete in place of add command.   


2 comments: