|
The Web Cache Communication Protocol (WCCP) is a Cisco-developed content-routing technology that allows you to deploy transparent caching using the Content Engines in your network. Cisco IOS Release 12.1 and later allows the use of Version 1 (WCCPv1) or Version 2 (WCCPv2) of the WCCP.
This chapter describes how to configure a router or cluster of routers and Content Engines using WCCPv2. WCCPv2 offers many enhancements over WCCPv1, such as support for many routers, multicasting and support for re-direction of non-HTTP traffic. With WCCPv1 only a single router can be configured to service either a single Content Engine or a cluster of Content Engines. Further information on WCCP Version 1 commands and router configuration examples are in the Cisco IOS software online documentation as well as in "Web Cache Communication Protocol Version 1."
To make a Content Engine running the Cache application software operational on the network, you must perform these tasks:
The procedures for these tasks are in the following sections:
For additional information on web caching concepts and network placement diagrams, refer to the Network Caching White Paper on the Cisco.com Content Networking website at the following URL:
http://www.cisco.com/warp/public/cc/pd/cxsr/500/tech/cds_wp.htm
To upgrade a Content Engine from earlier versions of the Cache software, use the upgrade procedures in the Cisco ACNS Software System Maintenance and Troubleshooting Guide.
See "Cisco Application and Content Networking Software Cache Application Features," for a list of the feature described in this guide.
A router or switch with the proper configuration is required for transparent caching services. The router or switch must be running a version of Cisco IOS software that supports the Web Cache Communication Protocol (WCCP) Version 2.
When cache support is enabled on the router or switch, and WCCP support is enabled on the Content Engines, the devices can communicate and deliver the services for which they are configured. To suspend caching services, you can disable cache support on the router or switch rather than powering off or otherwise disabling individual Content Engines. (For instance, use the no ip wccp router or switch command to disable caching.)
Many WCCP Version 2 features also require a configuration of the appropriate Cache application wccp global configuration command. Refer to the Cisco Application and Content Networking Software Command Reference and release notes for more details.
If you do not know how to configure a router or a switch, refer to the software documentation supplied with the devices. Further information on WCCP Version 2 commands and router configuration examples are in the Cisco IOS software online documentation as well as in "Web Cache Communication Protocol Version 2."
In this scenario, the Content Engine and the requesting clients are on different subnets, as shown in Figure 2-1.
A router running WCCP Version 2 transparently redirects client HTTP traffic bound for router interface s0/0 to the Content Engine. The web cache service redirects HTTP traffic on port 80 only.
To configure the Content Engine for the web cache service, perform the following steps while logged in to the Cache software in global configuration mode:
Command | Purpose | |
Step 1 | contentengine(config)# wccp version 2
| Ensures that the Content Engine is running WCCP Version 2. |
Step 2 | contentengine(config)# wccp router-list 1
10.10.20.1
| Configures a router list. |
Step 3 | contentengine(config)# wccp web-cache
router-list-num 1
| Informs the routers in the specified router list that the Content Engine is accepting web cache service. |
Step 4 | contentengine(config)# exit
| Exits global configuration mode. |
Step 5 | contentengine# write memory
| Writes running configurations to nonvolatile memory. |
To configure the router for web cache service, perform the following steps while logged in to the router global configuration mode:
| Command | Purpose |
Step 1 | router(config)# ip wccp web-cache
| Instructs the router to run the web cache service. |
Step 2 | router(config)# interface Serial0
| Specifies which router interface to configure. In this scenario, Serial0 is the router interface to the Internet. |
Step 3 | router(config-if)# ip wccp web-cache redirect out
| Instructs the router to redirect web cache traffic bound for the specified interface to Content Engines that accept web cache service. In this scenario there is only one router. Web cache traffic is defined as HTTP packets on port 80. |
Step 4 | router(config-if)# exit
| Exits global configuration mode. |
This example shows a Content Engine and router configured for the web cache service with the topology illustrated in Figure 2-1:
. . .
hostname Content_engine_4.1
!
clock timezone pst -8 0
!
ip domain-name cisco.com
!
exec-timeout 20
!
interface FastEthernet 0
ip address 10.10.20.10 255.255.255.0
no autosense
bandwidth 100
full-duplex
exit
interface FastEthernet 1
shutdown
exit
!
ip default-gateway 10.10.20.1
!
ip name-server 10.10.10.100
!
!
wccp router-list 1 10.10.20.1
wccp web-cache router-list-num 1
wccp version 2
!
!
!
...
Building configuration...
Current configuration:
!
hostname WCCP-Router
!
!
ip subnet-zero
!
ip wccp web-cache
!
interface Ethernet0
ip address 10.10.10.1 255.255.255.0
!
interface Ethernet1
ip address 10.10.20.1 255.255.255.0
!
interface Serial0
ip address 192.168.1.2 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
ip wccp web-cache redirect out
!
end
In this scenario, the Content Engine and the requesting clients are on the same subnet, as shown in Figure 2-2.
A router running WCCP Version 2 transparently redirects client HTTP traffic bound for router interface s0/0 to the Content Engine. The web cache service redirects HTTP traffic on port 80 only.
To configure the Content Engine for the web cache service, perform the following steps while logged in to the Cache software in global configuration mode:
Command | Purpose | |
---|---|---|
Step 1 | contentengine(config)# wccp version 2
| Ensures that Content Engine is running WCCP Version 2. |
Step 2 | contentengine(config)# wccp router-list 1 10.10.10.1
| Configures a router list. |
Step 3 | contentengine(config)# wccp web-cache
router-list-num 1
| Informs the routers in the specified router list that the Content Engine is accepting web cache service. |
Step 4 | contentengine(config)# exit
| Exits global configuration mode. |
Step 5 | contentengine# write memory
| Writes running configurations to nonvolatile memory. |
To configure the router for the web cache service, perform the following steps while logged in to the Cache software global configuration mode:
Command | Purpose | |
---|---|---|
Step 1 | router(config)# ip wccp web-cache
| Instructs the router to run the web cache service. |
Step 2 | router(config)# interface Ethernet0
| Specifies which router interface to configure. In this scenario, Ethernet0 is the router interface to which the Content Engine and clients are connected. |
Step 3 | router(config-if)# ip route-cache
same-interface
| Enables fast switching of redirected packets back through the interface on which they were received. Without this command, the router does not use the high-speed switching cache, and the packets are process-switched, a much slower method. |
Step 4 | router(config)# interface Serial0
| Specifies which router interface to configure. In this scenario, Serial0 is the router interface to the Internet. |
Step 5 | router(config-if)# ip wccp web-cache redirect
out
| Instructs the router to redirect web cache traffic bound for the specified interface to Content Engines that accept web cache service. In this scenario there is only one router. Web cache traffic is defined as TCP port 80 traffic. |
Step 6 | router(config-if)# exit
| Exits global configuration mode. |
This example shows a Content Engine and router configured for the web cache service with the topology illustrated in Figure 2-2:
hostname Content_engine_4.1
!
clock timezone pst -8 0
!
ip domain-name cu.net
!
interface FastEthernet 0
ip address 10.10.20.10 255.255.255.0
no autosense
bandwidth 100
full-duplex
exit
interface FastEthernet 1
shutdown
exit
!
ip default-gateway 10.10.20.1
!
ip name-server 10.10.10.100
!
!
!
wccp router-list 1 10.10.20.1
wccp web-cache router-list-num 1
wccp version 2
!
!
!
. . .
Building configuration...
Current configuration:
!
version 12.0
!
hostname WCCP-Router
!
!
ip wccp web-cache
!
interface Ethernet0
ip address 10.10.10.1 255.255.255.0
ip route-cache same-interface
!
interface Serial0
ip address 192.168.1.2 255.255.255.252
no ip directed-broadcast
no ip mroute-cache
ip wccp web-cache redirect out
!
end
To ensure fast response times, maximized service availability, and the ability to withstand an excessive number of URL hits or an excess of bandwidth requested, Cisco Content Engines with Cache software can be deployed in front of a website server farm to offload traffic from busy firewalls and servers, helping to optimize the entire website infrastructure. This type of deployment is called web server acceleration, or reverse proxying.
The same Content Engine can provide a reverse proxy cache service while simultaneously providing a transparent network cache service.
In the deployment scenario shown in Figure 2-3, the Content Engine interoperates with a router running WCCP Version 2 to bring reverse proxy service within the web server environment. In this deployment, the router interface connected to the Internet has an IP address of 192.168.1.1. All HTTP requests destined for the web server are routed to the router interface of 172.16.21.1. Upon receiving the HTTP request at this interface, the router transparently intercepts and redirects the request to the Content Engine with an IP address of 172.16.20.23. Thus, the Content Engine is logically in front of the web server offloading web server HTTP traffic. The Content Engine sends a request to the web server only when it does not find the requested content in the cache.
Note A redirect list on the router or a static bypass list on the Content Engine can be used to allow flows to bypass interception. These lists use criteria based on source and destination IP addresses. |
To configure reverse proxy on the Content Engine, perform the following steps starting from global configuration mode:
Command | Purpose | |
---|---|---|
Step 1 | contentengine(config)# wccp version 2
| Ensures that the Content Engine is running WCCP Version 2. |
Step 2 | contentengine(config)# wccp router-list 1
172.16.20.1
| Configures a router list. |
Step 3 | contentengine(config )# wccp reverse-proxy
router-list-num 1
| Instructs the router to run the reverse proxy service. |
To configure reverse proxy service on the router, perform the following steps starting in global configuration mode:
Command | Purpose | |
---|---|---|
Step 1 | router(config)# ip wccp 99
| Instructs the router to run the reverse proxy service. The reverse proxy service is indicated by a value of 99. |
Step 2 | router(config)# interface Ethernet 0/1
| Specifies which router interface to configure. In this scenario, Ethernet 0/1 is the router interface to the web server. |
Step 3 | router(config-if)# ip wccp 99 redirect out
| Instructs the router to redirect TCP port 80 traffic bound for the specified interface to Content Engines that accept reverse proxy service. In this scenario there is only one router. |
Step 4 | router(config)# exit
| Exits global configuration mode. |
Command | Purpose | |
---|---|---|
Step 1 | router(config)# ip wccp 99
| Instructs the router to run the reverse proxy service. The reverse proxy service is indicated by a value of 99. |
Step 2 | router(config)# interface s0/0
| Specifies which router interface to configure. In this scenario, s0/0 is the router interface to the Internet. |
Step 3 | router(config-if)# ip wccp 99 redirect in
| Instructs the router to redirect TCP port 80 traffic received on the specified interface to Content Engines that accept reverse proxy service. |
Step 4 | router(config-if)# exit
| Exits interface configuration mode. |
Note Input redirection is supported in Cisco IOS Release 12.1(3)T or 12.0(11)S and later versions of the same, or in Cisco IOS Release 12.2. |
This section shows configurations of the Content Engine and the router for the deployment scenario in Figure 2-3. The reverse proxy related commands are in bold:
!
hostname ContentEngine
!
interface ethernet 0
ip address 172.16.20.23 255.255.255.224
ip broadcast-address 10.0.0.255
exit
!
interface ethernet 1
exit
!
ip default-gateway 172.16.20.1
ip name-server 172.16.20.238
ip domain-name cisco.com
ip route 0.0.0.0 0.0.0.0 172.16.20.1
!
wccp router-list 1 172.16.20.1
wccp 99 reverse-proxy router-list-num 1
wccp version 2
!
end
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname 2611-5
!
enable secret 5 $1$9VQ.$BTPbq8xlE2dsKwKPDDmpL/
!
!
ip subnet-zero
ip wccp 99
!
!
interface Ethernet0/0
no ip address
no ip redirects
!
interface Serial0/0
ip address 192.168.1.1 255.255.255.224
!
interface Ethernet0/1
ip address 172.16.21.1 255.255.255.224
ip wccp 99 redirect out
!
interface Ethernet1/0
ip address 172.16.20.1 255.255.255.224
!
interface Ethernet1/1
no ip address
shutdown
full-duplex
!
interface Ethernet1/2
no ip address
shutdown
!
. . .
ip classless
!
!
line con 0
transport input none
line aux 0
line vty 0 4
login
!
end
To disable transparent caching on a Content Engine in a WCCP environment without powering it down, disable the running version of WCCP on the Content Engine by issuing the Cache software
no wccp version 2 global configuration command. The Content Engine will still service proxy-style requests, if so configured, and preserve its configuration settings.
Further information about the Content Engine commands used to configure the Content Engine for the deployment scenarios provided in this chapter can be found in the Cisco Application and Content Networking Software Command Reference. Refer to this document for more information about the Content Engine commands.
Once you have installed and configured the Content Engine and enabled WCCP caching services on the router, verify that the Cache application is working properly.
Step 1 Start a web browser and open various web pages on the Internet or your intranet. The web servers you connect to must be on a different subnet, so that the request goes through either a home router running WCCP Version 1 or Version 2, or a cluster of routers running WCCP Version 2. Request the same pages more than once, to ensure that pages you request are in the cache. For more information on WCCP, see "Web Cache Communication Protocol Version 1," and "Web Cache Communication Protocol Version 2."
Step 2 From the CLI, enter the following command to display the Content Engine HTTP caching saving statistics:
show statistics http savings
Step 3 Open a console or Telnet session on the home router or routers, and enter the show ip wccp commands to display statistics and status information about the Content Engine.
The statistics should show a number greater than 0 for packets redirected. Also, check for hash assignments, which indicate at the very least that the Content Engines are registered and communicating with the routers.
If the router shows that no packets are being redirected to the Content Engine, you must troubleshoot your setup.
Refer to the Content Engine hardware documentation for instructions on physically removing a Content Engine from an active network.
The router and the Content Engine are in constant communication when WCCP is enabled; thus, when the router notices that the engine is no longer responding to it, the router stops sending requests to the engine. This is transparent to users. If other Content Engines are attached to the router, the router continues sending requests to the other engines.
When you remove a Content Engine, the pages that were cached on its hard disks are no longer available to the router or other Content Engines. Thus, you might see an increase in outgoing web traffic that might have otherwise been fulfilled by the Content Engine you are removing. However, after a time, the router and other Content Engines will redistribute the load of web traffic.
If you remove the last Content Engine from a router, you can also disable cache support on the router. However, this is not necessary; having cache support enabled when there are no Content Engines attached has no effect on the router's performance.
To replace a Content Engine, remove the old one from the network. Then, add the new Content Engine and configure it using the same startup configuration parameters that you used for the removed one.
Posted: Mon Nov 18 11:18:30 PST 2002
Copyright 1989-2000©Cisco Systems Inc.