View previous topic :: View next topic |
Author |
Message |
mcsky2 Guru


Joined: 25 Aug 2005 Posts: 312
|
Posted: Thu Apr 06, 2006 4:56 pm Post subject: How to obtain hostname with dhcp (solved) |
|
|
Hi,
I use a dhcp server (isc) that can deliver hostname to client.
How can i do that without enter hostname in /etc/conf.d/hostname.
Thanks
Last edited by mcsky2 on Sat Apr 08, 2006 6:41 am; edited 2 times in total |
|
Back to top |
|
 |
subrahmanyan Tux's lil' helper


Joined: 19 Jan 2004 Posts: 149 Location: Grey Havens
|
Posted: Thu Apr 06, 2006 8:32 pm Post subject: |
|
|
Hi, you'll need to modify dhcpd.conf on your DHCP server.
This is probably what you're searching for:
Code: | The get-lease-hostnames statement
get-lease-hostnames flag;
The get-lease-hostnames statement is used to tell dhcpd whether or
not to look up the domain name corresponding to the IP address of
each address in the lease pool and use that address for the DHCP
hostname option. If flag is true, then this lookup is done for all
addresses in the current scope. By default, or if flag is false,
no lookups are done. |
_________________ emerge -C Microsoft |
|
Back to top |
|
 |
mcsky2 Guru


Joined: 25 Aug 2005 Posts: 312
|
Posted: Fri Apr 07, 2006 5:25 am Post subject: |
|
|
I don't think so.
I want that my client(s) receives the hostname automatically.
In my dhcp.conf :
host tartufe {
hardware ethernet 00:0F:EA:44:32:67;
server-name "tartufe.mydomain";
fixed-address 10.0.0.28;
option host-name "tartufe";
} |
|
Back to top |
|
 |
subrahmanyan Tux's lil' helper


Joined: 19 Jan 2004 Posts: 149 Location: Grey Havens
|
Posted: Fri Apr 07, 2006 8:34 am Post subject: |
|
|
I'm afraid that your config file is correct but the DHCP client can't handle this configuration.
Again take a look at dhcpd.conf man page:
Code: | It should be noted here that most DHCP clients completely ignore the
host-name option sent by the DHCP server, and there is no way to con-
figure them not to do this. So you generally have a choice of
either not having any hostname to client IP address mapping that the
client will recognize, or doing DNS updates. It is beyond the scope
of this document to describe how to make this determination. |
Also man page of the client mentions this (man dhcpcd):
Code: | By default dhcpcd will NOT
set hostname of the host to the hostname option received
from DHCP server. |
_________________ emerge -C Microsoft |
|
Back to top |
|
 |
mcsky2 Guru


Joined: 25 Aug 2005 Posts: 312
|
Posted: Sat Apr 08, 2006 6:40 am Post subject: |
|
|
I found :
I add in /etc/conf.d/net
and /etc/conf.d/hostname
|
|
Back to top |
|
 |
|