I am finding it difficult to understand how to get the best from the internal
DNS functions in squid.
I am trying to achieve a number of goals with squid. Two of these are:
1) Set up a squid 2.3 to work well when I am not connected to the internet.
and,
2) Persuade a squid 1.2 to disgorge cached files.
It is not clear to me why squid is so bothered about looking up the IP address
for a requested URL. To my mind if the URL exists in the cache it could be
delivered to a User Agent (if necessary with a freshness reservation).
However I accept that squid does lookup up hostnames.
The internal dns system appears to have two serious problems.
1) It cannot look up unqualified names, exempli gratia 'squid-12',
which is a perfectly good hostname for one of my machines whose
FQHN is squid-12.local.domain.com . Since this machine
is used as a cache_peer, I can get round this problem by pretending that
cache_peers must be FQHNs; but the problem remains & I cannot look up
machines such as 'www-l' which is a local copy of my on-line server.
2) It seems to be unable to choose which NS to use: My resolv.conf is
as follows,
>#
># /etc/resolv.conf
>#
># Automatically generated by SuSEconfig on Mon Jun 28 17:56:08 GMT 1999.
>#
># PLEASE DO NOT EDIT THIS FILE!
>#
># Change variables (NAMESERVER + SEARCHLIST) in /etc/rc.config instead.
>#
>#
>search local.domain.com
>nameserver 192.168.1.2
>nameserver 192.168.1.3
>nameserver 192.168.1.100
>
># speed things up for access to local web server
>www-l.domain.com 192.168.1.2
>
># Access to NFS when no nameserver running
>Whitelocks 192.168.1.2
(Note the search line which appears to be ignored by squid!)
The name servers are in the human logical order
primary-dns.local.domain.com
secondary-dns.local.domain.com
farthermost-dns.local.domain.com
squid appears to put the name servers on a list and always(?) chooses the
last entry. Can you see why this is unfortunate?
Given the fact that it may be silly to modify one's resolv.conf to
accommodate squid, it might be a good idea for squid to use all name
servers in turn and keep a record of which responds fastest. bind does this
when it goes out to the root servers, for instance.
Grateful if (should I be talking nonsense) my errors are pointed
out politely. If fixes to the code are needed I offer to write
patches.
Ben.
Received on Sun Jun 18 2000 - 17:30:38 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:54:05 MST