LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-20-2008, 04:17 AM   #1
spindles
Member
 
Registered: May 2005
Location: New Zealand
Distribution: Now Ubuntu 16.04
Posts: 154

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

Any guidance would be gratefully appreciated.
 
Old 03-20-2008, 04:58 AM   #2
beadyallen
Member
 
Registered: Mar 2008
Location: UK
Distribution: Fedora, Gentoo
Posts: 209

Rep: Reputation: 36
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.
 
Old 03-20-2008, 05:44 AM   #3
spindles
Member
 
Registered: May 2005
Location: New Zealand
Distribution: Now Ubuntu 16.04
Posts: 154

Original Poster
Rep: Reputation: 15
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.
 
Old 03-20-2008, 06:31 AM   #4
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
i would setup a local dns server

there is a djbdns update script for dhcpd3 which processes the leases and sets the record accordingly.
 
Old 03-20-2008, 07:32 AM   #5
spindles
Member
 
Registered: May 2005
Location: New Zealand
Distribution: Now Ubuntu 16.04
Posts: 154

Original Poster
Rep: Reputation: 15
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.
 
Old 03-20-2008, 07:39 AM   #6
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
you do the same thing to avoid security issues... read!
 
Old 03-21-2008, 11:35 AM   #7
vpsville
LQ Newbie
 
Registered: Feb 2008
Location: Canada
Posts: 12

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


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
specify encoding method when mounting a local drive benben_shen Linux - Software 3 04-02-2006 04:12 AM
good backup method msound Linux - General 2 10-07-2005 11:58 AM
looking for some good advice pinelands Linux - Newbie 1 05-26-2005 10:30 PM
Good method for deciding partitions? Zaskar Fedora 3 02-22-2005 04:15 PM
Hard drive dying, good backup method cadj Linux - Software 3 12-14-2004 07:28 PM

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

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