cache_peer hostname type http_port icp_port options
This tag is used to specify the other caches in the hierarchy. The cache_peer option is split into five fields. The first field is the hostname or IP of the cache that is to be queried. The second field indicates the type of relationship. The third field sets the HTTP port of the destination server, while the fourth sets the ICP (UDP) query port. The fifth field can contain zero or more keywords. Here are the detailed explanations on each field. See cache_peer_access also.
Hostname (FQDN) or IP address of the cache to be queried should be mentioned.
cache_peer sib1.visolve.com sibling 3128 3130 [proxy-only]
cache_peer 172.16.1.100 sibling 3128 3130 [proxy-only]
Here cache hierarchy should be specified. This option plays an important role in deciding neighbor selection.
The port number where the cache listens for proxy requests. See also http_port
Used for querying neighbor caches about objects. To have a non-ICP neighbor specify '7' for the ICP port and make sure the neighbor machine has the UDP echo port enabled in its /etc/inetd.conf file. See also icp_port
To specify that objects fetched from this cache should not be saved locally.
To specify a weighted parent. The weight must be an integer. The default weight is 1, larger weights are favoured more.
To specify a IP multicast Time To Live (ttl) value when sending ICP queries to multicast groups. We do not accept ICP replies from random hosts. So you must configure other group members as peers with the multicast-responder option below.
This option is set for those peers, which do not support ICP queries. It is obvious to have doubt about the ICP port specified in, while using this option. Squid does not care what digit has been given in the ICP port when no-query is specified. Using any number is fine. It is recommended to use 0 to emphasis the fact that ICP is not used in any way (not even to UDP echo port 7).
This might be the typical example for this option :
cache_peer hostname sibling 8080 0 proxy-only no-query
By default, Port 3130 is typically where an ICP-aware proxy listens for ICP packets. Port 7 is the "echo" port (see /etc/services). It is typically handled by inetd as an internal process and simply "echoes" back what has been sent it. Since option "no-query" specified, port "7" is there so that if peer is queried, Squid gets an answer and not declares peer as dead and therefore stop using it.
Port 7 is used when Squid has a non-ICP peer but still want to query it before sending requests there (no-query not specified). In such case, Squid will send the ICP queries to port 7 which is the UDP echo port.
If this is a parent cache which can be used as a "last-resort." and not ICP enabled then "default" would be the appropriate option. Simply adding default to a parent does not force all requests to be sent to that parent. The term default is perhaps a poor choice of words. If the cache is able to make direct connections, direct will be preferred over default. If needed to force all requests to parent cache(s), use the never_direct option.
To define a set of parents which should be used in a round-robin fashion in the absence of any ICP queries.
Indicates that the named peer is a member of a multicast group. ICP queries will not be sent directly to the peer, but ICP replies will be accepted from it.
Indicates that, for ICP_OP_MISS replies, we'll only forward CLOSEST_PARENT_MISSes and never FIRST_PARENT_MISSes.
To NOT request cache digests from this neighbor.
It disables requesting ICMP RTT database (NetDB) from the neighbor.
To prevent access to this neighbor from influencing the delay pools.
If this is a personal/workgroup proxy and your parent requires proxy authentication.
To specify a peer specific connect timeout (also see the peer_connect_timeout directive).
To tell Squid to fetch the cache digest (if digests are enabled) for this host from the specified URL rather than the Squid default location.
No cache peer is defined
cache_peer proxy.visolve.com parent 3128 3130 default
cache_peer 172.16.1.100 sibling 3128 3130 proxy-only
cache_peer 172.16.1.123 sibling 3129 5500 weight=2
If you compiled Squid to support HTCP, your cache will automatically attempt to connect to TCP port 4827 (there is currently no option to change this port value). Cache digests are transferred via the HTTP port specified on the cache_peer line. Non-ICP neighbors must be specified as 'parent'.