localhost or LAN addresses in /etc/hosts

Chris G cl at isbd.net
Tue Dec 16 00:30:10 UTC 2008


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!  :-)

-- 
Chris Green




More information about the ubuntu-users mailing list