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

Re: Setting hostname with DHCP

* Michael Ash (mash@econs.umass.edu) [031022 15:57]:
> Dear list,
> I have scoured the web and even read the generally helpful
> Chapter 10 - Network Configuration from Debian Reference
> http://www.debian.org/doc/manuals/reference/ch-gateway.en.html,
> but I cannot figure out how to set hostname and domain using
> dhcp.
> On my box, "Linux debian 2.4.18-bf2.4 #1 Son Apr 14 09:53:28
> CEST 2002 i586 unknown," DHCP works fine in that it gets an
> ip address and even an associated name for the computer, but
> "hostname" returns "debian", "hostname -d" returns nothing,
> and "hostname --fqdn" returns "debian".

I can't quite wrap my head around why you'd want to do this; do you
expect your hostname to be changing all the time?  Is this what you
want?  Is there a requirement for the campus network that you use a
hostname assigned by them?  If you use a different dhcp hostname, will
you not get an address?

The way my laptop is set up is pretty much the opposite of what you're
asking to do:  I set my own hostname the regular way, and I also added a
line to me /etc/dhclient.conf:

send host-name "wingnut";

This way, my dhcp client tells the dhcp server that its hostname is
wingnut, instead of somehow asking the dhcp server for a hostname.  This
way, if the dhcp server is set up to do so, I get a dns record set up
for wingnut.  Unless the dhcp server is configured to assign certain
addresses to certain hostnames and it doesn't know anything about
wingnut this works just fine.  This way my hostname is always wingnut;
it doesn't change depending on the whims of a particular site's
(potentially whack) dhcp server.

good times,
http://www.digitalconsumer.org/	Protecting fair-use rights in the digital world

Attachment: signature.asc
Description: Digital signature

Reply to: