isc-dhcpd server, HOSTNAME

Pieter Donche Pieter.Donche at ua.ac.be
Sat May 9 13:09:58 UTC 2009


On Fri, 8 May 2009, Derek Ragona wrote:

> At 09:42 AM 5/7/2009, Pieter Donche wrote:
>       FreeBSD7 with isc-dhcp30-server.
>       It hands out an IP address, OK,
>       but the BASH environment variable HOSTNAME is not set. Why?
>
>       (A DNS server is active on the network and can succesfully be
>       queried from a FreeBSD bash command (nslookup or host) to see
>       the hostname associated with the IP-address)
> 
> 
> I have a later version of dhcpd running on FreeBSD without problems.  If
> your DHCP scope is setup correctly and your DHCP clients are getting
> settings that work, I'm not sure what is the problem you are experiencing. 
> You hostname variable can be set in the startup bash (or any other shell's
> startup scripts) scripts on login.

Of course, it can be set by oneself in a startup script, 
but this should not be needed...

In fact when I switch the network cable of that DHCP client PC
to another subnet, where another DHCP server is active (don't know 
on what OS that DHCP server runs but certainly not FreeBSD), then 
HOSTNAME is set.

My DHCPclient is triple boot (SUSE linux, FreeBSD7 and Windows), 
With network cable again in first network (with the FreeBSD7/isc-dhcp-server
DHCP server) when I boot into SuSE Linux, the HOSTNAME variable is set ... 
So it is the combination FreeBSD7-amd64/isc-dhcp30-server as a DHCP server
that does not set HOSTNAME ...   I am puzzled why ...

overview:

case DHCP server             DHCP client       HOSTNAME env. var.

  1   isc-dhcp30-server       FreeBSD7-i386     not set
       on FreeBSD-amd64
  2   isc-dhcp30-server       SuSE Linux 10.3   set
       on FreeBSD-amd64

  3   some DHCP server        FreeBSD7-i386     set
       on unkown serverOS
  4   some DHCP server        SuSE Linux 10.3   set
        on unkown serverOS

I compared from case 1 and 3 all variables that are set after a 
login (unix set command, and with a login using standard .profile and 
.bashrc startup scripts as created when creating a new user via useradd), 
and the only difference is precisely this HOSTNAME env. variable not 
being set (and of course some of them derived from that env. var.)

>
>         -Derek
> 
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>


More information about the freebsd-questions mailing list