LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux > 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

Tags used in this thread
Popular LQ Tags ,

Reply
 
Thread Tools
Old 10-18-2009, 09:50 AM   #1
divot_powell
LQ Newbie
 
Registered: Nov 2007
Posts: 7
Thanked: 0
Question Internal Hostname Lookup


[Log in to get rid of this advertisement]
Hi,

I manage a small network in my home with a combination of windows and linux hosts. For a while I have simply accessed other pc's using their ip address as linux does not automatically resolve the internal host names with my router. I'm wanting to change this.

I was thinking the way to go about it would be to set up a custom dhcp and dns server on my server to do this, however I would like it not to be static, i.e. when a new host registers with the dhcp server, its hostname is automatically added to the dns entry, and then removed again when the dhcp entry expires (or updated the next time the same hostname reconnects).

Does anyone know how to do this? Or any decent howto's online? Can you recommend anything else instead? I have spent a while trying to find this information but all I can find is how to set up a dhcp server with no name resolution, or a dns server with static name resolution.

Thanks in advance,

Dan
linuxubuntu divot_powell is offline  
Tag This Post ,
Reply With Quote
Old 10-18-2009, 03:15 PM   #2
sploot
Member
 
Registered: Sep 2009
Location: Phoenix, AZ
Distribution: Gentoo, Debian, Ubuntu
Posts: 91
Thanked: 15
Just an idea, I don't know if it will work though. If you are running an open source router firmware, and perhaps even with a closed source firmware that allows telnet, you may be able to run a cron script to pull the current dhcp table from the router on a regular basis. Parse this information and add it into your /etc/hosts file for your machine. Make sure the script can identify your static hosts and your dynamic hosts (those pulled from the cron script.)

Hope this gives you a lead.
macos sploot is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
how to lookup a hostname of a networked computer otkaz Linux - Newbie 4 06-17-2009 11:21 AM
Lookup hostname from IP address Geneset Linux - Networking 5 08-26-2008 06:03 AM
Hostname lookup failure chandrait2004 Linux - Newbie 1 04-02-2008 08:20 AM
unable to lookup my hostname via gethostbyname() function fakie_flip Linux - Software 4 09-03-2006 04:52 AM
Odd hostname lookup problem max_sipos Linux - Networking 3 11-15-2004 12:29 PM


All times are GMT -5. The time now is 05:50 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration