You can use the Web cache communications protocol (WCCP) to redirect traffic (usually Web page requests) to another device in real time. The most common use for WCCP is redirecting Web traffic to a server that provides Web caching, filtering, or other services.
You can enable WCCP on your router, but you should only use WCCP if you have an external machine performing Web caching, logging, reporting, or filtering. Developed by Cisco, WCCP has two versions: WCCPv1 and WCCPv2.
How WCCP works
Here's an example of how WCCP works:
- A Web browser makes a request, which goes to a router.
- The router intercepts the request.
- The router redirects the request to a new location inside a generic routing encapsulation (GRE) frame to prevent any modifications to the original packet.
- The new device -- typically a Web appliance of some type -- can choose to masquerade as the real server or send it somewhere else. Assuming it accepts the packet, the new device can provide a response.
The benefit to using WCCP is that we assume the appliance provides services that the router does not -- for example, Web content filtering, caching, logging, security, or authentication. I've seen WCCP used with Squid proxy servers, Blue Coat Web caching and content filtering appliances, and Cisco content caching engines.
The benefit to transparently routing traffic to a Web appliance is that you don't have to make any changes to your Web browsers (and you don't have to configure a proxy server). In addition, Web caching appliances offer these benefits:
- They lower response times for Web requests.
- They optimize bandwidth utilization of the Internet circuit.
- They log Web requests and report on them.
- They filter requested content.
Not surprisingly, WCCPv2 offers a number of features that WCCPv1 does not. WCCPv2 supports protocols other than HTTP, multiple routers, MD5 security, and load distribution.
With WCCP, you can use a "cache cluster" for load balancing, scaling, and fault tolerance. You can also use Hot Standby Router Protocol (HSRP) with your routers to provide redundancy for your WCCP routers.
How to configure WCCP
How do you configure WCCP? The router is the easiest part of any WCCP configuration. Here's a sample configuration:
Router(config)# ip wccp version 2 Router(config)# ip wccp web-cache password mypassword Router(config)# interface Fa0/0 Router(config-if)# ip wccp web-cache redirect out Router(config-if)# ^Z
This tells the router that it should accept WCCP registration requests that use mypassword as the password. It also tells the WCCP cache engine which routers are running WCCP and registers the cache with the router.
How do you check your router's WCCP status? Here's an example:
Router# show ip wccp Global WCCP information: Router information: Router Identifier: -not yet determined- Protocol Version: 2.0 Service Identifier: 2 Number of Cache Engines: 0 Number of routers: 0 Total Packets Redirected: 0 Redirect access-list: -none- Total Packets Denied Redirect: 0 Total Packets Unassigned: 0 Group access-list: -none- Total Messages Denied to Group: 0 Total Authentication failures: 0 Router#
WCCP isn't something everyone needs to configure, but it's still important to understand the underlying concepts. And you should know how to configure it just in case. For more information on configuring WCCP, see Cisco's Configuring Web Cache Services Using WCCP documentation.
Does your organization use WCCP? Do you think WCCP could simplify the configuration of Web appliances? Share your thoughts in this article's discussion.
Miss a column?
Check out the Cisco Routers and Switches Archive, and catch up on David Davis' most recent columns.
Want to learn more about router and switch management? Automatically sign up for our free Cisco Routers and Switches newsletter, delivered each Friday!
David Davis has worked in the IT industry for 12 years and holds several certifications, including CCIE, MCSE+I, CISSP, CCNA, CCDA, and CCNP. He currently manages a group of systems/network administrators for a privately owned retail company and performs networking/systems consulting on a part-time basis.