Squid does not cache after DNS server down

Squid does not cache after DNS server down

Post by Alla » Sat, 06 Apr 2002 03:48:18



Hello everyone,

I just installed a SQUID (2.4-stable1) in our group Linux PC which is also a DNS
client(I just did slightly modification).Everything looks fine until
yesterday our DNS server was down .Nobody can use netscape or IE to access
website.
My question is :
from SQUID doc, it said that SQUID can cache webpage which were visited
before. but why we can not visit these webpage which were accessed.(these
webpages should be saved by SQUID,right?)Is there any configuration that I
missed or another reason?

Thank you very much!

 
 
 

Squid does not cache after DNS server down

Post by Jeroen Geilma » Sat, 06 Apr 2002 05:43:35


Somewhere around Thu, 04 Apr 2002 20:48:18 +0200, Allan was seen engraving
on a handy slab of granite:

Quote:> Hello everyone,

> I just installed a SQUID (2.4-stable1) in our group Linux PC which is
> also a DNS client(I just did slightly modification).

Confusing. EVERY computer that is in any way connected to the Internet is
a DNS client; you should not need to reconfigure anything other than
putting the proper IP addresses in /etc/resolv.conf.

Quote:>Everything looks
> fine until yesterday our DNS server was down .Nobody can use netscape or
> IE to access website.

*What* do you mean here ?

a) the DNS "client" you were referring to earlier is actually the DNS
*server* that went down, or
b) the "client" could not access the DNS server and so could not access
any web sites (which is logical but can be overcome), or
c) the websites you mention are yours, and nobody in the world could
access them while the DNS server was down, which is pretty obvious...

I'm betting on a combination of a) and c), but it's anybody's guess...

Quote:> My question is :
> from SQUID doc, it said that SQUID can cache webpage which were visited
> before. but why we can not visit these webpage which were
> accessed.(these webpages should be saved by SQUID,right?)Is there any
> configuration that I missed or another reason?

There are a *lot* of configuration options for Squid - have you read the
whole squid.conf file ?

Three possibilities off the top of my head :
1. Almost ALL (popular) websites use *some* kind of dynamic content these
days,  so that means web access is necessary even with Squid running as a
cache - but I'm sure you can force it to cache dynamic content as well..

2. The web site, NOT Squid, decides how long a page should be cached - if
the expiration on a page is set to 3 seconds it will always be re-fetched!
But the same as for (1) should apply here (I think).

3. You have configured Squid to use lookups (especially reverse lookups!)
for everything - even checking to see if the cached page is the most
current; this would effectively mandate the 24/7 availability of a name server

But Squid uses its own DNS lookup daemon, unlinkd, which is not dependent
on any locally running nameserver - as I said earlier, the only thing you
should need to configure is your DNS addresses in /etc/resolv.conf.

Quote:

> Thank you very much!

Well, HTH !

BTW, if you have successfully installed *a* squid in a network, what I
wan to know is : where did you put the other 9 tentacles ?

--
Confusion is my middle finger.

 
 
 

Squid does not cache after DNS server down

Post by Alla » Sun, 07 Apr 2002 05:35:57


I hope I can set up this Squid server as a Cache server,because there is
always problem with our DNS server and external network(which are not belong
to our group).
I wish this Squid server can cache some webpages when  DNS server and
External network down.So people can still access cached webpages.
 
 
 

Squid does not cache after DNS server down

Post by Edward L » Sun, 07 Apr 2002 13:32:31



> I hope I can set up this Squid server as a Cache server,because there is
> always problem with our DNS server and external network(which are not belong
> to our group).

Have your own cacheing DNS server.  That would save some bandwidth as well.
Quote:> I wish this Squid server can cache some webpages when  DNS server and
> External network down.So people can still access cached webpages.

 
 
 

1. caching dns appears to not cache.

    I'm running  an old version of bind, 8. something. I've set it up to do
caching as stated in the DNS howto . the named.conf is as follows:

// Config file for a caching only name server.

options {
        directory "/var/named";
        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
listen-on { 10.0.0.1; 127.0.0.1; };
allow-query {
     10.0.0.0/8;
     127.0.0.1;

        // query-source address * port 53;
        forward first;
        forwarders {
           ISP.DNS.ONE.ONE;
           ISP.DNS.ONE.TWO;
        };

//
// a caching only nameserver config
//
zone "." {
        type hint;
        file "root.hints";

zone "0.0.127.in-addr.arpa" {
        type master;
        file "pz/127.0.0";
However, I see dns requests going to our isp and comming back at all times.
computer 1 pings google.com . named does the resolve dance (which I am
watching with tcpdump) and sends the reply to computer 1.

computer 2 pings google.com. named does the resolve dance and sends the
reply to computer 2.

Shouldn't named just reply to computer 2 with the cached ip's ??

joseph

2. in sendfile() under high load

3. How to test Squid is doing the Caching

4. Problem w/ Forking on Linux

5. DNS cache gone when pppd goes down

6. Intel i740 AGP video card

7. Possible to config DNS to go to 2nd WWW server when primary server down?

8. SPICE

9. caching-only name server not caching.

10. Setting up a caching DNS server in Linux - can't find server name

11. OK of main DNS server,probs on caching server

12. squid not always using cache

13. Squid not caching