Caching nameserver does not cache!

Caching nameserver does not cache!

Post by Bruce Phipp » Sun, 20 Aug 2000 04:00:00



As a first step in learning DNS I have implemented a caching-only nameserver
on my Linux laptop.
Bind 8.2 RedHat6.0(2.2.5)

Setting up the config files was pretty simple  for a caching-only
nameserver. named starts OK at boot up with no major errors.
How/where is the cache, though? It does not seem to be working.

If I try nslookup ibm.com
the computer goes online and retrieves the information.
If I then go off line and try
nslookup ibm.com

again, the computer dials out and repeats the lookup process. Shouldn't it
retrieve the info. from its cache?
Generally, implementing this simple DNS nameserver seems to cause my demand
ppp0 link to go up at boot time and at other times when I would expect it to
use local cache information,

Bruce

 
 
 

Caching nameserver does not cache!

Post by Ken Johnso » Sun, 20 Aug 2000 04:00:00



> As a first step in learning DNS I have implemented a caching-only nameserver
> on my Linux laptop.
> Bind 8.2 RedHat6.0(2.2.5)

> Setting up the config files was pretty simple  for a caching-only
> nameserver. named starts OK at boot up with no major errors.
> How/where is the cache, though? It does not seem to be working.

> If I try nslookup ibm.com
> the computer goes online and retrieves the information.
> If I then go off line and try
> nslookup ibm.com

> again, the computer dials out and repeats the lookup process. Shouldn't it
> retrieve the info. from its cache?
> Generally, implementing this simple DNS nameserver seems to cause my demand
> ppp0 link to go up at boot time and at other times when I would expect it
> to use local cache information,

It should...   if you're actually referring to it.   Make sure that
127.0.0.1 is the first nameserver listed in /etc/resolv.conf

K.

 
 
 

Caching nameserver does not cache!

Post by Bruce Phipp » Sun, 20 Aug 2000 04:00:00


Quote:>It should...   if you're actually referring to it.   Make sure that

127.0.0.1 is the first nameserver listed in /etc/resolv.conf<

I think my resolv.conf is set up OK :

search mylocaldomain.com
nameserver    127.0.0.1
nameserver    ISP#1
nameserver    ISP#2

Brcue

 
 
 

Caching nameserver does not cache!

Post by Ken Johnso » Sun, 20 Aug 2000 04:00:00



> >It should...   if you're actually referring to it.   Make sure that
> 127.0.0.1 is the first nameserver listed in /etc/resolv.conf<

> I think my resolv.conf is set up OK :

> search mylocaldomain.com
> nameserver    127.0.0.1
> nameserver    ISP#1
> nameserver    ISP#2

> Brcue

Then you should be seeing:


Default Server:  localhost
Address:  127.0.0.1

Quote:> www.ibm.com

Server:  localhost
Address:  127.0.0.1

Non-authoritative answer:
Name:    www.ibm.com
Addresses:  204.146.81.99, 204.146.80.99, 198.133.17.99, 198.133.16.99

Is "localhost" your default server?

K.

 
 
 

Caching nameserver does not cache!

Post by mrmahr.. » Sun, 20 Aug 2000 04:00:00


On Sat, 19 Aug 2000 14:45:12 GMT, Ken Johnson



>> >It should...   if you're actually referring to it.   Make sure that
>> 127.0.0.1 is the first nameserver listed in /etc/resolv.conf<

>> I think my resolv.conf is set up OK :

>> search mylocaldomain.com
>> nameserver    127.0.0.1
>> nameserver    ISP#1
>> nameserver    ISP#2

>> Brcue

>Then you should be seeing:


>Default Server:  localhost
>Address:  127.0.0.1

>> www.ibm.com
>Server:  localhost
>Address:  127.0.0.1

>Non-authoritative answer:
>Name:    www.ibm.com
>Addresses:  204.146.81.99, 204.146.80.99, 198.133.17.99, 198.133.16.99

