[SQUID problem] : DIRECT queries instead of ICP discovery

  • Thread starter Thread starter MrClown
  • Start date Start date
M

MrClown

Hi all,

I'm trying to create a very simple configuration here: I have one origin server and I want two peer to be set as siblings. I am facing trouble though. When I launch the squid instances at the two peers, I can't get them to work together: From what I saw in access.log, the siblings are not using ICP queries, and therefore not communicating about their cache content (sometimes, at the beginning of my tests I can see one or two ICP queries (in access.log) between the two peers, then, they just stop talking...).

I've tried with a lot of different files, such as .jpg .mpd .gif. I've had one UDP_HIT (on the requested peer) and SIBLING_HIT (on the requesting peer) once (over all my tests) and that's all, I get HIER_DIRECT for the rest of my tests.
I am using the configuration file depicted below (with the cache_peer directive in the end)

Any idea what's wrong in my config ? I am really struggling with this and can't see what's wrong here >_<

Code:
# WELCOME TO SQUID 3.3.8
# ----------------------------
# ACCESS CONTROLS
# -----------------------------------------------------------------------------
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network

acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
acl video urlpath_regex -i .m4s$

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access allow localnet
http_access deny all

icp_access allow localnet
icp_access allow localhost
icp_access deny all

# NETWORK OPTIONS
# -----------------------------------------------------------------------------
http_port 3128

# MEMORY CACHE OPTIONS
# -----------------------------------------------------------------------------
cache_mem 256 MB
maximum_object_size_in_memory 2048 KB
memory_replacement_policy lru

# DISK CACHE OPTIONS
# -----------------------------------------------------------------------------
cache_replacement_policy lru
cache_dir ufs /var/spool/squid3 2000 16 256
minimum_object_size 0 KB
maximum_object_size 40960 KB


# LOGFILE OPTIONS
# -----------------------------------------------------------------------------
access_log /var/log/squid3/access.log squid
cache_store_log /var/log/squid3/store.log

# OPTIONS FOR TUNING THE CACHE
# -----------------------------------------------------------------------------

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880
refresh_pattern . 0 20% 4320

refresh_pattern -i .mpd$ 1440 100% 1440 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private
range_offset_limit -1

# ICP OPTIONS
# -----------------------------------------------------------------------------
icp_port 3130

# OPTIONS INFLUENCING REQUEST FORWARDING
# -----------------------------------------------------------------------------
prefer_direct off

cache_peer 192.168.2.112 sibling 3128 3130 proxy-only allow-miss

Continue reading...
 
Back
Top