Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jun 2009 15:52:42 -0800
From:      Mel Flynn <mel.flynn+fbsd.questions@mailing.thruhere.net>
To:        freebsd-questions@freebsd.org
Cc:        Tim Judd <tajudd@gmail.com>, Peter <fbsdq@peterk.org>
Subject:   Re: /etc/hosts - how does that file work?? - was weird nfs issues.
Message-ID:  <200906081552.43622.mel.flynn%2Bfbsd.questions@mailing.thruhere.net>
In-Reply-To: <ade45ae90906062144m3a08f892ubeef1367dc7f259f@mail.gmail.com>
References:  <5359c8a6e4fc10bf951a7ee095b0d29f.squirrel@webmail.pknet.net> <ade45ae90906062144m3a08f892ubeef1367dc7f259f@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 06 June 2009 20:44:38 Tim Judd wrote:
> On 6/4/09, Peter <fbsdq@peterk.org> wrote:
> > I do not think /etc/hosts does round robin, I always assumed first match
> > wins...DNS/bind I would understand...

It's the same library call: gethostbyname(3) and friends.

> > Why does ping always return the 172.20.6.1 address,
> >  and ftp,nc,ssh,telnet,fetch _always_ uses the 116 address?

Again: client implementation is allowed to pick whichever it wants.


> why are you so hung up on dual IPs for a single host?  would dnsmasq
> provide a solution to dual A records for one resource?

Gotta agree with Tim here. I don't see the point for having two nets on one 
interface. They'll be hard to keep secure with firewall rules if you run the 
same services on them.

> I'll help, when I can.  but forcing this on /etc/hosts is a dead end.

Problem is that nfs and DNS don't work well at all. For nfs best use IP or 
/etc/hosts. One drawback of using DNS with nfs is that if the hostname cannot 
be resolved (network down, typo), one can also not get a console when it goes 
to single user mode [1] and has to reboot via power button.

/etc/fstab is supposed to be static to begin with. It's supposed to provide 
the mountpoints the system can count on, so using IP's for nfs is preferred. 
For the more dynamic nfs mounts, one can use hostnames and use noauto in the 
options column.

[1] http://www.freebsd.org/cgi/query-pr.cgi?pr=128448
-- 
Mel



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906081552.43622.mel.flynn%2Bfbsd.questions>