Dynamic DNS allows you to configure DHCP to just hand out IP Addresses and the generic kernel to download and then your workstation uses the hostname it has been given by the WORKSTATION_NAME attribute to have the IP Address it just received bound to that hostname in the DNS server.
Note: From this point on you need to be logged in as root. I am also assuming you have downloaded our latest distribution and have extracted it.
To allow Dynamic DNS to be used, the program nsupdate must exist and you must have the following Attributes defined in your [Default] section of the lts.conf file or in LDAP:
DNS_DAEMON_HOST=IP Address of the server that processes the Dynamic DNS requests from the workstation and contacts the DNS Server.
DNS_DAEMON_PORT=23456(The Default port for the workstation to connect to the daemon at.)
DYNAMIC_DNS_DOMAIN_NAME=domain (This defines the domain you are part of. For us that is zelda.pcxperience.com. Leave off the leading period.) This must be the zone you modify in your DNS configuration file otherwise Dynamic DNS updates will not succeed.
Then in each workstations settings defined by their MAC Address, have the attribute WORKSTATION_NAME=hostname (without the domain). When booting the workstation, if these attributes are set then the workstation will contact our Dynamic DNS daemon at the specified host and port and send it the hostname configured in it's section. The DYNAMIC_DNS_DOMAIN_NAME will be tacked onto the end of the hostname in the format of hostname.DYNAMIC_DNS_DOMAIN_NAME.
During the booting process, if the following [Default] Attributes are configured, /etc/resolv.conf will be created:
DNS_SERVER=IP Address of the DNS Server for the workstation.
DNS_SEARCH_PATH=List of domains to search through (Ex. zelda.pcxperience.com pcxperience.com).
To Configure DHCP on the Server to work for Dynamic DNS
Edit/etc/dhcpd.conf (RedHat installation) to have a pool of IP's that your workstations will use. This pool needs to define the routers, domain-name-servers, and domain-name for the workstations to use and should also allow unknown clients.
Then you define the filename that specifies the kernel image to download and also the next-server which specifies where it should go to get that kernel from.
If you already have DHCP configured and had defined host sections for each workstation, you should remove them if you are going to use Dynamic DNS so that you actually are using Dynamic DNS to map the hostname to the IP Address and also to alleviate the maintenance that this requires anytime a workstation is added, removed or gets a different NIC.
Don't forget to restart DHCP after making these changes.
For more information on how to configure a DHCP Server see the HOWTO in /usr/doc/HOWTO/mini/DHCP (RedHat Specific)
To Configure Dynamic DNS on the Server
First on your DNS server you need to modify /etc/named.conf (Here I am assuming the location in a RedHat installation and using Bind 8+) and add the following line to each zone you want to allow Dynamic DNS updates to work in:
allow-update { IP Address; };
The IP Address given must be the IP Address of the Server that our Dynamic DNS Daemon will be installed on. If this is the same as the DNS Server, enter it's IP Address. The ; after the IP Address is important! Run /usr/sbin/ndc restart to restart the DNS Server and make the changes go into affect. Look at /var/log/messages to verify that no errors occurred.
For more information on how to configure a DNS Server see the DNS and BIND book by Paul Albitz & Cricket Liu, published by O'REILLY. ISBN 1-56592-512-2. Or look at the DNS-HOWTO that should be in /usr/doc/HOWTO if you installed the documentation that came with your Linux Distribution.
To Configure the Dynamic DNS Daemon on the Server
Note: The Dynamic DNS Daemon requires Perl to run. You may have to modify where the location of perl is if not in /usr/bin/perl.
Now on the server that you specified in the DNS_DAEMON_HOST attribute, copy dns_ltsp from /dns, in our distribution, to /usr/local/sbin. Copy dns_ltspd to /etc/rc.d/init.d (RedHat Specific again). Make sure that both files have permissions of 0775 and are owned by root, group of root.
Next cd to /etc/rc.d and run chkconfig --add dns_ltspd. This should add our daemon to the appropriate run levels. Then run /etc/rc.d/init.d/dns_ltspd start to start our daemon. The daemon will create a log file called ltsp_log in /var/log which keeps track of when it was started, stopped and when clients connected to it and what info they gave. To stop the daemon use dns_ltspd stop or a kill pid. If you kill with a -9, the log file will not indicate when the daemon died.
Here DNS_SERVER would be set to 192.168.1.2 and DNS_SEARCH_PATH and DYNAMIC_DNS_DOMAIN_NAME would be set to zelda.pcxperience.com. next-server 192.168.1.5 is our LTS server.
Sample DNS Configuration file
--------------------
zone "zelda.pcxperience.com" {
notify yes;
type master;
file "named.zelda.pcxperience.com";
allow-update { 192.168.1.1; };
};
--------------------
Here DNS_DAEMON_HOST would be set to 192.168.1.1 and as long as 23456 is not already being used by another program on the server, DNS_DAEMON_PORT would be set to 23456.
[00:12:34:56:78:90] # Dummy MAC Address
WORKSTATION_NAME=test1 <snip> - Removed other necessary items.
--------------------
Notes
In answer to a question we received asking why we were not using the ddns option of ISC DHCP 3.0 and instead doing our own thing is because we are simplifying your DHCP administration work and so DHCP no longer knows the hostname of the workstation. Our daemon creates the name to IP and IP to name mappings and uses the nsupdate program (provided by bind) to actually do the Dynamic DNS updates. As far as we are aware, this is the only way to do this.
Index
Copyrighted by PC Xperience, Inc., 2000.