Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
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.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.