LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   DHCP autoupdate DNS issue (wrong hostname) (http://www.linuxquestions.org/questions/linux-networking-3/dhcp-autoupdate-dns-issue-wrong-hostname-691962/)

ScottChapman 12-20-2008 07:31 PM

DHCP autoupdate DNS issue (wrong hostname)
 
So, I have setup DHCP to auto-update my DNS including static IP address. Works like a champ.

However, there are some hosts (tivo and HP printer for example) which use their own hostname rather than the one I specify in my DHCP.

For example, in my dhcpd.conf I might have:

host tivo
{ hardware ethernet <yada yada>;
fixed-address 192.168.1.10;
}

But what I get in my hosts file is:
TIVO-24000008057EE7D A 192.168.1.10

How can I get it to register the hostname of my choice over-riding what the client is specifying?

mackdav 12-20-2008 11:18 PM

You should add the option host-name="name" to your reservation; if your dhcpd.conf controls the DDNS name update, you should also include the ddns-hostname and ddns-updates=on directives as so:

Code:

        host cobbler # vmware
        {
                hardware ethernet 00:xx:xx:xx:xx:xx;
                fixed-address 10.0.10.17;
                option host-name="cobbler";
                ddns-updates on;
                ddns-hostname "cobbler";
        }

Note that this will only work if the client is set up to accept a hostname from the dhcp server; some (dumb) appliances will insist on referring to themselves by their hardcoded names.

ScottChapman 12-21-2008 07:23 AM

Thanks. I already have turned on DDNS updates for static IPs, so that is covered.

I will give those two a try and see.

Otherwise, I suppose I can just add aliases...

Any way of doing that?


All times are GMT -5. The time now is 09:05 PM.