WCCP with Cisco 877 and Squid
I just upgraded my Cisco 877 to the latest 12.4(24)T IOS, so I thought I’d have another go at getting WCCP to work. Good news: it works!
Here’s my working configuration on the Cisco 877:
ip cef
ip wccp web-cacheinterface Vlan1
ip wccp web-cache redirect in
This tells the router that web traffic coming into the Vlan1 interface is a candidate for caching. With WCCP, web-caches register themselves with the router, then the router forwards requests to them. This means that if the cache disappears, the router will forward web requests directly to the internet.
I’m using Debian, so I added this to /etc/network/interfaces (replace 1.2.3.4 with the router identifier shown on the cisco by “show ip wccp”. In my case this is the external internet-facing IP address):
auto gre1
iface gre1 inet static
address 127.0.0.2
netmask 255.255.255.255
pre-up ip tunnel add gre1 mode gre remote 1.2.3.4 local 10.0.20.1 dev eth1
post-down ip tunnel del gre1
And I added this line to my firewall script. You could add it to rc.local if you don’t have anywhere else to put it:
iptables -t nat -A PREROUTING -i gre1 -d 0/0 -p tcp –dport 80 -j DNAT –to-destination 10.0.20.1:3128
The only thing left now is the squid configuration. I specified the internal address of the cisco 877 here (10.0.20.254):
wccp2_router 10.0.20.254
wccp2_rebuild_wait on
wccp2_forwarding_method 1
wccp2_return_method 1
wccp2_assignment_method 1
wccp2_service standard 0
wccp2_address 10.0.20.1
Useful links:
January 6th, 2010 at 8:42 pm
Thanks for this information… I have cisco 877 version 12.4(15)T I dont have ip wccp web-cache command. If possible could you upload IOS for me. Thanks in advance.
January 6th, 2010 at 11:32 pm
@Rolando: You need the ADVIPSERVICES image for WCCP, which is a higher feature pack than ADVSECURITY so it’s a different license
March 11th, 2010 at 3:26 pm
Hi! Good day to you… I just want to ask what is this “remote 1.2.3.4″
March 11th, 2010 at 3:27 pm
Hi Rolando,
Replace 1.2.3.4 with the router identifier shown on the cisco by “show ip wccp”. In my case this is the external internet-facing IP address.
March 11th, 2010 at 9:57 pm
i cant understand. Here are my info. Router address 192.168.1.1 and my squid server address eth1 192.168.1.108. im seeing 192.168.1.1 as a router indetifier.
could you explain these:
auto gre1 =is this virtual interface?
iface gre1 inet static
address 127.0.0.2
netmask 255.255.255.255
pre-up ip tunnel add gre1 mode gre remote 1.2.3.4 local 10.0.20.1 dev eth1
post-down ip tunnel del gre1
March 11th, 2010 at 10:06 pm
eth1 192.168.1.108 this interface is connected to my router which is 192.168.1.1
March 11th, 2010 at 10:07 pm
im using ubuntu server.