LinuxQuestions.org
Help answer threads with 0 replies.
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
 
LinkBack Search this Thread
Old 10-18-2009, 08:50 AM   #1
divot_powell
LQ Newbie
 
Registered: Nov 2007
Posts: 8

Rep: Reputation: 0
Question Internal Hostname Lookup


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
 
Old 10-18-2009, 02:15 PM   #2
sploot
Member
 
Registered: Sep 2009
Location: Phoenix, AZ
Distribution: Gentoo, Debian, Ubuntu
Posts: 121

Rep: Reputation: 27
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.
 
  


Reply

Tags
dhcp, dns


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hostname lookup failure chandrait2004 Linux - Newbie 3 06-23-2011 03:23 PM
Lookup hostname from IP address Geneset Linux - Networking 6 02-11-2011 01:16 AM
how to lookup a hostname of a networked computer otkaz Linux - Newbie 4 06-17-2009 10:21 AM
unable to lookup my hostname via gethostbyname() function fakie_flip Linux - Software 4 09-03-2006 03:52 AM
Odd hostname lookup problem max_sipos Linux - Networking 3 11-15-2004 11:29 AM


All times are GMT -5. The time now is 04:33 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