+++ /dev/null
-This version of squid has been patched with the wccpv2 support patch. To
-enable this option, use the --enable-wccpv2 option on the configure script.
-
-Wccpv2 allows a single cache to associate itself with multiple routers, and
-also allows multiple wccp services to be defined. The other advantage of
-wccpv2 is that the cisco IOS uses CEF to switch the packets.
-
-Example simple web cache
-------------------------
-
-Internet <-> fa0/0 2621 fa0/1 <-> cache, internal network
-
-squid.conf:
-
-wccp2_router 192.168.2.1:2048
-wccp2_version 4
-wccp2_forwarding_method 1
-wccp2_return_method 1
-wccp2_service standard 0
-
-Router config:
-
-ip wccp web-cache
-!
-interface FastEthernet0/0
- description uplink
- ip address 192.168.1.200 255.255.255.0
- ip wccp web-cache redirect out
- duplex auto
- speed auto
-!
-interface FastEthernet0/1
- description local network
- ip address 192.168.2.1 255.255.255.0
- duplex auto
- speed auto
-!
-
-Note the cache is on the internal network (Fa0/1), the interception occurs
-on the uplink interface(0/0).
-
-Linux (Kernel 2.6.10, i386) side of things:
-
-#!/bin/sh
-echo "1" > /proc/sys/net/ipv4/ip_forward
-echo "0" > /proc/sys/net/ipv4/conf/all/rp_filter
-iptunnel add gre1 mode gre remote 192.168.2.1 local 192.168.2.2 dev eth0
-ifconfig gre1 up 127.0.0.2
-iptables -t nat -F
-# iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
-iptables -t nat -A PREROUTING -i gre1 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.2.2:3128
-
-
-TODO
-----
-
-* The wccp2 router configuration need to have a better configuration interface
- (it currently uses ip:port when only the ip address is needed).
-* A shutting-down cache should generate a removal query, informing the router
- (and therefore the caches in the group) that this cache is going
- away and no new traffic should be forwarded to it.
-* Some more documentation, examples, etc.
return;
}
+ /* TODO A shutting-down cache should generate a removal query, informing the router
+ * (and therefore the caches in the group) that this cache is going
+ * away and no new traffic should be forwarded to it.
+ */
+
if (theWccp2Connection > -1) {
debugs(80, DBG_IMPORTANT, "FD " << theWccp2Connection << " Closing WCCPv2 socket");
comm_close(theWccp2Connection);
theWccp2Connection = -1;
}
- /* for each router on each service send a packet */
+ /* free all stored router state */
service_list_ptr = wccp2_service_list_head;
while (service_list_ptr != NULL) {