[svlug] Followup -- hostname- in dhcp and ddns

Akbar Ahmed akbar_svlug at yahoo.com
Wed Jan 15 07:54:24 PST 2003


--- Akbar Ahmed <akbar_svlug at yahoo.com> wrote:

I have provide answers to each of my questions
below in the hope that it proves useful to someone.

> 1.) Should the DHCP_HOSTNAME variable in
> /etc/sysconfig/network-scripts/ifcfg-eth0 be set to
> a FQDN or just the hostname portion? 

The DHCP_HOSTNAME is optional, and if used should
be set to the hostname. It is only used by 
the DHCP server to add a PTR record to DNS 
if the fqdn is not set (see below). 
 
> 2.) The dhcpd docs refer to a FQDN value that is
> sent from the client to the dhcp server. Where is
this value set? 

In /etc/dhclient.conf the following lines should be
added:
send fqdn.fqnd "fqdn.example.com";
send fqdn.encoded on;
send fqdn.server-update off;


> 3.) Why does the hostname command use the HOSTNAME
> variable in /etc/sysconfig/network even when
> networking is configured to use dhcp and the
> DHCP_HOSTNAME is set to another value? 

The hostname is set during boot before networking/dhcp
starts (specifically, rc.sysconfig sources the network
file). 

After boot, the hostname command reads 
/etc/host.conf to determine the order for name
resolution. By default, on RH 8.0 the order is
hosts,bind. So, if HOSTNAME is set in
/etc/sysconfig/network, then hostname
returns the value that it finds and stops searching. 

The alternative is to delete HOSTNAME from the network
file and allow the resolver to query dns (the second
option in host.conf) for the hostname. However, this
requires a correct PTR record in DNS, which is what
the fqdn.fqdn variable in step 2 helps to accomplish
(assuming dhcp and ddns is setup correctly). 

Thanks,
Akbar


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the svlug mailing list