Hi. I just setup one of my machines as a DHCP server. I'd like it to handle the hostnames of clients. Don't know if this is an orthodox thing to do (feel free to add your comments :oD). Here's the server's relevant lines of dhcpd.conf: --8<------- ... # Envoyer les noms d'h?tes aux clients use-host-decl-names on; # Adresses statiques host babasse { hardware ethernet 00:0d:61:ae:6b:8f; fixed-address 192.168.1.249; } --8<------- Now the question is: how should the configuration look like on the client side, so the hostname gets effetively fetched from the DHCP server? During the initial install, I assigned hostnames manually to every machine. Cheers, Niki Kovacs
On Sun, 2009-06-28 at 17:38 +0200, Niki Kovacs wrote:> Hi. > > I just setup one of my machines as a DHCP server. I'd like it to handle > the hostnames of clients. Don't know if this is an orthodox thing to doI really don't know if it's "orthodox" or not, but I've been doing it like this for years. ;^>> > (feel free to add your comments :oD). Here's the server's relevant lines > of dhcpd.conf: > > --8<------- > ... > # Envoyer les noms d'h?tes aux clients > use-host-decl-names on; > > # Adresses statiques > host babasse { > hardware ethernet 00:0d:61:ae:6b:8f; > fixed-address 192.168.1.249; > } > --8<-------This config is just about identical to mine.> > Now the question is: how should the configuration look like on the > client side, so the hostname gets effetively fetched from the DHCP > server? During the initial install, I assigned hostnames manually to > every machine.Unless you have modified the DHCP client config, the machine SHOULD get the hostname by default. You can verify this by checking the contents of /var/lib/dhclient/dhclient-eth0.leases to see the data that the client has gotten from the server. Since I let my client machines get all this from DHCP during installation, I'm not completely sure what you need to do to make the manually-assigned hostname go away. I THINK that if you comment out the line for the host's IP address in /etc/hosts the system will use the hostname from DHCP, but I haven't exercised that stuff in years.> > Cheers, > > Niki Kovacs > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos-- Ron Loftin reloftin at twcny.rr.com "God, root, what is difference ?" Piter from UserFriendly
# i do NOT have any kind of use-host-decl-names on; entry. Do you use dnsmasq or dhcpd? # /etc/dhcpd.conf Not sure if a dnsmasq entry would be the same anymore. host babasse { hardware ethernet 00:0d:61:ae:6b:8f; fixed-address 192.168.1.249; option host-name "PutClientHostNameHereNotSureIfItHasToBeSameAsAbove-babasse"; } #Don't remember what happens when a linux client machine has already been configured. #But know for a fact that all pxe booted and live linux booted and Windows Vista and WinXP #machines use the hostname from the dhcpd entry. On Sun, Jun 28, 2009 at 10:38 AM, Niki Kovacs<contact at kikinovak.net> wrote:> Hi. > > I just setup one of my machines as a DHCP server. I'd like it to handle > the hostnames of clients. Don't know if this is an orthodox thing to do > (feel free to add your comments :oD). Here's the server's relevant lines > of dhcpd.conf: > > --8<------- > ... > # Envoyer les noms d'h?tes aux clients > use-host-decl-names on; > > # Adresses statiques > host babasse { > ? hardware ethernet 00:0d:61:ae:6b:8f; > ? fixed-address 192.168.1.249; > } > --8<------- > > Now the question is: how should the configuration look like on the > client side, so the hostname gets effetively fetched from the DHCP > server? During the initial install, I assigned hostnames manually to > every machine. > > Cheers, > > Niki Kovacs > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >