Document ID: 25999 |
Introduction
The Cisco Content Services Switch (CSS) series content services switch can route packets based on Layer 3 (L3), Layer 4 (L4), and Layer 5 (L5) information. Using the L5 functionality, traffic can be directed to specific server based on information in the URL or HTTP header (such as embedded cookies). The CSS uses the most granular (best) match in determining which rule is used eliminating any effort optimizing the order of the rules.
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.
Note: CSS 11000 is now End-of-Life. Refer to models and bulletin for more information.
The information presented in this document was created from devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. All servers are directly connected to the CSS. If you are working in a live network, ensure that you understand the potential impact of any command before using it.
Configure
In this section, you are presented with the information to configure the features described in this document.
Background Information
When a request comes in to the CSS, the request is evaluated against the configured content rules. The first test is for matches against rules with cookie strings. If there is no matching rule, the CSS tests for a match against rules with URL strings. If there is again no matching rule, the request is tested against rules for matching protocol (TCP or UDP) and port number. If there is still no match, the last test is for a matching VIP address. If there is no matching VIP, the packet will be routed or dropped.
In the configuration below, received packets are tested against the more specific rules L5_GIF and L5_HTML for a URL which includes the string .gif or .html with destination IP address 10.1.1.100, protocol TC, and port 80. If a request matches the URL string, protocol, port and IP address, it will be sent to the service Server1 or Server2 depending on which string was matched. If the received packet does not contain either string, it will be compared against the less specific content rule L3 for destination IP address 10.1.1.100. If this matches the request, the packet will be sent to one of the services selected using the configured balance method which, in this case, is the default of round-robin.
Configuration
This configuration uses the following setup:
-
Dedicated servers connected to the CSS.
-
Server1 is used for HTML pages.
-
Server2 is used for AVI and GIF files.
-
The Any server is used for anything else.
| Configuration |
|---|
!Generated on 09/20/2004 11:46:30
!Active version: sg0730106
configure
!************************** CIRCUIT **************************
circuit VLAN1
ip address 10.1.1.254 255.255.255.0
!************************** SERVICE **************************
!--- Poll all the servers using /index.html for the keepalive.
service Server1
ip address 10.1.1.1
keepalive uri "/index.html"
keepalive type http
active
service Server2
ip address 10.1.1.2
keepalive type http
keepalive uri "/index.html"
active
service Server3
ip address 10.1.1.3
keepalive type http
keepalive uri "/index.html"
active
service Server4
ip address 10.1.1.4
keepalive type http
keepalive uri "/index.html"
active
!*************************** OWNER ***************************
owner foo.com
content L3
!--- This is the catch all rule. This rule handles any pages that do
!--- not match the other rules.
vip address 10.1.1.100
add service Server1
add service Server2
add service Server4
add service Server3
active
content L5_GIF
vip address 10.1.1.100
port 80
protocol tcp
url "/*.gif"
!--- If the request is for a gif,
!--- Server2 handles it.
add service Server2
active
content L5_HTML
vip address 10.1.1.100
port 80
protocol tcp
url "/*.html"
!--- If the request is for an HTML document,
!--- Server1 handles it.
add service Server1
active
|
Verify
Using a browser, enter the URL of the VIP (10.1.1.100) and repeat. Notice in the show summary command output that it Round Robins (default) around all four servers using the L3 rule (because neither of the two L5 rules were met).
Point the browser to http://10.1.1.100/1.gif, and note that the request is sent to Server2. Try again with another GIF file (such as 2.gif).
Point the browser to http://10.1.1.100/1.html. It is now going to Server1. Repeat with another HTML document (such as index.html). Repeat the test using 1.jpg. Since it does not match any of the L5 rules, the L3 rule balances it over the four servers.
Troubleshoot
There is currently no specific troubleshooting information available for this configuration.
Related Information
- CSS 11500 Series Content Services Switches Technical Support
- CSS 11500 Series Content Services Switches Technical Documentation
- CSS 11500 Series Content Services Switches Software Downloads
- Technical Support - Cisco Systems
| Updated: Jan 31, 2006 | Document ID: 25999 |
Feedback