[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: static ip to dhcp conversion -- getting a hostname

John Schmidt <jaschmidt@uofu.net> writes:

> I am using dhcp3-client to pull the ip number and other assorted
> information.  However, I can't get a hostname returned from the dhcp
> server.

It may not be sending one, since most clients don't care what their
hostname is.  Use a script to use the "host" command to pull the name
associated with the IP and put it in any config files which need it,
and restart any services which need to be restarted.  (Applications
generally don't care what the hostname is, so you won't be killing
user apps.)

This is really a fairly common setup.  As I mentioned, Windows and Mac
don't generally really care what the hostname associated with their IP
is.  Few applications care.  So DHCP servers just hand out IPs, and
most apps which need a hostname can do the reverse lookup.  Unix is
different in that it generally assumes a hardcoded hostname somewhere.

Alan Shutko <ats@acm.org> - I am the rocks.
If I were a landing thruster, where would I be? --Ambassador Londo.

Reply to: