![]() |
Cisco ACNS Software Caching Configuration Guide, Release 4.1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Chapter 2: Cisco Cache Application Basic Configuration
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Cisco Cache Application Basic WCCP ConfigurationThe 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. Basic Cache Application Router Configurations for HTTP Traffic and WCCP Version 2A 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." Web Cache Service Configuration with Clients and Cache on Different SubnetsIn 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. Figure 2-1: Web Cache Service with Content Engine and Clients on Different Subnets
Configuring the Content Engine for Web Cache ServiceClients and Cache on Different SubnetsTo configure the Content Engine for the web cache service, perform the following steps while logged in to the Cache software in global configuration mode:
Configuring the Router for Web Cache ServiceClients and Cache on Different SubnetsTo configure the router for web cache service, perform the following steps while logged in to the router global configuration mode:
Configuration ExamplesWeb Cache Service with Clients and Cache on Different SubnetsThis example shows a Content Engine and router configured for the web cache service with the topology illustrated in Figure 2-1: Content Engine Configuration. . . 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 ! ! ! ... WCCP-Enabled Router ConfigurationBuilding 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 Web Cache Service Configuration with Clients and Cache on Same SubnetIn 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. Figure 2-2: Web Cache Service with Clients and Content Engine on Same Subnet
Configuring the Content Engine for Web Cache ServiceClients and Cache on Same SubnetTo configure the Content Engine for the web cache service, perform the following steps while logged in to the Cache software in global configuration mode:
Configuring the Router for Web Cache ServiceClients and Cache on Same SubnetTo configure the router for the web cache service, perform the following steps while logged in to the Cache software global configuration mode:
Configuration ExamplesWeb Cache Service with Clients and Cache on the Same SubnetThis example shows a Content Engine and router configured for the web cache service with the topology illustrated in Figure 2-2: Content Enginehostname 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 ! ! ! . . . WCCP-Enabled RouterBuilding 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 Configuring Reverse Proxy ServiceTo 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.
Figure 2-3: Reverse Proxy Service with WCCP-Enabled Router
Configuring the Content Engine for Reverse Proxy Service with Output RedirectionTo configure reverse proxy on the Content Engine, perform the following steps starting from global configuration mode:
Configuring the Router for Reverse Proxy Service with Output RedirectionTo configure reverse proxy service on the router, perform the following steps starting in global configuration mode:
Configuring the Router for Reverse Proxy Service with Input Redirection
Configuration ExamplesReverse Proxy with Output RedirectionThis 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: Content Engine! 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 WCCP-Enabled RouterCurrent 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 Disabling Transparent Caching Services on the Content EngineTo 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 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. Verifying the Software ConfigurationOnce 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. Removing or Replacing a Content EngineRefer 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.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|