Document ID: 12657
Updated: Apr 29, 2004
Contents
Introduction
This document provides basic instructions for configuring Web Cache Communication Protocol Version 2 (WCCPv2) on both the Cisco Content Engine and router. More information about WCCPv2 functions can be found under separate headings (see the Related Information
Before You Begin
Conventions
For more information on document conventions, see the Cisco Technical Tips Conventions.
Prerequisites
There are no specific prerequisites for this document.
Components Used
This document is not restricted to specific software and hardware versions.
Network Diagram
This document uses the network setup shown in the diagram below.
Issue the ip wccp web-cache redirect out command on the interface going toward the Internet.
Configuring WCCPv2 on the Content Engine and Router
Step-by-Step Instructions
These steps show new or modified commands that configure the WCCPv2 feature:
-
Turn on the protocol for Web caching by issuing the ip wccp web-cache command.
Router(config)#ip wccp web-cache
-
Specify an interface for Web caching by issuing the interface type number command.
Router(config)#interface type number
-
Enable the check on packets to determine whether they need to be redirected to a Web cache by issuing the ip wccp web-cache redirect out command.
This command is placed on the interface going to the Internet.
Note: The ip wccp web-cache redirect out command is generic, and is used to enable redirection of outgoing destination port 80 packets on the applied interface to the Cache.
Router(config-if)#ip wccp web-cache redirect out
-
Note: This step is optional.
If the client and a Content Engine are located on the same network, issue the ip route-cache same-interface command to configure the router to use the fast switching path on the interface.
Router(config-if)#ip route-cache same-interface
-
Issue the wccp version 2 command to enable Web cache service with WCCPv2.
CEConsole(config)#wccp version 2
-
To configure a router list for WCCPv2, issue the wccp router-list number ip-address command.
CEConsole(config)#wccp router-list number ip-address
-
To instruct the router to run the Web cache service with WCCPv2, issue the wccp web-cache router-list-num number command.
CEConsole(config)#wccp web-cache router-list-num number
Example of WCCPv2 on the Router
WCCP is applied to the interface out of which the HTTP traffic flows, typically the interface facing the Internet.
Router#configure terminal Router(config)#ip wccp web-cache Router(config)#interface !--- Relevant interface, such as the interface going to the Internet. Router(config-if)#ip wccp web-cache redirect out Router(config-if)#^Z
Example of WCCPv2 on the Content Engine
cache#configure terminal cache(config)#wccp version 2 cache(config)#wccp router-list 1 (series-of-router-ip-addrs) [...] cache(config)#wccp web-cache router-list-num 1 cache(config)#^Z cache#write Building configuration... [OK]
Verify
This section provides information you can use to confirm your configuration is working properly.
Certain show commands are supported by the Output Interpreter Tool (registered customers only) , which allows you to view an analysis of show command output.
After configuring the Content Engine and router, verify functionality using these commands:
-
show ip wccp or show ip wccp {web-cache | 99} — Displays global statistics related to WCCP.
-
show ip wccp {web-cache | 99} detail — Queries the router for information about which Content Engines the router has detected in a specific service group. The information can be displayed for either a Web cache or the reverse proxy service, which is indicated by a value of 99.
-
show ip interface — Displays whether any ip wccp direct commands are configured on an interface.
-
show ip wccp {web-cache | 99} view — Displays which devices in a particular service group have been detected and which Content Engines are not visible to all other routers to which the current router is connected. The information can be displayed for either a Web cache or the reverse proxy service, which is indicated by a value of 99.
This is sample command output from the show ip wccp command:
Router#show ip wccp Global WCCP information: Router information: Router Identifier: 10.1.1.1 Protocol Version: 2.0 Service Identifier: web-cache Number of Cache Engines: 1 Number of routers: 1 Total Packets Redirected: 446226 Redirect access-list: -none- Total Packets Denied Redirect: 0 Total Packets Unassigned: 20 Group access-list: -none- Total Messages Denied to Group: 0 Total Authentication failures: 0
This is sample command output from the show ip wccp {web-cache | 99} detail command:
Router#show ip wccp web-cache detail WCCP Cache-Engine information: IP Address: 10.1.1.2 Protocol Version: 2.0 State: Usable Initial Hash Info: 00000000000000000000000000000000 00000000000000000000000000000000 Assigned Hash Info: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF Hash Allotment: 256 (100.00%) Packets Redirected: 40807 Connect Time: 11:05:17
This is sample command output from the show ip wccp {web-cache | 99} view command:
Router#show ip wccp web-cache view !--- You can also issue the show ip wccp 99 detail command. WCCP Routers Informed of: 10.1.1.1 WCCP Cache Engines Visible: 10.1.1.2 WCCP Cache Engines NOT Visible: -none-
Note: Private IP addressing has been used in this example. You may need to use public IP addressing on the Content Engine and router.
Troubleshoot
This section provides information you can use to troubleshoot your configuration.
Troubleshooting Commands
Certain show commands are supported by the Output Interpreter Tool (registered customers only) , which allows you to view an analysis of show command output.
Note: Before issuing debug commands, please see Important Information on Debug Commands.
Router Commands:
-
show ip wccp — Displays global WCCP statistics.
-
show ip wccp web-caches — Displays information about all known Content Engines.
-
show ip interface — Displays whether Web cache redirecting is enabled on an interface.
-
show ip wccp and show ip wccp web-caches — Displays a count of the number of packets redirected.
-
clear ip wccp — Clears the counter displayed by the show ip wccp and show ip wccp web-caches commands.
-
debug ip wccp events — Displays information about significant WCCP events.
-
debug ip wccp packets — Displays information about every WCCP packet received or sent by the router.
This is sample debug ip wccp events command output when a Content Engine is added to the list of available Web caches:
Router#debug ip wccp events WCCP-EVNT: Built I_See_You msg body w/1 usable web caches, change # 0000000A WCCP-EVNT: Web Cache 192.168.25.3 added WCCP-EVNT: Built I_See_You msg body w/2 usable web caches, change # 0000000B WCCP-EVNT: Built I_See_You msg body w/2 usable web caches, change # 0000000C
This is sample debug ip wccp packets command output. The router is sending keepalive packets to the Content Engines at IP addresses 192.168.25.4 and 192.168.25.3. Each keepalive packet has an identification number associated with it. When the Content Engine receives a keepalive packet from the router, it sends a reply with the identification number back to the router.
Router#debug ip wccp packets WCCP-PKT: Received valid Here_I_Am packet from 192.168.25.4 w/rcvd_id 00003532 WCCP-PKT: Sending I_See_You packet to 192.168.25.4 w/ rcvd_id 00003534 WCCP-PKT: Received valid Here_I_Am packet from 192.168.25.3 w/rcvd_id 00003533 WCCP-PKT: Sending I_See_You packet to 192.168.25.3 w/ rcvd_id 00003535 WCCP-PKT: Received valid Here_I_Am packet from 192.168.25.4 w/rcvd_id 00003534 WCCP-PKT: Sending I_See_You packet to 192.168.25.4 w/ rcvd_id 00003536 WCCP-PKT: Received valid Here_I_Am packet from 192.168.25.3 w/rcvd_id 00003535 WCCP-PKT: Sending I_See_You packet to 192.168.25.3 w/ rcvd_id 00003537 WCCP-PKT: Received valid Here_I_Am packet from 192.168.25.4 w/rcvd_id 00003536 WCCP-PKT: Sending I_See_You packet to 192.168.25.4 w/ rcvd_id 00003538 WCCP-PKT: Received valid Here_I_Am packet from 192.168.25.3 w/rcvd_id 00003537 WCCP-PKT: Sending I_See_You packet to 192.168.25.3 w/ rcvd_id 00003539
Content Engine Commands
-
show stat http savings — Records both byte and object hit-rate savings in the statistics.
-
show stat http usage — Displays usage statistics.
Related Information
Open a Support Case (Requires a Cisco Service Contract.)
Related Cisco Support Community Discussions
The Cisco Support Community is a forum for you to ask and answer questions, share suggestions, and collaborate with your peers.
Refer to Cisco Technical Tips Conventions for information on conventions used in this document.