>Is "localhost" your default server?

>K.

Also, could it be possible that pppd is taking down bind with it when
it disconnects?  A caching nameserver will only hold it's cache as
long as named keeps running.  It doesn't store anything to the
harddrive, so at each reboot, or restart of named it will lose it's
information and you'll have to rebuild the cache.

-----

After many hours of trying and praying (I converted to 7 different religions over the course of an hour. None of them had Linux tech support)

--Dru Lee Parsec from a post made on linuxnewbie.org message boards

 
 
 

Caching nameserver does not cache!

Post by Bruce Phipp » Sun, 20 Aug 2000 04:00:00


Quote:>It doesn't store anything to the

harddrive, so at each reboot, or restart of named it will lose it's
information and you'll have to rebuild the cache.<

So, its no good for me to run a caching nameserver on a laptop, then?
Every time I reboot, I have to rebuild DNS lookup information from scratch.

Looks like I have run into an issue caused by running a server OS which
should be on 24x7 on a laptop computer?

Bruce

 
 
 

Caching nameserver does not cache!

Post by Bruce Phipp » Sun, 20 Aug 2000 04:00:00


Ken,

I get the info. you listed OK, so my config files seem to be correct.

Its just that the results are wiped out if I reboot my laptop.
Maybe I should stick to hosts files, but I'd like to experiment with DNS on
my home network.

Bruce

 
 
 

Caching nameserver does not cache!

Post by mrmahr.. » Mon, 21 Aug 2000 04:00:00


On Sat, 19 Aug 2000 19:49:05 +0100, "Bruce Phipps"


>>It doesn't store anything to the
>harddrive, so at each reboot, or restart of named it will lose it's
>information and you'll have to rebuild the cache.<

>So, its no good for me to run a caching nameserver on a laptop, then?

Not if you shut it down frequently, no.  I mean, it won't cause any
harm, but it won't really help you much, either.

Quote:>Every time I reboot, I have to rebuild DNS lookup information from scratch.

>Looks like I have run into an issue caused by running a server OS which
>should be on 24x7 on a laptop computer?

Well, Linux is very well suited for many applications besides serving.
It makes a great workstation for developing, graphics, sound, etc.
About the only thing it doesn't do very well is games, really.  And
we're starting to charge ahead in that finally.  

Back to your DNS problem, though.  Is your laptop your only sytem?  If
you have access to even an old 486 (Although you have to watch this.
I have a 486DX that won't dial up because the UART is incompatible)
then you could use that for a dialup router.  Then leave it on all the
time running ipchains, bind, and diald (optional) and hook your laptop
to it.  I wonder sometimes about diald.  Personally I never got it to
work, and besides who wants to wait for the system to dial up when you
could already be up and running?  I have an AMD 200 that I'm using for
a gateway system, amoung other things, that is on a 56k dial up
connection and I just wrote a keep alive script for it.  I average 5
days or so uptime before I get disconnected, then just reconnect and
I'm good for another 5 days :)  The system also runs Bind as a
cahching nameserver and squid to cache objects.  Frequently viewed
sites are up almost before you enter the URL. ;-)

Quote:>Bruce

-----

After many hours of trying and praying (I converted to 7 different religions over the course of an hour. None of them had Linux tech support)

--Dru Lee Parsec from a post made on linuxnewbie.org message boards

 
 
 

Caching nameserver does not cache!

Post by Bruce Phipp » Mon, 21 Aug 2000 04:00:00


Thanks for your reply.

I mainly use my Win95/Linux dual boot laptop as a learning machine. I'm not
really prepared to leave any of my other machines on 24x7 just for learning
purposes.
Anyway, after having another look at the DNS HowTo -- it threw me a bit at
first because it mentions named.boot -- I have managed to get a DNS server
up and running for my local home network.

So I'm able to learn up on SOA records etc. without doing too much damage...

Bruce