Any advice please, a good method for local name resolution
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Any advice please, a good method for local name resolution
Hope this will be a simple question - just thought I should get some advice before installing daemons that I don't really understand.
I have been reading a lot about networking but I still don't know what is the minimum requirement to have name resolution for boxes on my local network - so that, for e.g., I can ping other local boxes by name.
(Using Kubuntu Feisty Fawn.)
Setup:
My router/gateway gets a dynamically assigned IP adress from my ISP.
My router/gateway issues IP addresses on my local network. (Six computers.)
I have no Apache running - I'm not trying to serve out my own domain or pages.
I don't have a domain name set on the local network, just the boxes with their IPs and names on the 10.0.0.0 network.
Samba is working OK.
Seems to me I could manually add the other host names to etc/hosts.
But the lease time of the addresses from the router will run out eventually and then the names and addresses will be incorrect.
Not a huge problem I suppose, I could always set the router to lease them out for 10,000 days. Let me know if that's the best option.
The kind of thing I'm worried about here is, e.g., there are rsync backups happening across the network, relying on IP addresses: then the router issues new IP addresses, and before we realise it many days have gone by with no backups.
BTW, Samba gets host names (or maybe they are netbios names) - e.g. smbtree lists the other boxes by name, not by IP adddress. Evidently nmbd is able to get the names from somewhere. I don't understand that.
(A few weeks ago smbtree was listing by IP address but not name, but the router was suspect. Since failed and replaced.)
Other set-up info.
bind - not installed, just some bind bits that Kubuntu installed by default, e.g. bind9-host.
nsswitch - not installed,
nscd - not installed,
dnsutils - installed
dhcdbd - running
dhclient3 - running
NetworkManagerD - running
avahi - installed -- but it seems to me that's a separate matter.
One reason I'm asking here is that previously, when I was using Suse9, I think I installed most of the above (trying to get Samba to work nicely) and it was possibly not a good idea. Samba never did work consistently.
Another reason is that when trying to troubleshoot Samba step-by-step, one of the first requirements is that TCP/IP is set up correctly and you can ping other boxes by name.
Another reason is that everything I read about this seems to be aimed at people with static IP addresses, or who are running Apache, or wanting to make their Linux box their DNS server etc.
Well the simplest way is with static ip addresses. You should be able to do that either on each machine, or just have the router send out the same ip for each machine. Then just use /etc/hosts. It'll only take 10 minutes max for all the machines. Faster than getting any new software installed and configured properly.
Failing that, what sort of router is it? Can you put some sort of third party firmware on it? OpenWRT or DD-WRT? If so, then just use dnsmasq as a name and dhcp server. In fact, you could use dnsmasq on one of your linux boxes instead. Probably easier than setting up bind.
Thanks for your advice.
I can see how static IPs could be much more convenient.
In the past I tried to use static IPs but couldn't get them to play nice with the router. Mind you, that was with Suse and Yast, which I had already allowed to fire up all kinds of daemons. Networking was probably getting into a mess.
Might try again this weekend, step-by-step.
Thanks Nathanael,
Just did some quick reading about djbdns -- made me think that BIND can be a security threat in the hands of newbies and a thing to avoid.
For this scenario, setting static leases on the router would do the trick. An /etc/hosts file may not even be necessary as some routers will figure out the hostname from the static IP lease in its internal table.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.