LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-06-2013, 07:02 PM   #1
blither
Member
 
Registered: Dec 2002
Location: Ohio
Distribution: LFS, Ubuntu
Posts: 157

Rep: Reputation: 15
DHCP Register Multiple Hostnames/Subhostnames with Router


Is there a way to have a computer register multiple hostnames or subdomains when registering a computer through DHCP?
 
Old 01-08-2013, 10:11 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Your question needs some clarification. What do you mean by 'have a computer register multiple hostnames'? Normally, when using DHCP, a client computer acquires its hostname from the DHCP server. I don't know of any way that a computer can have more than one hostname.
Same deal with what you mean by 'registering a computer through DHCP'. A client host simply acquires IP and other information from a DHCP server host. The only 'registration' performed is the possible entry of a lease in a table maintained by the DHCP server, for the purpose of consistent & persistent use of the IP for a particular host. No other host or service makes use of that lease record.

It is possible to have multiple DNS entries for a single IP. That is not related to DHCP.

--- rod.
 
Old 01-08-2013, 11:46 AM   #3
blither
Member
 
Registered: Dec 2002
Location: Ohio
Distribution: LFS, Ubuntu
Posts: 157

Original Poster
Rep: Reputation: 15
It may be my lack of understand as to how a router adds DNS entries. I thought it tapped the DHCP requests.

Basically I am looking for a way to have a computer get multiple DNS entries in the router without manually typing them into the router myself.

Is this possible?
 
Old 01-08-2013, 02:20 PM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
I think there is some system or convention that uses the DHCP config file as a single point of entry for DNS configuration. I wouldn't mind finding some more details on that for my own purposes, and if I do find something, I'll post it back here. However, I still see a possible problem with the use of multiple hostnames in a DHCP config file (assuming ISC DHCP, or compatible), and that seems like the most likely roadblock to me.

--- rod.
 
Old 01-11-2013, 12:28 AM   #5
blither
Member
 
Registered: Dec 2002
Location: Ohio
Distribution: LFS, Ubuntu
Posts: 157

Original Poster
Rep: Reputation: 15
Out of curiosity what would those road blocks be?

And then for the sake of it would something like this be possible if I turned one of my boxes into a dns server and did not use the router?

Using bind can entries be entered through the command line or a service call rather than manually changing a configuration file?

Is there a place to hook for the DHCP client after the computer has received its ip?
 
Old 01-11-2013, 08:38 AM   #6
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
The DHCP server configuration has entries that are like
Code:
    option host-name        yourhostname;
I don't think it is permitted to use multiple hostnames or multiple entries. The hostname is basically an alias for 'localhost', and isn't seen outside of the local host. There are scripts that use hostname and the hostname file, and I assume that these expect exactly one name to be supplied. I would anticipate that adding additional names would probably cause these to break.

DNS entries are separate from hostnames. You can have multiple DNS entries pointing to one IP and this is conceptually separate from the local hostname. I do not know the mechanics of starting/stopping/modifying the DNS server.
On all Linux hosts that I've used (using ISC DHCP) there is a system of hooks that launch scripts triggered by various DHCP client events. You can potentially use and modify these to serve your own special purposes. I have done so, and found it not too complex. See the man pages 'dhclient' and 'dhclient-script' for details.

--- rod.
 
  


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
multiple hostnames Pauly Linux - General 3 08-26-2014 07:15 AM
Router does not know my hostnames bogzab Slackware 4 01-17-2009 01:13 PM
SUSE 9.1 DHCP using hostnames Genjix Linux - Networking 6 02-04-2005 06:01 PM
multiple hostnames explorer Fedora 1 01-12-2005 12:46 PM
Internal DHCP and Hostnames jeffxor Linux - Networking 2 11-26-2004 01:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:26 AM.

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