Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Aug 2009 14:11:57 +0200
From:      cpghost <cpghost@cordula.ws>
To:        Nerius Landys <nlandys@gmail.com>
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: /etc/rc.d/named dilemma
Message-ID:  <20090822121157.GB2350@epia-2.farid-hajji.net>
In-Reply-To: <560f92640908212137s376f1dc8vaba59618a6b71d67@mail.gmail.com>
References:  <560f92640908212137s376f1dc8vaba59618a6b71d67@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 21, 2009 at 09:37:09PM -0700, Nerius Landys wrote:
> I am trying to figure out why DNS lookups are not possible right after
> the "named" process has been launched (during bootup).

At start, named sends a couple of queries to e.g. root servers. All
this requires the network connection to be already up and running;
and if you're using a firewall, it also needs to be up and ready.
And, more importantly, it requires some time until named is ready
to answer lookups... and in the mean time, you've already launched
other processes who do queries.

I have a similar problem with a little FreeBSD-based home router
running net/mpd5 to connect via PPPoE to a DSL line. Because packages
(and so mpd) start after all system processes, named has problems to
connect to the root servers, pf has problems initializing itself
without ng0 interface, ntpd has problems initializing itself,...
and when mpd finally established the network connection, it is
already too late.

I'd love to change the rc-order of the scripts, so that mpd starts
first, waits until the link is up, and only then starts the other
processes. But until I've found out how to do that the right way,
I wrote a little batch script that gets invoked at link-up, and
that simply restarts all other processes in the order: pf, named,
ntpd, postfix, etc... That's not ideal, but as a kludge, it works
for me.

-cpghost.

-- 
Cordula's Web. http://www.cordula.ws/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090822121157.GB2350>