LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 09-20-2012, 04:53 AM   #1
m4rtin
Member
 
Registered: Sep 2007
Posts: 261

Rep: Reputation: 16
Question "domain-name" and "host-name" options in dhcpd.conf


In dhcpd.conf file one can specify "domain-name" and "host-name":

Code:
host server {
hardware ethernet 00:11:22:33:44:55;
option domain-name "example.net";
option host-name "happyhost";
}
If dhclient requests resources from dhcpd, then "example.net" is written to /etc/resolv.conf file domain and search lines. However, dnsdomainname does not show domain and hostname command or "echo $HOSTNAME" does not show happyhost as an hostname. Could somebody explain this behavior?
 
Old 09-20-2012, 04:59 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
You'll generally only use the hostname if it's from a DHCP request used to boot from. Coming in this far down the boot up process the hostname will have already been set, and you're not going to just trivially change it now.
 
Old 09-20-2012, 09:13 AM   #3
m4rtin
Member
 
Registered: Sep 2007
Posts: 261

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by acid_kewpie View Post
You'll generally only use the hostname if it's from a DHCP request used to boot from.
Could you explain this?


In addition, I found from dhcpd.conf man page:

Quote:
Originally Posted by man dhcpd.conf
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 configure them not to do this.
 
Old 09-20-2012, 09:21 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
well that is a pretty good explanation.

I mean the only time you'd see this have any effect is if it's a PXE based solution
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script: using "select" to show multi-word options? (like "option 1"/"o zidane_tribal Programming 6 03-21-2013 11:35 AM
host only networking for "Crunchbang host" "Arch Linux guest" ted9411 Linux - Virtualization and Cloud 3 06-06-2011 09:29 AM
Skip "Installation Method" and "Select Partition" screens using boot options tclappsdba Linux - Newbie 1 11-26-2010 06:31 AM
How do I disable "shutdown" and "restart" options in KDE logout screen for all users? maxgsp Linux - Distributions 1 12-12-2008 04:18 PM
dhcpd.conf "range" spanning address classes? michaelsanford Linux - Networking 2 04-08-2005 06:19 PM


All times are GMT -5. The time now is 07:24 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration