Configuring a Solaris 10 DHCP client to register with a Windows Server 2003 DNS server
Written by: Mark Wilson
Last week, I wrote about configuring a hostname for a Solaris 10 DHCP client. Alan Thompson very kindly left a comment on that post about using DHCP to set the hostname on the network (i.e. in the DNS) and I’m pleased to say that it works a treat on my Windows network.
I have a Windows Server 2003 server which acts as my domain controller, DNS server and DHCP server. DHCP is configured to update DNS (always dynamically update DNS A and PTR records, discard them on lease deletion, and to do this for clients that do not request updates) and this was working well for my Windows clients but although my Solaris client (laptop3) had been retrieving IP information from the DHCP server, the DHCP console showed no name for the lease (and so couldn’t update DNS).
By following Sun’s instructions for enabling a Solaris client to request a specific hostname, DHCP was able to register the client’s name in DNS, using the fully qualified domain name as set in the DHCP scope options (option 015 DNS Domain Name).
I tested this using the nslookup laptop3 command, which returned:
Server: dnsserveripaddress
Address: dnsserveripaddress#53
Name: laptop3.domainname
Address: laptop3ipaddress
It’s worth pointing out that Sun’s instructions are not quite correct for Solaris 10 x86, as step 1 is not necessary (the comments in the /etc/default/dhcpagent file explain that, by default, the DHCP agent will try to request the hostname currently associated with the interface performing DHCP); however the other steps were spot on (add inet <em>hostname</em> to /etc/hostname/interface, flush cached DHCP data using pkill dhcpagent and rm /etc/dhcp/ <em>interface</em>.dhc, then reboot), meaning that my Solaris client now participates in my Windows network name resolution.
Posted: 14:49 on Friday 20 January 2006 under DNS, Solaris, Windows Server 2003.
Comments: 5
RSS (for comments on this post only)Share This
Comments
Comment from Anonymous
Time: Thursday 6 September 2007, 14:02
Couldn’t get this to work – any ideas why not ?
Comment from Wes
Time: Friday 28 September 2007, 18:41
Didn’t work me either … I followed the URL to the Sun article and performed the steps. Upon reboot I am still unable to ping my machine by DNS name or nslookup. My Solaris machine is seeing itself at the correct hostname but the DNS entry did not get created.
Comment from Mike
Time: Tuesday 14 July 2009, 1:44
Hi,
I am having a problem of setting up a virtual machine of Solaris 10. The problem is DHCP client on Solaris, and the DNS server is Windows 2003. It is in the office’s inner network.
When I set up the DHCP client to request for the full-qualified hostname: ” solaris-test1.lan.com”, the DNS actually recorded a mess of hostname + domain names.
zhy3@:~$ nslookup 10.5.212.123
Server: 128.221.204.74
Address: 128.221.204.74#53
124.221.6.11.i-ddr.arpa name = solaris-test1.yy.com32lan.yy.com32edm.yy.com32web.yy.com32inn.yy.com.
With SUSE 10, I have discovered a “stupid method” to handle this problem. I can manually change the file: /etc/sysconfig/network/dhcp, and fix the key word “DHCLIENT_HOSTNAME_OPTION=.”.
However, my stupid method does not work in Solaris, because Solaris does not have a file letting you to fix the DHCLIENT_HOSTNAME_OPTION.
Thank you for your help,
Mike


Write a comment
Please note the rules for comments and the privacy policy and data protection notice. I'm sorry but, because not everyone sticks to the rules, I've had to implement some spam prevention measures - if you're experiencing difficulties leaving a comment, please let me know.