LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 03: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, 03:59 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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, 08: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, 08:21 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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



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 7 12-19-2015 01:03 AM
host only networking for "Crunchbang host" "Arch Linux guest" ted9411 Linux - Virtualization and Cloud 3 06-06-2011 08:29 AM
Skip "Installation Method" and "Select Partition" screens using boot options tclappsdba Linux - Newbie 1 11-26-2010 05:31 AM
How do I disable "shutdown" and "restart" options in KDE logout screen for all users? maxgsp Linux - Distributions 1 12-12-2008 03:18 PM
dhcpd.conf "range" spanning address classes? michaelsanford Linux - Networking 2 04-08-2005 05:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:31 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration