LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   dhcp hostname .... (https://www.linuxquestions.org/questions/linux-networking-3/dhcp-hostname-123223/)

phoeniXflame 12-06-2003 07:46 AM

dhcp hostname ....
 
hiya, just noticed that my slack laptop (only linux CLIENT host running on this network) doesnt seem to by supplying my dhcpd server on my obsd gateway with a hostname when it requests a lease ? ...

Slack laptop lease ...

lease 192.168.2.31 {
starts 6 2003/12/06 14:23:09;
ends 0 2003/12/07 02:23:09;
hardware ethernet xx:xx:xx:xx:xx:21;
uid xx:xx:xx:xx:xx:21;
}

An example of a lease to a windows machine on the network ...

lease 192.168.2.30 {
starts 6 2003/12/06 14:22:00;
ends 0 2003/12/07 02:22:00;
hardware ethernet xx:xx:xx:xx:xx:52;
uid xx:xx:xx:xx:xx:52;
client-hostname "foo";
}

as a result, I'm unable to ping or resolv hostname.dns.suffix, anyone know how to fix this so it does supply one ?

zaphodiv 12-06-2003 11:36 AM

Setting a domain line with the suffix in /etc/resolv.conf might make local names work

from man resolv.conf
domain Local domain name. Most queries for names within
this domain can use short names relative to the
local domain. If no domain entry is present, the
domain is determined from the local host name
returned by gethostname(); the domain part is taken
to be everything after the first `.'. Finally, if
the host name does not contain a domain part, the
root domain is assumed.

phoeniXflame 12-06-2003 12:56 PM

thx, but I think you've missunderstood, the laptop doesnt seem to be sending its hostname to the dhcp server when it requests a dhcp lease, this means, that because all the machines also use the machine which provides the dhcpd as their dns server, none of them can resolve the ip to a hostname, because the dns server doesnt know it

zaphodiv 12-06-2003 02:44 PM

On slackware 8.1 it's in /etc/rc.d/rc.inet1

# Edit these values to set up your first Ethernet card (eth0):
IPADDR="127.0.0.1" # REPLACE with YOUR IP address! was 127.0.0.1
NETMASK="255.255.255.0" # REPLACE with YOUR netmask!
# Or, uncomment the following lines to set up eth0 using DHCP:
USE_DHCP=yes
# If your provider requires a DHCP hostname, uncomment and edit below:
#DHCP_HOSTNAME="CCHOSTNUM-A"

Edit as necesary

phoeniXflame 12-06-2003 05:51 PM

yes, I know how to set it up to use dhcp and how to set its hostname, I want to know how to get it to tell the dhcp server its hostname, as it doesnt seem to be ........

zaphodiv 12-06-2003 09:19 PM

Hmm how about this

man dhcpcd

-h <hostname>
specifies a string used for the hostname option
field when dhcpcd sends DHCP messages. Some DHCP
servers, notably those used by @Home Networks,
require the hostname option field containing a spe-
cific string in the DHCP messages from clients.

phoeniXflame 12-07-2003 11:12 AM

no, that is already defined in the inet1 script and inet1.conf files


All times are GMT -5. The time now is 08:53 AM.