localhost or LAN addresses in /etc/hosts
Neil Cherry
ncherry at linuxha.com
Tue Dec 16 07:25:36 UTC 2008
NoOp wrote:
> On 12/15/2008 04:30 PM, Chris G wrote:
>> On Mon, Dec 15, 2008 at 01:57:50PM -0800, NoOp wrote:
>>> On 12/15/2008 11:50 AM, Chris G wrote:
>>>
>>>> My /etc/hosts now has:-
>>>>
>>>> 127.0.0.1 localhost.localdomain localhost
>>>>
>>>> 192.168.1.1 vigor 2820n
>>>> 192.168.1.4 home.isbd.net isbd 84-45-228-40.no-dns-yet.enta.net chris.isbd.net
>>>> 192.168.1.5 home
>>>> 192.168.1.6 maxine
>>>> 192.168.1.7 garage
>>>> ... plus more lines.
>>>>
>>>>
>>>> If I say 'host isbd' on the garage system see what happens:-
>>>>
>>>> chris at garage:~$ host isbd
>>>> isbd has address 192.168.1.4
>>>> chris at garage:~$
>>>>
>>>> The garage system has a default /etc/hosts, I've added nothing to it.
>>>>
>>>>
>>>> So it seems to me I'm getting exactly what I need, a DNS system that
>>>> gives me valid LAN addresses for local names.
>>> Question: what happens when the single machine with dnsmasq is
>>> down/off-line etc? Wouldn't you be better off putting the IP's in the
>>> /etc/hosts files of each machine (adjusted accordingly of course)?
>>>
>> Er, the same as happens when the router is down - not much! :-)
>>
>
> Yes, but then you must keep the dnsmasq machine up at all times - what
> ever happend to 'green'... :-)
Well my central server is running my home automation (and everything
else). My DHCP and DNS/Cache runs off the same machine. When it fails
the network is mostly down. I can kick the wrt54g into duty (using
dnsmasq). My current DNS is tinydns. When I admin a new address
I have a few files to update but then again I have a lot more devices
than your average home (I've reserved some 50 addresses). I also use
tinydns/dnscache to block access to certain IP addresses, domains
and/or hosts.
--
Linux Home Automation Neil Cherry ncherry at linuxha.com
http://www.linuxha.com/ Main site
http://linuxha.blogspot.com/ My HA Blog
Author of: Linux Smart Homes For Dummies
More information about the ubuntu-users
mailing list