How to Enable Dynamic DNS Updating for DHCP Clients
Note - Be aware that dynamic DNS updates are by nature a security risk.
By default, the Solaris DNS daemon (in.named) does not allow dynamic updates. Authorization for dynamic DNS updates is granted if the requesting host's IP address is assigned to the allow-update keyword in the appropriate zones of the named.conf configuration file on the DNS server system. No other security is provided. You must carefully weigh the convenience of this facility for users against the security risk created when you enable dynamic DNS updates.
At the DNS server, edit the /etc/named.conf file as root.
Find the zone section for the appropriate domain and add the DHCP server's IP addresses to the allow-update keyword.
For example, if the DHCP server resides at addresses 10.0.0.1 and 10.0.0.2, a named.conf file for the dhcp.domain.com zone would be modified as follows:
zone "dhcp.domain.com" in { type master; file "db.dhcp"; allow-update { 10.0.0.1; 10.0.0.2; }; }; zone "10.IN-ADDR.ARPA" in { type master; file "db.10"; allow-update { 10.0.0.1; 10.0.0.2; }; };
Note that allow-update for both zones must be enabled to allow the DHCP server to update both A and PTR records on the DNS server.
On the DHCP server, start DHCP Manager.
Choose Modify from the Service menu.
The Modify Service Options dialog box opens.
Select Update DNS Host Information Upon Client Request.
Specify the number of seconds to wait for a response from the DNS server before timing out, then click OK.
The default value should be adequate. If you have timeout problems, you can increase the value later.
Click the Macros tab and ensure that the correct DNS domain is specified.
The DNSdmain option must be passed with the correct domain name to any client that expects dynamic DNS update support. By default, DNSdmain is specified in the server macro, which is used as the configuration macro bound to each IP address.
Set up the DHCP client to specify its host name when requesting DHCP service.
If you use the Solaris DHCP client, see "How to Enable a Solaris Client to Request Specific Host Name". If your client is not a Solaris DHCP client, see the documentation for your DHCP client for information about how to do this.
How to Enable a Solaris Client to Request Specific Host Name
On the client system, edit the /etc/default/dhcpagent file as root.
Find the keyword REQUEST_HOSTNAME in the /etc/default/dhcpagent file and modify it as follows:
REQUEST_HOSTNAME=yes
If there is a comment sign (#) in front of the keyword, remove the #. If the keyword is not present, insert it.
Edit the /etc/hostname.interface file on the client system and add the following line:
inet hostname
where hostname is the name you want the client to use.
As root, type the following commands to have the client perform a full DHCP negotiation upon rebooting:
# pkill dhcpagent # rm /etc/dhcp/interface.dhc # reboot
The DHCP server makes sure that the host name is not in use by another system on the network before the server assigns it to the client. Depending how it is configured, the DHCP server may update name services with the client's host name.
Customizing DHCP Service Performance Options
You can change options that affect the performance of the DHCP service. These options are described in the following table.
Table 10-1 Options Affecting DHCP Server Performance
The following procedures describe how to change these options.
How to Customize DHCP Server Performance Options (DHCP Manager)
To change the number of BOOTP relay agents a request can pass through, specify a different Maximum Number of Relay Agent Hops.
To have the DHCP server verify that an IP address is not in use before it offers the address to a client, select Detect Duplicate IP Addresses.
To have the DHCP server read dhcptab at specified intervals, select Reload dhcptab Every n Minutes, and type the number of minutes for the interval.
To change the length of time the server holds an IP address open after it makes an offer, type the number of seconds in the field Cache Offers for n Seconds.
Select Restart Server if it is not already selected.
Click OK.
How to Customize DHCP Server Performance Options (Command Line)
If you change options with this procedure, the changed options affect only the current server session. If the DHCP server system reboots, the DHCP server starts with the settings specified during server configuration. If you want settings to apply to all future sessions, you must make changes using DHCP Manager.
Become superuser on the DHCP server system.
Type the following command:
# /etc/init.d/dhcp stop # /usr/lib/inet/in.dhcpd options
where options are any of the following:
-h relay-hops
Specifies the maximum number of relay agent hops that can occur before the daemon drops the DHCP/BOOTP datagram.
-n
Disables automatic duplicate IP address detection. This is not recommended.
-t dhcptab_rescan_interval
Specifies the interval in minutes that the DHCP server should use to schedule the automatic rereading of the dhcptab information.
-o seconds
Specifies the number of seconds the DHCP server should cache the offers it has extended to discovering DHCP clients. The default setting is 10 seconds.
For example, the following command sets the hop count to 2, disables duplicate IP address detection, sets the rescan interval to 30 minutes, and sets the offer time to 20 seconds.
# /usr/lib/inet/in.dhcp -h 2 -n -t 30 -o 20