Document ID: 19680
Contents
Introduction
Prerequisites
Requirements
Components Used
Conventions
Configure
Network Diagram
Configurations
Verify
CSM debug and show Commands
Content Engine show Commands
Troubleshoot
NetPro Discussion Forums - Featured Conversations
Related Information
Introduction
This document describes how to configure a Content Switch Module (CSM) for transparent caching, with Cisco Content Engines as caches. The transparent cache sits between the user and the server. The CSM is introduced between the user and the cache. The CSM is intelligent because of its Layer 5 ability to dynamically analyze content and determine if it is cacheable or not. These guidelines apply:
-
If cacheable, the CSM load balances the request to the cache service based on the configured predictor.
-
If not cacheable, the CSM sends it directly to the origin server. This avoids the performance hit that occurs when the non-cacheable object goes to the cache, only to have its request redirected by the cache to the origin server.
There are several balancing methods available, which depend upon how you want to distribute data over the caches (for example, whole URL, URL string, and so forth).
The CSM can be configured with a list of file extensions to send to the cache. This list is called an Extension Qualifier List (EQL). Once you configure the slb-policy CACHE-POLICY under vserver TRANSPARENT, only requests with the file extensions that are listed in the map CACHEABLE url list are sent the cache. If a file extensions is not listed in the map CACHEABLE url list, then the request will hit slb-policy NONCACHE-POLICY.
Prerequisites
Requirements
There are no specific requirements for this document.
Components Used
The information in this document is based on these software and hardware versions:
-
Catalyst 6000 Supervisor Cisco IOSĀ® Software Release 12.1(8)EX for Supervisor Engine 1 with MSFC1 (c6sup11-dsv-mz.121-8a.EX)
-
Catalyst 6000 CSM Software Release 2.1(2) (c6slb-apc.2-1-2.bin)
-
Cisco Content Engine 565 running Cisco Application and Content Networking System (ACNS) Software Release 5.1.3
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Conventions
For more information on document conventions, refer to the Cisco Technical Tips Conventions.
Configure
In this section, you are presented with the information to configure the features that are described in this document.
Network Diagram
This document uses this network setup:
Transparent Caching on the CSM
Configurations
This document uses these configurations:
|
CSM |
|---|
Building configuration... Current configuration : 4500 bytes ! version 12.1 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname cat ! boot buffersize 126968 enable password cisco ! redundancy main-cpu auto-sync standard ip subnet-zero ! ip name-server 10.107.241.185 ! !--- CSM located in slot 3. Module is running as active !--- cache and client side on the same CSM VLAN 100. module ContentSwitchingModule 3 vlan 100 client ip address 10.107.249.251 255.255.255.248 gateway 10.107.249.249 ! !--- End user located in CSM VLAN 200. vlan 200 server ip address 10.107.249.251 255.255.255.248 ! !--- Probe setup to check the availability of the Content !--- Engine default probe values. Interval is 300 seconds. probe CACHEPROBE tcp ! !--- Serverfarm CACHE. !--- Note: Issue the no nat server command. !--- CSM needs to do a Layer 2 rewrite. !--- Balancing predictor is hash URL. serverfarm CACHE no nat server no nat client predictor hash url real 10.107.249.254 inservice real 10.107.249.252 inservice probe CACHEPROBE ! !--- Serverfarm OUTBOUND. !--- Note: Use the serverfarm OUTBOUND to bypass the cache. !--- Requests that do not match the map CACHEABLE url list !--- will use serverfarm OUTBOUND. The NAT server has no !--- effect, as no reals are configured. !--- Balancing predictor forward. serverfarm OUTBOUND nat server no nat client predictor forward ! !--- Map CACHEABLE URL. map CACHEABLE url !--- Extension Qualifier List (EQL). match protocol http url *.pdf match protocol http url *.fdf match protocol http url *.au match protocol http url *.bmp match protocol http url *.z match protocol http url *.gif match protocol http url *.html match protocol http url *.js match protocol http url *.mocha match protocol http url *.jpeg match protocol http url *.jpg match protocol http url *.jpe match protocol http url *.jfif match protocol http url *.pjpeg match protocol http url *.pjp match protocol http url *.mp2 match protocol http url *.mpa match protocol http url *.abs match protocol http url *.mpeg match protocol http url *.mpg match protocol http url *.mpe match protocol http url *.mpv match protocol http url *.vbs match protocol http url *.m1v match protocol http url *.pcx match protocol http url *.txt match protocol http url *.text match protocol http url *.mov match protocol http url *.tiff match protocol http url *.tar match protocol http url *.avi match protocol http url *.wav match protocol http url *.gz match protocol http url *.zip ! map NONCACHABLE url match protocol http url * ! policy CACHE-POLICY url-map CACHEABLE serverfarm CACHE ! policy NONCACHE-POLICY url-map NONCACHABLE serverfarm OUTBOUND ! !--- Vserver TRANSPARENT. !--- Note: Virtual IP is all zeros. !--- Use of persistence rebalance for HTTP 1.1. !--- Parse-lengh set to 2000 bytes. !--- Two policies added to vserver TRANSPARENT. vserver TRANSPARENT virtual 0.0.0.0 0.0.0.0 tcp www serverfarm CACHE persistent rebalance parse-length 2000 slb-policy CACHE-POLICY slb-policy NONCACHE-POLICY inservice ! !--- Fault Tolerance group 1. !--- Used to configure redundancy between modules 3 and 4. ft group 1 vlan 250 priority 20 ! !--- CSM located in slot 4. Module is running as standby !--- cache and client side on the same CSM VLAN 100. module ContentSwitchingModule 4 vlan 100 client ip address 10.107.249.253 255.255.255.248 gateway 10.107.249.249 ! !--- End user located in CSM VLAN 200. !--- Note: Module 3 and 4 VLAN IP addresses are different. vlan 200 server ip address 10.107.249.253 255.255.255.248 ! !--- Probe setup to check availability of Content Engine. !--- Default probe values. Interval 300 seconds. ! probe CACHEPROBE tcp ! !--- Serverfarm CACHE. !--- Note: Issue the no nat server command. CSM needs to !--- do a Layer 2 rewrite. !--- Balancing predictor is hash URL. serverfarm CACHE no nat server no nat client predictor hash url real 10.107.249.254 inservice real 10.107.249.252 inservice probe CACHEPROBE ! !--- Serverfarm OUTBOUND !--- Note: Use the serverfarm OUTBOUND to bypass the cache. !--- Requests that do not match the CACHEABLE URL list will !--- use serverfarm OUTBOUND. The NAT server has no effect, !--- as no reals are configured. !--- Balancing predictor forward. serverfarm OUTBOUND nat server no nat client predictor forward ! !--- Map CACHEABLE URL. map CACHEABLE url !--- Extension Qualifier List (EQL). match protocol http url *.pdf match protocol http url *.fdf match protocol http url *.au match protocol http url *.bmp match protocol http url *.z match protocol http url *.gif match protocol http url *.html match protocol http url *.js match protocol http url *.mocha match protocol http url *.jpeg match protocol http url *.jpg match protocol http url *.jpe match protocol http url *.jfif match protocol http url *.pjpeg match protocol http url *.pjp match protocol http url *.mp2 match protocol http url *.mpa match protocol http url *.abs match protocol http url *.mpeg match protocol http url *.mpg match protocol http url *.mpe match protocol http url *.mpv match protocol http url *.vbs match protocol http url *.m1v match protocol http url *.pcx match protocol http url *.txt match protocol http url *.text match protocol http url *.mov match protocol http url *.tiff match protocol http url *.tar match protocol http url *.avi match protocol http url *.wav match protocol http url *.gz match protocol http url *.zip ! map NONCACHABLE url match protocol http url * ! policy CACHE-POLICY url-map CACHEABLE serverfarm CACHE ! policy NONCACHE-POLICY url-map NONCACHABLE serverfarm OUTBOUND ! !--- Vserver TRANSPARENT. !--- Note: Virtual IP is all zeros. !--- Use of persistence rebalance for HTTP 1.1. !--- Parse-lengh set to 2000 bytes. !--- Two policies added to vserver TRANSPARENT. vserver TRANSPARENT virtual 0.0.0.0 0.0.0.0 tcp www serverfarm CACHE persistent rebalance parse-length 2000 slb-policy CACHE-POLICY slb-policy NONCACHE-POLICY inservice ! !--- Fault Tolerance group 1. !--- Used to configure redundancy between modules 3 and 4. ft group 1 vlan 250 ! interface GigabitEthernet1/1 no ip address shutdown ! interface GigabitEthernet1/2 no ip address shutdown ! !--- CSM client side VLAN. Uplink to the Internet. interface FastEthernet2/1 no ip address switchport switchport access vlan 100 ! interface FastEthernet2/2 no ip address shutdown ! !--- Cache Engine connected to FE2/3 and FE2/4. !--- CSM client side VLAN. interface FastEthernet2/3 no ip address duplex full speed 100 switchport switchport access vlan 100 ! interface FastEthernet2/4 no ip address duplex full speed 100 switchport switchport access vlan 100 ! !--- CSM Server side VLAN. Connection to end users. interface FastEthernet2/5 no ip address switchport switchport access vlan 200 ! !--- MSFC VLAN 100. Content Engine and client uses this !--- address as the default gateway. interface Vlan100 ip address 10.107.249.250 255.255.255.248 ! ip classless ip route 0.0.0.0 0.0.0.0 10.107.249.249 no ip http server ! line con 0 line vty 0 4 password cisco login ! end |
|
Content Engine |
|---|
device mode content-engine ! hostname ce1 ! http proxy incoming 80 !--- Accept proxy requests on port 80. ! http l4-switch enable !--- Instructs the Content Engine to accept traffic that is !--- directed to any destination IP. ! ip domain-name cisco.com ! ! interface Fastethernet 0/0 ip address 10.107.249.254 255.255.255.248 exit ! interface Fastethernet 0/1 exit ! ip default-gateway 10.107.249.250 ! primary-interface Fastethernet 0/0 ! ! no auto-register enable ! ip name-server 10.107.241.185 ! ! username admin password 1 bVmDmMMmZAPjY username admin privilege 15 ! authentication login local enable primary authentication configuration local enable primary ! ! End of ACNS configuration |
Verify
This section provides information that you can use to confirm that 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.
Note: Before you issue debug commands, refer to Important Information on Debug Commands.
CSM debug and show Commands
-
show module
-
show arp—Provides the Server Load Balancing (SLB) Address Resolution Protocol (ARP) cache listing.
-
show conns—Provides SLB connection information.
-
show dfp —Provides SLB Dynamic Feedback Protocol (DFP) manager information.
-
show ft—Provides SLB Fault Tolerance (FT) information.
cat# show module csm 3 ft FT group 1, vlan 250 This box is active priority 20, heartbeat 1, failover 3, preemption is off cat# show module csm 4 ft FT group 1, vlan 250 This box is in standby state priority 10, heartbeat 1, failover 3, preemption is off
-
show map —Provides SLB map information.
-
show memory—Provides SLB memory information.
-
show natpools—Provides SLB client NAT pool information.
-
show policy—Provides SLB policy information.
-
show probe—Provides SLB probe information.
-
show reals—Provides SLB real server information.
-
show serverfarms—Provides SLB server farm information.
-
show static—Provides SLB static server NAT information.
-
show stats—Provides SLB statistics.
-
show status—Provides SLB status information.
-
show sticky—Provides SLB sticky database.
-
show tech-support—Provides SLB technical debug information.
-
show vlan—Provides SLB VLAN information.
-
show vservers—Provides SLB virtual server information.
show module csm 3 vservers name transparent detail TRANSPARENT, state = OPERATIONAL, v_index = 10 virtual = 0.0.0.0/0:80, TCP, service = NONE, advertise = FALSE idle = 3600, replicate csrp = none, vlan = ALL max parse len = 2000, persist rebalance = TRUE conns = 0, total conns = 47 Default policy: server farm = CACHE sticky: timer = 0, subnet = 0.0.0.0, group id = 0 Policy Tot Conn Client pkts Server pkts ------------------------------------------------------ CACHE-POLICY 44 249 203 NONCACHE-POLICY 37 111 37 (default) 0 0 0 -
module csm ?—Configures the CSM for transparent caching. Also specifies the location of the CSM that you are configuring.
cat(config)# module csm ? <1-6> slot where the CSM module resides
-
vserver proxy—Configures the virtual server.
cat(config-module-csm)# vserver proxy cat(config-slb-vserver)# ?
-
vserver advertise—Advertise the virtual IP address.
-
vserver client—Sets the client IP addresses.
-
vserver default—Sets a command to its defaults.
-
vserver exit—Exits server load balancing submode.
-
vserver idle—Sets idle timer.
-
vserver inservice—Enables service for this virtual server.
-
no vserver—Negates a command or sets its defaults.
-
vserver parse-length—Sets the maximum Layer 7 parse length.
-
vserver persistent—Enables or disables connection persistence.
-
vserver replicate—Sets vserver fault tolerance replication.
-
vserver serverfarm—Sets real server farm.
-
vserver slb-policy—Sets server load balancing policy.
-
vserver sticky—Sets sticky timer.
-
vserver url-hash—Sets prefix/suffix match for url-hash algorithm.
-
vserver virtual—Configures a virtual server.
-
serverfarm cache —Configures the server farm.
cat(config-module-csm)# serverfarm cache cat(config-slb-sfarm)# ?
-
serverfarm bindid—Binds ID for DFP.
-
serverfarm default—Sets a command to its defaults.
-
serverfarm exit—Exits SLB server farm submode.
-
serverfarm failaction—Action to take on real server failure.
-
serverfarm nat—Sets the address translation for SLB.
-
no serverfarm—Negates a command or sets its defaults.
-
serverfarm predictor—Sets the load balancing prediction algorithm.
-
serverfarm probe—Configures for the use of a probe.
-
serverfarm real —Configures a real server.
-
serverfarm redirect-vserver—Configures an SLB redirect virtual server.
Content Engine show Commands
-
show statistics http savings—Saves the statistics from the Content Engine.
ce1# show statistics http savings Statistics - Savings Requests Bytes ----------------------------------------------- Total: 635 2764599 Hits: 113 254517 Miss: 505 2483555 Savings: 17.8 % 9.2 %As you can see, there were 113 hits.
Troubleshoot
There is currently no specific information available to troubleshoot this configuration.
NetPro Discussion Forums - Featured Conversations
| NetPro Discussion Forums - Featured Conversations for CDN |
| Emerging Technologies: Content Networking |
Related Information
| Updated: Jan 30, 2006 | Document ID: 19680 |
