Generating DNS A & PTR Records for DHCP Range
So you think it would be nice to have all your DHCP range of IPs map to hostnames... something like...
10.0.0.101 = dhcp101.foo.com
10.0.0.102 = dhcp102.foo.com
10.0.0.103 = dhcp103.foo.com etc etc
...but cannot be bothered to type them all in to your zone files? Well why not use the $GENERATE directive?
Stick the likes of the following at the end of your zone file...
$GENERATE 101-199 dhcp$ IN A 10.0.0.$
And the following at the end of the domain's reverse zone file to get corresponding PTR records...
$GENERATE 101-199 $ IN PTR dhcp$.foo.com.
Also works for CNAME records!
NB. You will be unable to use the Server Admin GUI to modify DNS records after entering a $GENERATE directive. If you add it at the end of your zone file then you will be able to view other records in the GUI but do NOT hit save button!



Comments