Re: [squid-users] wccp on linux - help

From: Martynas <[email protected]>
Date: Fri, 16 Nov 2001 21:55:54 +0200

Oh, I've forgotten to write: I enabled ip forwarding on linux also ;)

> Hello,
> I have some problem with wccp on linux (I use redhat 7.2 , kernel
> 2.4.9-13smp, squid 2.4.stable1, cisco IOS 12.0.20 GD:
> I did these things:
> 1. patched ip_gre.c,now it seems like this:
> if ((tunnel = ipgre_tunnel_lookup(iph->saddr, iph->daddr, key)) !=
> NULL) {
> skb->mac.raw = skb->nh.raw;
> skb->nh.raw = __pskb_pull(skb, offset);
> memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
> skb->protocol = *(u16*)(h + 2);
> /* Identify a WCCP packet (type 0x883e)
> and convert to ETH_P_IP. */
> if (skb->protocol ==__constant_htons(0x883e)){
> skb->protocol = __constant_htons(ETH_P_IP);
> }
>
> if (skb->ip_summed == CHECKSUM_HW)
> skb->csum = csum_sub(skb->csum,
> csum_partial(skb->mac.raw,
> skb->nh.raw-skb->mac.raw, 0));
> skb->pkt_type = PACKET_HOST;
> )
>
> compiled, then : modprobe ip_gre
>
> eth0 has IP 22.22.22.2
>
> a) tried: ifconfig gre0 22.22.22.3 up
> b) tried: iptunnel add gre1 mode gre remote 22.22.22.1 local 22.22.22.2
dev
> eth0
> ifconfig gre1 22.22.22.3 up
>
> then
> iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
> (because i tried with gre0 and gre1, i didn't want to change iptables
every
> time)
> 2. squid: wccp_router 22.22.22.1
> wccp_version 4
>
> then
> squid restart
>
> 3. on cisco router with IOS 12.0.20 GD:
> conf t
> ip wccp enable
> end
> conf t
> int et0
> ip web-cache redirect
> end
>
>
> Now from cisco router I see:
> #sh ip wccp
> Global WCCP information:
> Number of web-caches: 1
> Total Packets Redirected: 54
> Redirect access-list: -none-
> Total Packets Denied Redirect: 0
> Total Packets Unassigned: 0
> Group access-list: -none-
> Total Packets Denied to Group: 0
>
> #sh ip wccp web-caches
> WCCP Web-Cache information:
> IP Address: 22.22.22.2
> Protocol Version: 0.4
> State: Usable
> Initial Hash Info: 00000000000000000000000000000000
> 00000000000000000000000000000000
> Assigned Hash Info: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
> FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
> Hash Allotment: 256 (100.00%)
> Packets Redirected: 58
> Connect Time: 00:38:49
>
> I look at squid/access.log, but I don't see any redirected request :(
> What's wrong? Could somebody help me?
>
>
> Martynas Bieliauskas
>
>
>
Received on Fri Nov 16 2001 - 12:44:09 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:04:17 MST