D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] /etc/hosts

 

On Fri, 7 Sep 2012, paul sutton wrote:

On 07/09/12 12:27, Gordon Henderson wrote:
On Fri, 7 Sep 2012, paul sutton wrote:

I just need to sync the file across the network now of course. Once the
list is complete.

Avoiding doing this is *exactly* what DNS was invented for )-:

So how does my netbook know where everything is, (e.g raspbrry pi) when
its not listed in the local /etc/hosts file

I don't have a dns server which I am guessing you suggest i need so 1
computer to hold /etc/hosts for each computer on the network

I am on;y doing this so I don't have to remember the ip addresses, if I
want to ssh in the pi from the netbook surely i need to have   ip
raspberrypi in the netbooks /etc/hosts file

And there lies the issue - sort of catch-22... Microsoft solved it though, and you can use their way too, but it means running some sort of samba of every node... Or you arrange for your router to run DNS and inject the hostnames it gets from dhcp into it's local DNS server (don't most routers do that these days anyway?)

However, once past a certian size, distributing a hosts file becomes problematic, however these days you could use GIT or setup rsync to fetch it from one 'master' keeper of /etc/hosts.

I actually run external DNS because I'm too lazy to setup split views - e.g. see what IP address you get from yakko.drogon.net - that's my worstation...

But if your netbook is always going to be on your LAN when you want to use your other PCs, etc. then it could run bind, or some other DNS server, then you keep the zone file on your netbook, and arrange the other devices to use your netbook as their DNS server (in /etc/resolv.conf, or you arrange the DHCP server to give the IP address of your netbook as the DNS server)

The issue then is that using another device to talk to a 3rd device on the LAN will require your netbook to be on to do the name to numbers translation...

Gordon

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq