I've a network which is mainly Windows: Windows 2008 server (with DNS/DHCP as well as AD), and various mainly Windows machines (servers, XP, 7). I know trying to add few Linux boxes, and can't make them appear on the DNS server.

I'm using Ubuntu 11.04 (both client and server). The Ubuntu boxes are NOT part of the Domain though Samba or anything.

I've seen many conflicting answers on the Internet, including this site: is the registration done by the Linux box or by the DHCP server?

I've tried on the following:

  1. On the Linux box, on /etc/dhcp/dhclient.conf, I had: send host-name "ubuntubox".
  2. Also tried fully qualified domains i.e. send host-name "ubuntubox.mydomain.local (side question: which one is correct?)
  3. On the Windows Server, in the DHCP configuration, right click on the zone -> properties -> DNS tab -> ticked the last checkbox (Dynamically update ...).

Anyway ... nothing helped.

Another side question: Why do I have both /etc/dhcp3 AND /etc/dhcp on my Linux box? Only the latter folder has dhclient.conf (despite common remarks on the web).

Also, is sudo dhclient -r really the equivalent of ipconfig /renew? As far as I can say it does nothing.


after you`ll configure you linux pc

  • for debian: /etc/dhcp/dhclient.conf -> send host-name "yourhostname";

  • for rhel: /etc/sysconfig/network-scripts

Go to you Windows 2008 (r2) server : Server Manager -> DHCP Server -> your server -> IPv4 ->properties. Go to DNS tab and check last option - dynamically update DNS A and PTR records for .... NT 4.0

Then go to Advanced Tab: DNS dynamic updates registration credentials - Credentials, and set credentials from which name DHCP will be updating DNS records. (without this it won`t work) Alexey

  • 3
    Debian now auto-sends /etc/hostname in dhclient.conf. No need to configure it for this to work.
    – AWippler
    Jan 3 '14 at 18:41

There are a couple of ways this can happen; there are pros and cons to each approach.

First is the "simple" way to do it (which just means fewer moving parts); having the ubuntu boxes send DNS update commands to the DNS server. nsupdate is the means for this, it's in the dnsutils package. The major caveat here is that unauthenticated updates will need to be turned on in your DNS zones, which can pose a pretty nasty security risk - names that applications/systems like to use for service discovery ("wpad", "teredo", "puppet") are ripe for the hijacking.

Second option is to configure the DHCP service to inject the records for you. Seems like this is what you were trying to do. Some things to check to make that work the way you're expecting:

  • Make sure the DNS zone has secure dynamic updates enabled
  • Check that you have "Dynamically update DNS A and PTR records for DHCP clients that do not request updates" set
  • Check that you're using the "Always" setting for dynamic registration on the DHCP server
  • Make sure you're sending the DHCP clients a DNS suffix - the DHCP server can't update DNS if it doesn't have a zone to put them in. (the hostname you're sending in your dhclient.conf should be a fully-qualified domain name; that might be why that's not working)

Oh, and assuming your DNS is AD-integrated, don't combine both methods - you'll end up with AD object permissions issues when the DHCP server tries to update something that was already inserted by the host.

  • +1. Point number 4 is especially important. I've seen name registration failures countless times because no DNS suffix was specified on the client side.
    – joeqwerty
    Jun 4 '11 at 1:47

Please check this answer, this will provide a method to add your host to any DNS server. However, I must point out that usually DHCP server register the assigned clients automatically, unless (a) your hostname is incorrect or missing or (b) your DHCP server is not instructed to do so.

Your scope on the DHCP server must have updates enabled.

enter image description here


don't modify the "/etc/dhcp/dhclient.conf" file and let :
send host-name "<hostname>";

just fill the hostname in /etc/hostname :

".mydomain.com" if in DNS A, you have a forward lookup zones called "mydomain.com" (look in DNS Manager on your DNS server)

reboot your computer, you can see in your DHCP that the computer appears with the good name, and after DNS A and PTR update nicely

  • 1
    Better to remove this answer, you will find it written in so many places: hostname is NOT a FQDN and you will be in trouble if you put one there.
    – sorin
    Oct 29 '15 at 15:55

The easiest way is to install samba server on your linux box. By doing this you will be able to ping your linux box using the hostname from any OS.

To install samba:

sudo apt-get -y install samba
  • not so easy when installing in a domain, you'll need to configure Samba to be part of the domain, you'll need a domain correctly configured with valid certificates installed, you'll need to setup kerberos host authentification to allow proper authentication to the domain etc etc. That said for a simple host registration to AD DNS it might be simpler but still definitively more than just "install samba and BOOM magic"
    – Newtopian
    Feb 24 '16 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.