Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Nov 1999 18:08:00 -0600
From:      Glenn Johnson <gjohnson@nola.srrc.usda.gov>
To:        wincent <wincent@dingoblue.net.au>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Local DNS on LAN Gateway with Multiple PPP Dialup Accounts
Message-ID:  <19991130180800.A5915@symbion.srrc.usda.gov>
In-Reply-To: <B46AA158.1897%wincent@dingoblue.net.au>
References:  <B46A4434.1881%wincent@dingoblue.net.au> <B46AA158.1897%wincent@dingoblue.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 01, 1999 at 09:56:42AM +1030, wincent wrote:

> Having thoroughly demonstrated my newbie-ness by posting to the wrong
> address, I am now resending this email... hopefully I got it right
> this time!
>
> Hi All
>
> This is my first post to the list so please forgive me if my question
> has already been answered... First of all a bit of background:

...snip background...

> So at last we come to my question. The tricky part is that I have
> *two* ISPs. I sometimes use one, sometimes the other. Depending on
> which one I use, the IPs in my "forwarders" option in my named.conf
> need to be different. The question is, what is the best way to switch
> between these configurations?
>
> So far, the best idea I've been able to come up with is to have
> two named.conf files under different names (say "alternate" and
> "default"). When I want to switch to the other configuration I would
> just type:
> 
> ndc stop
> named -b /etc/namedb/named.conf.alternate &

This would work but seems ugly. You could use the 'dumpdb' option of ndc
to save your cache and then reload it upon restart. I am not sure
how that would be done.

> I have no idea whether there is a better way to do this, or if what
> I am doing is Not A Good Thing (TM). The bad thing about the above
> method is that I think the name daemon loses its cache every time it
> is stopped. Is that right? Any way to avoid it? Anyway to change the
> forwarders options without restarting named?

Yes, you lose the cache with a restart. However, you do not really need
the forwarders option in named.conf so you may be better off without
it. Basically, why go to the trouble to get the information from one of
your ISP's nameservers when the information may not be there for long
before you switch to the other ISP and have to rebuild your local cache.

Hope this helps.

-- 
Glenn Johnson
Technician
USDA, ARS, SRRC
New Orleans, LA


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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