CSS Content Load-Balancing Configuration Guide (Software Version 7.30)
Configuring Services

Table Of Contents

Configuring Services

Service, Owner, and Content Rule Overview

Configuring Services

Service Configuration Quick Start

Creating a Service

Assigning an IP Address to the Service

Specifying a Port

Specifying a Protocol

Specifying a Domain Name

Specifying an HTTP Redirect String

Prepending "http://" to a Redirect String or a Domain

Configuring an Advanced Load-Balancing String

Configuring a Service HTTP Cookie

Configuring Weight and Graceful Shutdown

Specifying a Service Type

How the CSS Accesses Server Types

Configuring Service Access

Bypassing Content Rules on Caches

Configuring Network Address Translation for Transparent Caches

Configuring a Service to Bypass a Cache Farm

Configuring Maximum TCP Connections

Configuring Keepalives for a Service

Activating a Service

Suspending a Service

Showing Service Configurations

Clearing Service Statistics Counters

Configuring Keepalives

CSS Keepalive Overview

Configuring Service Keepalives

Configuring Global Keepalives

Creating and Naming a Global Keepalive

Configuring a Global Keepalive IP Address

Configuring a Global Keepalive Description

Activating the Global Keepalive

Suspending a Global Keepalive

Associating a Service with a Global Keepalive

Configuring Service and Global Keepalive Attributes

Configuring a Keepalive Frequency

Configuring a Keepalive Retry Period

Configuring the Maximum Number of Failures for a Keepalive

Configuring a Keepalive Type

Configuring a TCP Keepalive with Graceful Socket Close (FIN)

Configuring a Keepalive Port Number

Configuring the HTTP Keepalive Method

Configuring a Keepalive HTTP Response Code

Configuring a Keepalive URI

Configuring a Keepalive Hash Value

Showing Keepalive Configurations

Using Script Keepalives with Services

Script Keepalive Considerations

Configuring Script Keepalives

Viewing a Script Keepalive in a Service

Script Keepalive Status Codes

Script Keepalives and Upgrading WebNS Software

Configuring Source Groups

Source Group Configuration Quick Start

Creating a Source Group

Source Group Commands

Source Group Port Mapping Behavior

Configuring a Source Group for FTP Connections

Configuring Source Groups to Allow Servers to Resolve Domain Names Using the Internet

Showing Source Groups

Clearing Source Group Counters

Configuring Relative Load for Services

Relative Load Overview

Configuring Relative Load

Relative Load Configuration Quick Start

Configuring Global Load Reporting

Configuring the Relative Load Step

Configuring the Global Load Threshold

Configuring the Load Teardown Timer

Configuring the Load Ageout Timer

Showing Global Service Loads

Configuring the Absolute Load Calculation Method

Overview of Calculating Absolute Load

Configuration Requirements and Restrictions

Absolute Load Configuration Quick Start

Configuring Load Calculation

Using the load absolute-sensitivity Command

Configuring load absolute-sensitivity

Optimizing the Absolute Load Number Scale

Configuring Load Variance

Displaying Relative Load Statistics

Displaying Absolute Load Calculation Ranges

Using ArrowPoint Content Awareness Based on Server Load and Weight

Using ACA Based on Server Load

Using ACA Based on Server Weight and Load

Configuring the Load Command for Use with ACA

Configuring Dynamic Feedback Protocol for Server Load Balancing

DFP Overview

Functions of a DFP Agent

Types of DFP Messages

DFP System Flow

Configuring a DFP Agent

Maintaining a Consistent Weight Range Among Services

Displaying Configured DFP Agents

Displaying Services Supported by Configured DFP Agents

Displaying DFP Information

Using the show service Command

Using the show rule services Command

Where to Go Next


Configuring Services


This chapter describes how to configure services, service, global, and script keepalives, source groups, and load for services. This chapter also contains an overview of the association between services, owners, and content rules. Information in this chapter applies to all CSS models except where noted.

This chapter contains the following major sections:

Service, Owner, and Content Rule Overview

Configuring Services

Configuring Keepalives

Configuring Source Groups

Configuring Relative Load for Services

Configuring the Absolute Load Calculation Method

Configuring Dynamic Feedback Protocol for Server Load Balancing

Service, Owner, and Content Rule Overview

The CSS enables you to configure services, owners, and content rules in order to direct requests for content to a specific destination service (for example, a server or a port on a server). By configuring services, owners, and content rules, you optimize and control how the CSS handles each request for specific content. Services, owners, and content rules are described below:

A service is a destination location where a piece of content resides physically
(a local or remote server and port). You add services to content rules. Adding a service to a content rule includes it in the resource pool that the CSS uses for load-balancing requests for content. A service may belong to multiple content rules.

An owner is generally the person or company who contracts the Web hosting service to host their Web content and allocate bandwidth as required. Owners can have multiple content rules.

A content rule is a hierarchical rule set containing individual rules that describe which content (for example, an .html file) is accessible by visitors to the Web site, how the content is mirrored, on which server the content resides, and how the CSS should process requests for the content. Each rule set must have an owner.

The CSS uses content rules to determine:

Where the content physically resides, whether local or remote

Where to direct the request for content (which service or services)

Which load balancing method to use

When a request for content is made, the CSS:

1. Uses the owner content rule to translate the owner Virtual IP address (VIP) or domain name using Network Address Translation (NAT) to the corresponding service IP address and port.

2. Checks for available services that match the content request.

3. Uses content rules to choose which service can best process the request for content.

4. Applies all content rules to service the request for content (for example, load-balancing method, redirects, failover, stickiness).

Figure 1-1 illustrates the CSS service, owner, and content rule concepts.

Figure 1-1 Services, Owners, and Content Rules

Configuring Services

The following sections describe how to create and configure content services.

Service Configuration Quick Start

Creating a Service

Assigning an IP Address to the Service

Specifying a Port

Specifying a Protocol

Specifying a Domain Name

Specifying an HTTP Redirect String

Prepending "http://" to a Redirect String or a Domain

Configuring an Advanced Load-Balancing String

Configuring a Service HTTP Cookie

Configuring Weight and Graceful Shutdown

Specifying a Service Type

Configuring Service Access

Bypassing Content Rules on Caches

Configuring Network Address Translation for Transparent Caches

Configuring a Service to Bypass a Cache Farm

Configuring Maximum TCP Connections

Configuring Keepalives for a Service

Activating a Service

Suspending a Service

Showing Service Configurations

Clearing Service Statistics Counters


Note The CSS supports Adaptive Session Redundancy (ASR) on the Cisco 11500 series CSS peers in an active-backup VIP redundancy and virtual interface redundancy environment to provide stateful failover of existing flows. For details on ASR, refer to the Cisco Content Services Switch Global Server Load-Balancing Configuration Guide.


Service Configuration Quick Start

Table 1-1 provides a quick overview of the basic steps required to configure a service. Each step includes the CLI command required to complete the task. For a complete description of each feature and all the options associated with the CLI commands, see the sections following Table 1-1.

Table 1-1 Service Configuration Quick Start 

Task and Command Example

1. Enter config mode by typing config.

# config
(config)#

2. Create services. When you create a service, the CLI enters that service mode, as shown in the command response below. To create additional services, reenter the service command.

(config)# service serv1
(config-service[serv1])#
(config-service[serv1])# service serv2
(config-service[serv2])#

3. Assign an IP address to each service. The IP address is the actual IP address of the server.

(config-service[serv2])#
(config-service[serv2])# ip address 10.3.6.2
(config-service[serv2])# service serv1
(config-service[serv1])# ip address 10.3.6.1

4. Activate each service.

(config-service[serv1])# active
(config-service[serv1])# service serv2
(config-service[serv2])# active
(config-service[serv2])# exit

5. (Recommended) Display service information to verify your configuration.

(config-service[serv2])# show service summary

The following running-configuration example shows the results of entering the commands in Table 1-1.

!************************** SERVICE **************************
service serv1
  ip address 10.3.6.2
  active

service serv2
  ip address 10.3.6.1
  active

Creating a Service

A service can be a destination location or entity that contains and provides Internet content (for example, a server, an application on a server such as FTP, or streaming audio). A service has a name that is associated with an IP address and optionally, a protocol and a port number.

By creating a service, you identify the service and enable the CSS to recognize it. You can then apply content rules to services that allow the CSS to:

Direct requests for content to the service

Deny requests for content from the service

Enter a service name from 1 to 31 characters. For example, to create service serv1, enter:

(config)# service serv1

The CSS transitions into the newly created service mode.

(config-service[serv1])#

Assigning an IP Address to the Service

To enable the CSS to direct requests for content to the appropriate service, you must assign an IP address or range of IP addresses to a service. Assigning an IP address to a service identifies the service to the CSS. When the CSS receives a request for content, it translates the VIP (and potentially, the port) to the service IP address (or addresses) and port.

For example, to assign an IP address to serv1, enter:

(config-service[serv1])# ip address 172.16.1.1

To restore a service IP address to the default of 0.0.0.0, enter:

(config-service[serv1])# no ip address


Note Some services do not require an IP address. Services that does not require an IP address are:

Services configured with the ssl-accel service type

Services configured with the redirect service type

Services configured with the bypass-hosttag command

You must configure these services with a keepalive type of none.


The range option allows you to specify a range of IP addresses starting with the IP address you specified using the ip address command. Enter a number from 1 to 65535. The default range is 1. For example, if you enter an IP address of 172.16.1.1 with a range of 10, the IP addresses range from 172.16.1.1 through 172.16.1.10.

For example, enter:

(config-service[serv1])# ip address 172.16.1.1 range 10

When using the ip address range command, use IP addresses that are within the subnet you are using. The CSS does not arp for IP addresses that are not on the circuit subnet. For example, if you configure the circuit for 10.10.10.1/24 and configure the VIP range as 10.10.10.2 range 400, the CSS will not arp for any IP addresses beyond 10.10.10.254. Using the same example only with a VIP range of 200, the CSS will arp for all IP addresses in the range.


Note The CSS sends keepalives only to the first address in a service range. If you configure a scripted keepalive, it should contain the first address in a service range as one of its arguments.

For the CSS to forward requests to a service on any of the addresses in a range, the CSS must successfully arp for the first address in the range. This behavior is independent of keepalives.


Specifying a Port

The TCP or UDP destination port number is associated with a service. Use the port command to specify a service TCP/UDP port number or range of port numbers. Enter the port number as an integer from 0 to 65535. The default is 0 (any).

For example, enter:

(config-service[serv1])# port 80

To specify a port to be used for keepalives, use the service mode keepalive port command.

Use the range option to specify a range of port numbers starting with the port number you specified using the port command. Enter a range number from 1 to 65535. The default range is 1. For example, if you enter a port number of 80 with a range of 10, the port numbers will range from 80 through 89. You can use the port range command only on local (default) services.

For example, enter:

(config-service[serv1])# port 80 10

To set the port to the default of 0 (any), enter:

(config-service[serv1])# no port

Specifying a Protocol

By default setting, the CSS uses any IP protocol for the service. To specify the service IP protocol that the service is to use, use the protocol command. The options for this command are:

protocol tcp - The service uses the TCP protocol suite

protocol udp - The service uses the UDP protocol suite

For example, enter:

(config-service[serv1])# protocol tcp

To set the protocol to the default of any, enter:

(config-service[serv1])# no protocol

Specifying a Domain Name

The CSS uses the configured domain name in the redirect message as the new location for the requested content. The CSS prepends the domain name to the requested URL. If the domain name is not configured, the CSS uses the domain in the host-tag field from the original request. If no host tag is found, the CSS uses the service IP address to generate the redirect. Use the domain command to specify the domain name that will be prepended to a requested piece of content when an HTTP redirect service generates an "object moved" message for the service.


Note You can use a service redirect domain only on a service type configured to redirect. You must specify the domain command in order for a redirect service to obtain an applicable HTTP redirect.



Note You cannot configure the domain and (config-service) redirect-string commands simultaneously on the same service.



Note The redirect-string and (config-service) domain commands are similar. The CSS returns the redirect-string command string as configured. With the (config-service) domain command, the CSS prepends the domain to the original requested URL.


Enter the service domain name as an unquoted text string with no spaces and a maximum length of 64 characters.


Note The CSS automatically prepends the domain name with "http://".


For example, enter:

(config-service[serv1])# domain www.arrowpoint.com

or

(config-service[serv1])# domain 172.16.3.6

To clear the redirect domain for this service, enter:

(config-service[serv1])# no domain www.arrowpoint.com

or

(config-service[serv1])# no domain 172.16.3.6

Specifying an HTTP Redirect String

The CSS uses the entire configured redirect string as the new location for the requested content. If no string is configured, the CSS prepends the domain configured with the (config-service) domain command to the original request. If neither the redirect string nor the domain name is configured, the CSS uses the domain in the host-tag field from the original request combined with the requested HTTP content. If no host tag is found, the CSS uses the IP address of the service to generate the redirect.

Use the redirect-string command to specify an HTTP redirect string to be used when an HTTP redirect service generates an "object moved" message for the service.


Note You can use a redirect string only on a service of type redirect.



Note The redirect-string and (config-service) domain commands are similar. The CSS returns the redirect-string command string verbatim as configured. However, the CSS prepends the domain configured with the (config-service) domain command to the original requested URL.



Note You cannot configure the redirect-string and (config-service) domain commands simultaneously on the same service.


The syntax for this service mode command is:

redirect-string string

Enter the HTTP redirect string as an unquoted text string with no spaces. Enter a maximum of 64 characters. Use quotation marks when you want to include a question mark in the string.

For example, enter:

(config-service[serv1])# redirect-string www.arrowpoint.com

To remove the redirect string from the service, enter:

(config-service[serv1])# no redirect-string www.arrowpoint.com

Prepending "http://" to a Redirect String or a Domain

By default, the CSS prepends "http://" to a redirect string or domain. To disable prepending "http://" to a redirect string or domain configured on a service, enter:

(config-service[serv1])# no prepend-http 

Use the prepend-http command to prepend "http://" to a redirect string or domain configured for a service.

For example, enter:

(config-service[serv1])# prepend-http

Configuring an Advanced Load-Balancing String

You can specify an advanced load-balancing method for a content rule that includes stickiness. A content rule is "sticky" when additional sessions from the same user or client are sent to the same service as the first connection, overriding normal load balancing. By default, the advanced balancing method is disabled.

To specify an advanced load-balancing string for a service, use the string command. Use this command in conjunction with the advanced load-balancing methods url, cookie, or cookieurl. For information on advanced load-balancing methods, refer to Chapter 4, Configuring Sticky Parameters for Content Rules.

Enter a string from 1 to 15 characters. For example, enter:

(config-service[serv1])# string 172.16.3.6

To remove a string from a service, enter:

(config-service[serv1])# no string

Configuring a Service HTTP Cookie

If you are using advanced-balance cookies, url, or cookieurl to match an exact string, you must configure the unique string that you want to use for matching each server. Use the string command to specify the HTTP cookie for the service. The syntax for this service mode command is:

string cookie_name

Enter the cookie_name as an unquoted text string with no spaces and a maximum of 15 characters.

For example, enter:

(config-service[serv1])# string userid3217

To remove the cookie for a service, enter:

(config-service[serv1])# no string

For information on configuring sticky on the CSS, refer to Chapter 4, Configuring Sticky Parameters for Content Rules.

Configuring Weight and Graceful Shutdown

The CSS uses this weight when you configure an ACA or weighted roundrobin load balancing method on a content rule. By default, all services have a weight of 1. A higher weight will bias flows toward the specified service. For background information on ACA load-balancing decisions based on server weight, see the "Using ArrowPoint Content Awareness Based on Server Load and Weight" section later in this chapter.

To specify the relative weight of the service, use the weight command in service mode. To set the weight for a service, enter a number from 0 (graceful shutdown) to 10. The default is 1.

If you want to perform a graceful shutdown of an overloaded service or take a service offline for maintenance, specify a weight of 0 so no new connections, except the connections for existing sticky sessions, will be directed to the service. Over time, as existing sticky sessions complete, the load on the service begins to diminish. Changing the weight from 0 to a value between 1 and 10 causes the service to be brought back into rotation for all load balancing methods.


Note If you configure the absolute load calculation method on a CSS and then set a weight of zero on a service, the CSS does not include the load of that service in any content rule load that the CSS advertises.

The CSS recognizes content requests that include a location cookie as part of a sticky session. Therefore, even if you add a service with a configured weight of zero as a location service to a content rule, the CSS continues to direct to that service any requests that contain location cookies originating from the service.


For example, to specify a weight of 2, enter:

(config-service[serv1])# weight 2

To specify a weight of 0 to gracefully shut down a specific service, enter:

(config-service[serv1])# weight 0

To restore the weight to the default of 1, enter:

(config-service[serv1])# no weight

If you configure a weight on a service using the weight command, and there is a configured Dynamic Feedback Protocol (DFP) agent for the service, the configured weight for the DFP agent takes precedence over the weight configured on a service (weighted round-robin load-balancing method only).

When you add a service to one or more content rules, the CSS applies the service weight, as configured in service mode, to each content rule as a server-specific attribute. To specify a content rule-specific server weight (assuming the content rule is using a weighted load-balancing method), use the weight option of either the add service command. These two commands override the server-specific weight and apply only to the content rule to which you add the service. For information on using the add service command, see the "Specifying a Service Weight" section in Chapter 3, Configuring Content Rules.

Specifying a Service Type

By default, the service type is local. Use the type command to specify the type for a service. The syntax and options for this service mode command are:

type nci-direct-return - Specify the service as NAT channel indication for direct return.


Note Use the type nci-direct-return command to configure NAT peering. For information on NAT peering, see Chapter 7, Configuring Caching.


type nci-info-only - Specify the service as NAT channel indication for information only.

type proxy-cache - Define the service as a proxy cache. This is a cache-specific option. This option bypasses content rules for requests coming from the cache server. Bypassing content rules in this case prevents a loop between the cache and the CSS. For a description of a proxy cache, see Chapter 7, Configuring Caching.

type redirect - Define the service as a remote service to enable the CSS to redirect content requests to the remote service when a local service is not available (for example, the local service has exceeded its configured load threshold). To configure a load threshold for a content rule, use the load-threshold command in owner-content mode (see the "Specifying a Load Threshold" section in Chapter 3, Configuring Content Rules). If you have multiple remote services defined as type redirect, the CSS uses the roundrobin load-balancing method to load balance requests between them.

When you add a type redirect service to a content rule, you must also configure a URL to match on the content. For example, "/*" or "/vacations.html".

type redundancy-up - Specify the router service in a redundant uplink.

type rep-cache-redir - Specify the service as a replication cache with redirect.

type rep-store - Specify the service as a replication store.

type rep-store-redir - Specify the service as a replication store with redirect. No content rules are applied to requests from this service type.

ssl-accel - Specify that this is an SSL acceleration service for the SSL Acceleration Module. This allows you to:

Configure the service as an SSL acceleration service.

Add the SSL proxy list to an SSL service through the (config-service) add ssl-proxy-list command.

For more information on configuring SSL termination, refer to the
Cisco Content Services Switch Security Configuration Guide.

ssl-accel-backend - Specify that this is a service for a backend SSL server. This allows you to:

Configure the service as a backend SSL server.

Add the SSL proxy list to an SSL service through the (config-service) add ssl-proxy-list command.

For more information on configuring a backend SSL server, refer to the
Cisco Content Services Switch Security Configuration Guide.

type transparent-cache - Specify the service as a transparent cache. This is a cache-specific option. No content rules are applied to requests from this service type. Bypassing content rules in this case prevents a loop between the cache and the CSS. For a description of a transparent cache, see Chapter 7, Configuring Caching.

For example, to enable the CSS to redirect content requests for serv1, specify redirect in the serv1 content rule:

(config-service[serv1])# type redirect

To restore the service type to the default setting of local, enter:

(config-service[serv1])# no type

How the CSS Accesses Server Types

When you configure a Layer 3 or Layer 4 content rule, the rule hits the local services. If:

The local services are not active or configured, the rule hits the primary sorry server.

The primary sorry server fails, the rule hits the secondary sorry server.

Redirect services and redirect content strings cannot be used with Layer 3 or Layer 4 rules because they use the HTTP protocol.

When you configure a Layer 5 content rule, the CSS directs content requests to local services. If:

The local services are not active or configured, the rule sends the HTTP redirects with the location of the redirect services to the clients.

The local and redirect services are not active or configured, the rule forwards the HTTP requests to the primary sorry server.

All services are down except the secondary sorry server, the rule forwards the HTTP requests to the secondary sorry server.

For information on adding a service to a content rule or adding primary and secondary sorry servers, see Chapter 3, Configuring Content Rules.

Configuring Service Access

When a service offers publishing services, you must associate an FTP access mechanism for moving content during publishing, subscribing, and demand-based replication activities. Use the access command to associate an FTP access mechanism with a service. You must use this command for each service that offers publishing services. This command is optional for subscriber services; the subscriber service inherits the access mechanism from the publisher.

When you use this command to associate an FTP access mechanism with a service, the base directory of an existing FTP record becomes the tree root. To maintain coherent mapping between WWW daemons and FTP daemons, make the FTP access base directory equivalent to the WWW daemon root directory as seen by clients. For information on creating an FTP record, refer to the (config) ftp-record command in the Cisco Content Services Switch Administration Guide.

Enter the name of the existing FTP record as an unquoted text string with no spaces.

For example, enter:

(config-service[serv1])# access ftp arrowrecord

To remove a service access mechanism, enter:

(config-service[serv1])# no access ftp

Bypassing Content Rules on Caches

By default, no content rules are applied to requests from a proxy or transparent-cache type service. Use the cache-bypass command to prevent the CSS from applying content rules to requests originating from a proxy or transparent-cache type service when it processes the requests.


Note For a description of proxy and transparent caching, see Chapter 7, Configuring Caching.


For example, enter:

(config-service[serv1])# cache-bypass

To allow the CSS to apply content rules to requests from a proxy or transparent-cache type service, enter:

(config-service[serv1])# no cache-bypass

Configuring Network Address Translation for Transparent Caches

By default, destination Network Address Translation (NAT) for the transparent cache service type is disabled. Use the transparent-hosttag command to enable destination NAT for the transparent cache service type.

Currently, you can use the transparent-hosttag command only with a CSS operating in a Client Side Accelerator (CSA) environment. For details on CSA, refer to the Content Services Switch Global Server Load-Balancing Configuration Guide.


Note For a description of a transparent cache, see Chapter 7, Configuring Caching.


For example, enter:

(config-service[serv1])# transparent-hosttag

To disable destination NATing for the transparent cache service type, enter:

(config-service[serv1])# no transparent-hosttag

Configuring a Service to Bypass a Cache Farm

By default, the CSS bypasses cache for non-cacheable content. Use the bypass-hosttag command to allow the CSA on the CSS to bypass a cache farm and establish a connection with the origin server to retrieve non-cacheable content. The domain name from the host-tag field is used to look up the origin
IP address on the CSA.

Currently, you can use the bypass-hosttag command only with a CSS operating in a CSA environment. For details on CSA, refer to the Cisco Content Services Switch Global Server Load-Balancing Configuration Guide.

For example, enter:

(config-service[serv1])# bypass-hosttag

To disable bypassing cache for non-cacheable content, enter:

(config-service[serv1])# no bypass-hosttag

Configuring Maximum TCP Connections

By default, there is no limit on the number of TCP connections on a service. To define the maximum number of TCP connections on a service, use the max connections command. Enter the maximum number of connections from 6 to 65534. The default is 65534, which indicates that there is no limit on the number of connections.


Note If you configure the absolute load calculation method on a CSS and a service exceeds the configured maximum number of connections, the CSS does not include the load of that service in any content rule load that the CSS advertises.


For example:

(config-service[serv1])# max connections 7

To set the maximum TCP connections to the default value, enter:

(config-service[serv1])# no max connections


Note Do not use service max connections on UDP content rules. The service connection counters do not increment and remain at 0 because UDP is a connectionless protocol.


Configuring Keepalives for a Service

The default service keepalive is ICMP with a frequency and retry period of 5 seconds, and a maximum failure rate of 3 times. For information on configuring keepalives for a service, see the "Configuring Keepalives" section later in this chapter.

Activating a Service

Once you configure a service, you must activate it to enable the CSS to access it for content requests. Activating a service puts it into the resource pool for load-balancing content requests and starts the keepalive function.


Note Once a service is activated, the following commands cannot be changed for the active service: ip address, port, protocol, type, transparent-hosttag, and bypass-hosttag. If you need to make modifications to an active service, you must first suspend it.


The following command activates service serv1:

(config-service[serv1])# active

Note The CSS supports one active SSL service for each SSL Acceleration Module in the chassis (one SSL service per slot). You can configure more than one SSL service for a slot, but only a single SSL service can be active at a time. Before you can activate the service, you must add an SSL proxy list to an ssl-accel type service and then activate the SSL proxy list.


For information on adding to a content rule, see Chapter 3, Configuring Content Rules. For information on adding a service to a source group, see the "Configuring Source Groups" section later in this chapter.

Suspending a Service

Suspending a service removes it from the pool for future load-balancing content requests. Suspending a service does not affect existing content flows, but it prevents additional connections from accessing the service for its content. You may want to suspend a service prior to performing maintenance on the service. The following command suspends service serv1:

(config-service[serv1])# suspend

Note When you suspend a service, the CSS rebalances the remaining services using the failover setting.


Showing Service Configurations

Before activating a service, you may want to display the service configuration to ensure that all the parameters are correct. The show service command enables you to display information for a specific service or all services currently configured in the CSS, depending on the location from where you issue the command.

You can issue the following show service commands from any mode:

show service - Display configurations for a service.

show service service_name - Display service information for a specific service.

show service summary - Display a summary of each service.

From a specific service mode, the show service command displays configuration information only for that service. For example:

(config-service[serv1])# show service

When you issue this command from any other mode, it displays configuration information for all services.

To display information for a specific service, use the show service command with the service name. For example:

# show service serv86

The show service summary command displays a summary of all service currently configured.


Note The connection counters displayed with the show service command do not increment and remain at 0 for UDP flows. UDP is a connectionless protocol.


Table 1-2 describes the fields in the show service command output.

Table 1-2 Field Descriptions for the show service Command
Output 

Field
Description

Name

The name of the service.

Index

The CSS assigned unique numeric index.

Type

The type for the service. If you do not define a type for the service, the default service type is local. The possible types are:

nci-direct-return - A NAT channel indication (NCI) service for NAT peering.

nci-info-only - The service is NAT channel indication for information only.

proxy-cache - The service is a proxy cache. This type bypasses content rules for requests from the cache.

redirect - The service is not directly accessible and requires redirection.

redundancy-up - The service is a redundant uplink.

rep-cache-redir - The service is a replication cache with redirect.

rep-store - The service is a replication store server for hot content.

rep-store-redir - The service is a replication store to which content requests are redirected.

ssl-accel - Specify that this is an SSL acceleration service for an SSL Acceleration Module.

transparent-cache - The service is a transparent cache. No content rules are applied to requests from the cache.

State

The state of the service. The State field displays the service as Alive, Dying, Down, or Suspended. The Dying state reports that a service is failing according to the parameters configured in the following service mode commands: keepalive retryperiod, keepalive frequency, and keepalive maxfailure. When a service enters the Down state, the CSS does not forward any new connections to it (the service is removed from the load-balancing rotation for the content rule). However, the CSS keeps all existing connections to the service (that is, connections to that service are not "torn down").

Rule

The address, protocol, and port information for the service.

Redirect Domain

The domain name to be used when an HTTP redirect service generates an OBJECT MOVED message for the service.

Session Redundancy

Indicates whether Adaptive Session Redundancy (ASR) is enabled or disabled for the service. For details on ASR, refer to the Cisco Content Services Switch Global Server Load-Balancing Configuration Guide.

SSL-Accel Slot

The slot in the CSS where the SSL module is located. An SSL service requires the SSL module slot number in order to correlate the SSL proxy list to a specific SSL module. For details on SSL, refer to the Cisco Content Services Switch Security Configuration Guide.

Session Cache Size

The size of the SSL session ID cache for the service. The cache size is the maximum number of SSL session IDs that can be stored in a dedicated session cache on an SSL module.

Redundancy Global Index

The unique global index value for ASR assigned to the service using the redundant-index command in service configuration mode.

Redirect String

The HTTP redirect string to be used when an HTTP redirect service generates an OBJECT MOVED message for the service.

Keepalive

The keepalive type, frequency, maxfailure, and retry period. The possible keepalive types are:

ftp - The keepalive method that accesses an FTP server by logging in to an FTP server as defined in an FTP record file.

http - An HTTP index page request. By default, HTTP keepalives attempt to use persistent connections. For an HTTP Head keepalive, the response code is also displayed.

icmp - An ICMP echo message (default).

named - Global keepalive defined in keepalive configuration mode.

none - Do not send keepalive messages to the service.

script - Script keepalive to be used by the service. The script is played each time the keepalive is issued.

ssl - SSL HELLO keepalives for this service. Use this keepalive for all backend services supporting SSL. When the CSS is using an SSL module, use the keepalive type of none.

tcp - TCP connection handshake request.

The keepalive frequency value is the interval in seconds between keepalive messages sent to the service. The default is 5. The range is from 2 to 255.

The keepalive maxfailure value is the number of times the service can fail to respond to a keepalive message before being considered down. The default is 3. The range is from 1 to 10.

The keepalive retry period value is the interval in seconds between retry messages sent to the service. The default is 5. The range is from 2 to 255.

Last Clearing of Stats Counters

The date and time when the State Transitions, Total Connections, or Total Reused Conns. counters were last cleared (reset to 0). The date and time stamp initially shown reflects when the service was activated or 01/01/00 00:00:00 if the service is down.

Mtu

The size of the largest datagram that can be sent or received on the service.

State Transitions

The total number of state transitions on the service. If the State Transitions field is 0, the 0 value can be due to a counter reset through either the global configuration mode zero service state-transitions command or the content mode zero state-transitions command. The counter can also be 0 if the service is down, or if the service is alive but no traffic is running.

Total Local Connections

Total number of TCP connections mastered by the CSS in an ASR configuration.

Current Local Connections

Number of current active TCP connections on the CSS in an ASR configuration.

Total Backup Connections

Total number of TCP connections backed up by the CSS for the master CSS in an ASR configuration.

Current Backup Connections

Number of curent TCP connections that the CSS is backing up in an ASR configuration.

Total Connections

The total number of connections that have been mapped to the service. In an Adaptive Session Redundancy configuration, Total Connections equals the sum of the Total Local Connections and the Total Backup Connections. If the Total Connections field is 0, the 0 value can be due to a counter reset through either the global configuration mode zero service total-connections command or the content mode zero total-connections command. The counter can also be 0 if the service is down, or if the service is alive but no traffic is running.

Max Connections

The configured maximum number of TCP connections on the service.

Total Reused Conns.

The total number of connections that were reused for multiple content requests during persistent connections. If the Total Reused Conns field is 0, the 0 value can be due to a counter reset through either the global configuration mode zero service total-reused-connections command or the content mode zero total-reused connections command. The counter can also be 0 if the service is down, or if the service is alive but no traffic is running.

Weight

The service weight used with load metrics to make load allocation decisions. The weight is used in ArrowPoint Content Awareness (ACA) and weighted roundrobin load balancing decisions. The range is from 1 to 10. The default is 1.

Load/Average Load

The current and average load for the service.

DFP

State of the Dynamic Feedback Protocol (DFP). Possible states are Enable or Disable. The DFP state is Disable if either DFP is not configured or DFP is configured and you have configured a weight on a service using the add service weight command in owner-content configuration mode. For details on DFP, see the "Configuring Dynamic Feedback Protocol for Server Load Balancing" section later in this chapter.


Clearing Service Statistics Counters

To clear a specific service statistics counter for all existing CSS services and to set that counter to zero, use the zero service command. The reset statistics appear as 0 in the show service display. The zero service command is available in all modes.

Use the following zero service commands from any mode:

zero service total-connections - Set the Total Connections counter to zero for all services

zero service total-reused-connections - Set the Total Reused Conns. counter to zero for all services

zero service state-transitions - Set the State Transitions counter to zero for all services

For example, to clear the Total Connections counter for all services, enter:

(config)# zero service total-connections


Note To clear statistics counters for all services belonging to a specific content rule, use the the zero command in content mode. You can also use this command to clear the counters for a specified service associated with the content rule. For details on clearing service statistics associated with a content rule, see Chapter 3, Configuring Content Rules.


Configuring Keepalives

When you configure a service on the CSS, the CSS determines the state of the service by sending keepalive messages. By default, the CSS assigns each service with an ICMP keepalive with a frequency and retry period of 5 seconds, and a maximum failure rate of 3 times. To change the default keepalive settings for a service, you can configure individual keepalive attributes for the service or create a keepalive in keepalive mode and apply the service to it.

The following sections provides the following information to configure CSS keepalives:

CSS Keepalive Overview

Configuring Service Keepalives

Configuring Global Keepalives

Configuring Service and Global Keepalive Attributes

Showing Keepalive Configurations

Using Script Keepalives with Services

CSS Keepalive Overview

The CSS supports a total of 2048 keepalives. These keepalives include:

ICMP, HTTP-GET, HTTP-HEAD, TCP, FTP, SSL, and script keepalives configured and assigned to a service through the (config-service) keepalive type command. By default, a service has an ICMP keepalive. Each time you assign one of these keepalives to a service through this command, the CSS counts it as one keepalive. For information on configuring service keepalives, see the "Configuring Service Keepalives" section.

Global keepalives configured in keepalive configuration mode. You can apply multiple services to a global keepalive reducing the amount of configuration required for each service. The CSS counts a global keepalive as one keepalive regardless of the number of services assigned to it.

Global keepalives supersede the individual keepalive parameters configured in service mode. For information on configuring global keepalives, see the "Configuring Global Keepalives" section later in this chapter.

The CSS divides the keepalive types into two categories, Class A and Class B keepalives. The CSS supports a maximum of 2048 Class A keepalives. The CSS supports a maximum of 512 Class B keepalives.

Table 1-3 lists the keepalive types in each class, the maximum number of each type, and the maximum number of each keepalive type that can execute concurrently.

Table 1-3 Keepalive Class, Types, and Limitations  

Class
Type
CSS Maximum
Concurrent Maximum

A

(The CSS limits 2048 keepalives per Class A.)

ICMP

2048

2048

HTTP-HEAD non-persistent

2048

2048

SSL (Hello)

2048

2048

TCP

2048

2048

B

(The CSS limits 512 keepalives per Class B.)

FTP

256

32

HTTP-GET persistent and non-persistent

256

32

HTTP-HEAD persistent

256

32

Script

256

16



Caution Do not configure more than 2048 total keepalives, including a total of 512 Class B keepalives. Any services assigned to keepalives over the supported total number will not be eligible for content rule selection.

When you configure a keepalive for a service (or associate a service with a global keepalive), the CSS periodically sends a message to the service based on the keepalive frequency to determine the state of the service. See the "Configuring a Keepalive Frequency" section. The CSS considers the service to be alive when a service responds to the keepalive message.

The CSS transitions the service to the dying state when the service fails to respond to a keepalive message. The CSS tests whether the failed service is functional by sending a keepalive message at time intervals based on the retry period. See the "Configuring a Keepalive Retry Period" section.

The CSS transitions the service to the down state if the service fails to respond a maximum number of retries to the keepalive message. See the "Configuring the Maximum Number of Failures for a Keepalive" section. Then the CSS removes the service from the load-balancing algorithm. The CSS continues to test whether the service is functional at time intervals based on the retry period.

Thus, using the default values of a 5-second keepalive frequency interval, a 5-second retry period interval, and maximum of three failures, a service can transition from the alive state to the dead state in 15 seconds; a 5-second interval between a keepalive response and the initial keepalive failure based on the keepalive frequency, and two failures, each occurring at 5-second intervals based on the retry period.

However, if the keepalives are Class B type keepalives, the time for a service to transition from an alive state to the dead state may take longer. This transition delay occurs because the CSS executes smaller numbers of Class B keepalives at the same time. For example, if you configure 256 HTTP-GET keepalives using the default values for frequency, retry period, and maximum failure, and all services fail, the time for all of the services to transition from the alive state to the dead state is 120 seconds; 32 services transitioning in 15 seconds followed by another 32 services until all 256 services have transitioned.

Configuring Service Keepalives

A service keepalive is the keepalive configured for a specific service. As you configure a service, you can configure its keepalive attributes. To configure keepalive attributes for a service, access Service configuration mode for the service and use the keepalive command. For information, see the "Configuring Service and Global Keepalive Attributes" section.

If you want to apply a CSS service to a global keepalive, see the "Configuring Global Keepalives" section.

After you configure a service including its keepalive attributes, you can activate the service. Activating a service puts it into the resource pool for load-balancing content requests and starts the keepalive function. For example, to activate service serv1, enter:

(config-service[serv1])# active

Configuring Global Keepalives

A global keepalive allows you to configure keepalive attributes and apply multiple services to the keepalive. As long as one service is alive, the global keepalive service is alive. By having a single keepalive configuration for more than one service, you can reduce the amount of time to configure each service. Also the keepalive counts as one keepalive no matter how many services you apply to it.

Table 1-4 provides a quick overview of the basic steps required to configure a global keepalive. Each step includes the CLI command required to complete the task. For a complete description of each feature and all the options associated with the CLI commands, see the sections following Table 1-4.

Table 1-4 Global Keepalive Configuration Quick Start 

Task and Command Example

1. Enter global configuration mode by typing config.

# config
(config)#

2. Create a global keepalive and enter the keepalive configuration mode. See the "Creating and Naming a Global Keepalive" section.

(config)# keepalive keepimages
(config-keepalive[keepimages])#

3. Specify the IP address where the keepalive messages are sent. See the Configuring a Global Keepalive IP Address section.

(config-keepalive[keepimages])# ip address 192.168.7.6

4. Specify the type of keepalive message assigned to a keepalive. See the "Configuring a Keepalive Type" section.

(config-keepalive[keepimages])# type http

5. Specify the HTTP keepalive method assigned to the global keepalive. See the "Configuring the HTTP Keepalive Method" section.

(config-keepalive[keepimages])# method get

6. Specify the content information for an HTTP global keepalive. See the "Configuring a Keepalive URI" section.

(config-keepalive[keepimages])# uri "/index.html"

7. Activate the global keepalive.

(config-keepalive[keepimages])# active

8. Associate a service with a global keepalive.

(config-service[imageserver1])# keepalive type named keepimages

9. (Recommended) Use the show keepalive command to verify the global keepalive configuration. See the "Showing Keepalive Configurations" section.

(config-keepalive[keepimages])# show keepalive

10. (Optional) Use the show service command to verify the basic keepalive configuration on the service.

(config-service[imageserver1])# show service

The following running-configuration example shows the results of entering the commands in Table 1-4 as shown in bold and any related commands.

!************************** SERVICE ************************** 
server2
  ip address 10.3.6.1
  keepalive type named keepimages
  active
!************************* KEEPALIVE *************************
keepalive keepimages
  ip address 192.168.7.6
  type http
  method get
  uri "/index.html"
  active 

The following sections provides information on:

Creating and Naming a Global Keepalive

Configuring a Global Keepalive IP Address

Configuring a Global Keepalive Description

Activating the Global Keepalive

Suspending a Global Keepalive

Associating a Service with a Global Keepalive

For information on configuring the keepalive attributes, see the "Configuring Service and Global Keepalive Attributes" section.

Creating and Naming a Global Keepalive

To create and name a global keepalive, use the keepalive command to access keepalive mode. You can access keepalive mode from circuit, global, interface, and IP configuration modes. The prompt changes to (config-keepalive [name]). You can also use this command from keepalive mode to access another keepalive.

Enter the name of the new keepalive you want to create or the name of an existing keepalive. Enter an unquoted text string with no spaces and a length of 1 to 31 characters. To see a list of existing keepalive names, use the keepalive ? command.

For example, to create the global keepalive keepimages, enter:

(config)# keepalive keepimages

When you access this mode, the prompt changes to (config-keepalive [keepimages]).

(config-keepalive[keepimages])#

To remove an existing keepalive, enter:

(config)# no keepalive keepimages

Configuring a Global Keepalive IP Address

The CSS sends global keepalives to a service that monitors the state of services assigned to it. Use the ip address command to specify the IP address where the keepalive messages are sent. Enter the IP address in dotted-decimal notation.

For example, to enter an IP address for keepalive keepimages, enter:

(config-keepalive[keepimages])# ip address 192.168.7.6

Configuring a Global Keepalive Description

Optionally, you can provide a description for the global keepalive. To specify the description, use the description command . Enter the description as a quoted text string with a maximum of 64 characters, including spaces.

For example, to enter a description for the global keepalive keepimages, enter:

(config-keepalive[keepimages])# description "This keepalive is for the 
image servers"

To delete a description, enter:

(config-keepalive[keepimages])# no description

Activating the Global Keepalive

Activating a keepalive enables the CSS to start sending keepalive messages to the IP address. Use the active command to activate the global keepalive.

For example, to activate the global keepalive keepimages, enter:

(config-keepalive[keepimages])# active

Suspending a Global Keepalive

To deactivate the keepalive, use the suspend command.

For example, enter:

(config-keepalive[keepimages])# suspend

Associating a Service with a Global Keepalive

To associate a service with a global keepalive, use the keepalive type named command. The service maintains the global keepalive attributes when you add the service to content rules.

For example, to associate imageserver1 with global keepalive keepimages, enter:

(config-service[imageserver1])# keepalive type named keepimages

Configuring Service and Global Keepalive Attributes

The following sections describe the attributes you can configure for keepalives:

Configuring a Keepalive Frequency

Configuring a Keepalive Retry Period

Configuring the Maximum Number of Failures for a Keepalive

Configuring a Keepalive Type

Configuring a TCP Keepalive with Graceful Socket Close (FIN)

Configuring a Keepalive Port Number

Configuring the HTTP Keepalive Method

Configuring a Keepalive HTTP Response Code

Configuring a Keepalive URI

Configuring a Keepalive Hash Value

Configuring a Keepalive Frequency

The keepalive frequency specifies the interval in seconds between keepalives messages sent to a service. Specify a frequency from 2 to 255 seconds. The default is 5 seconds.


Note When configuring the CSS for FTP keepalives, do not configure the keepalive frequency or the keepalive retryperiod to a value less than 15 seconds. Note that the CSS does not prevent you from configuring smaller values. Also, the default value for the keepalive frequency or the keepalive retryperiod is five seconds. You must use the frequency and retryperiod commands to override the defaults.



Note The timeout value for a keepalive is related to the configured keepalive frequency.
For versions 7.20.1.04 and greater, the timeout is 2 seconds less than the keepalive frequency with a minimum of 1 second. From version 5.20 up to version 7.20.1.04, the timeout is one second less than the keepalive frequency.


To configure the keepalive frequency for a specific service, use the service mode keepalive frequency command. For example, to configure a frequency of 15 seconds, enter:

(config-service[serv1])# keepalive frequency 15

To reset the frequency to its default value of 5, enter:

(config-service[serv1])# no keepalive frequency

To configure the frequency for a global keepalive, use the keepalive mode frequency command to specify the time between keepalive messages sent to the IP address.

For example, to set the frequency time to 10 seconds, enter:

(config-keepalive[keepimages])# frequency 10

To reset the frequency to its default value of 5, enter:

(config-keepalive[keepimages])# no frequency

Configuring a Keepalive Retry Period

When a service has failed to respond to a given keepalive message (the service has transitioned to the dying state), the retry period specifies how frequently the CSS tests the service to see if it is functional. Enter the retry period as an integer from 2 to 255 seconds. The default is 5 seconds.


Note When configuring the CSS for FTP keepalives, do not configure the keepalive frequency or the keepalive retryperiod to a value less than 15 seconds. Note that the CSS does not prevent you from configuring smaller values. Also, the default value for the keepalive frequency or the keepalive retryperiod is five seconds. You must use the frequency and retryperiod commands to override the defaults.


To configure the keepalive retry period for a service, use the service mode keepalive retryperiod command. For example, to configure a retry period of 60 seconds, enter:

(config-service[serv1])# keepalive retryperiod 60

To reset the retry period to its default value of 5, enter:

(config-service[serv1])# no keepalive retryperiod

To configure the retry period for a global keepalive, use the keepalive mode retryperiod command. For example, to configure a retry period of 60 seconds, enter:

(config-keepalive[keepimages])# retryperiod 60

To reset the retry period to its default value of 5, enter:

(config-keepalive[keepimages])# no retryperiod

Configuring the Maximum Number of Failures for a Keepalive

The maximum failures is the number of times a service can fail to respond to a keepalive message before the CSS considers it offline. Specify a maximum failure number from 1 to 10. The default is 3.

To configure the keepalive maximum failure value for a service, use the service mode keepalive maxfailure command. For example, to configure the maximum failure value to 5, enter:

(config-service[serv1])# keepalive maxfailure 5

To reset the maximum failure number to its default value of 3, enter:

(config-service[serv1])# no keepalive maxfailure

To configure the maximum failure value for a global keepalive, use the keepalive mode maxfailure command. For example, to configure a value of 7, enter:

(config-keepalive[keepimages])# maxfailure 7

To reset the maximum failure number to its default value of 3, enter:

(config-keepalive[keepimages])# no maxfailure

Configuring a Keepalive Type

The keepalive type specifies the type of keepalive message assigned to the keepalive. The keepalive types include ICMP, HTTP-GET, HTTP-HEAD, TCP, FTP, SSL, and script keepalives. For a service keepalive, a named keepalive type allows you to apply the service to a configured global keepalive.

To specify the type of keepalive message for a service, use the service mode keepalive type command, if any, appropriate for a service or to associate a service with a global keepalive. For example, to set serv1 keepalive type to ftp, enter:

(config-service[serv1])# keepalive type ftp

To specify the keepalive type for a global keepalive, use the keepalive mode type command. For example, to set the global keepalive keepimages to type tcp, enter:

(config-keepalive[keepimages])# type tcp

Each time you assign a keepalive type to a service or global keepalive, the CSS counts it as one keepalive.


Caution Do not configure more than 2048 total keepalives, including a total of 512 Class B keepalives. Any services assigned to keepalives over the supported total number will not be eligible for content rule selection.

The options for the keepalive type or type command are:

ftp ftp_record - Keepalive method in which the CSS logs in to an FTP server as defined in the FTP record file. Enter the name of the existing FTP record for an FTP server as an unquoted text string with no spaces. To create an FTP record, use the (config) ftp-record command.

The FTP keepalive type is a Class B type. The CSS supports a maximum of 256 FTP keepalives and concurrently executes a maximum of 32 keepalives of this type at a time.

When configuring the CSS for FTP keepalives, do not configure the keepalive frequency or the keepalive retryperiod to a value less than 15 seconds. Note that the CSS does not prevent you from configuring smaller values. Also, the default value for the keepalive frequency or the keepalive retryperiod is five seconds. You must use the keepalive frequency and keepalive retryperiod commands to override the defaults.

http - A persistent HTTP index page request. By default, HTTP keepalives attempt to use persistent connections.

For configuring the method for the HTTP keepalive type, see the "Configuring the HTTP Keepalive Method" section. The HTTP-HEAD persistent, and HTTP-GET persistent keepalive types are a Class B types. Of each of these types, the CSS supports a maximum of 256 keepalives and concurrently executes a maximum of 32 keepalives at a time.

If an HTTP persistent keepalive fails to make a persistent connection, then it attempts to make a non-persistent connection. If the non-persistent connection succeeds, then the keepalive succeeds. At the next interval, the keepalive attempts a persistent connection.

http non-persistent - A non-persistent HTTP index page request. This command disables the default persistent behavior.

For configuring the method for the HTTP keepalive type, see the "Configuring the HTTP Keepalive Method" section. The HTTP-GET non-persistent keepalive type is a Class B type. Of this type, the CSS supports a maximum of 256 keepalives and concurrently executes a maximum of 32 keepalives at a time.

The HTTP-HEAD non-persistent keepalive type is a Class A type. The CSS supports a maximum of 2048 HTTP-HEAD non-persistent keepalives and concurrently executes a maximum of 2048 keepalives of this type at a time.

icmp - An ICMP echo message (ping). This is the default keepalive type.

The ICMP keepalive type is a Class A type. The CSS supports a maximum of 2048 ICMP keepalives and concurrently executes a maximum of 2048 keepalives of this type at a time.

named name - (service mode only) Associates the service with a previously defined global keepalive.

Before using this command, ensure that the global keepalive is activated through the (config-keepalive) active command. Assigning a service to a global keepalive overrides any keepalive properties you assigned in service mode. For information on creating a global keepalive, see the "Configuring Global Keepalives" section.

none - Do not send keepalive messages to a service.

script script_name {"arguments"} {use-output} - Defines a script keepalive to be used by the service. The script is played each time the keepalive is issued. Enter the name of an existing script keepalive.

The optional arguments variable passes arguments into the keepalive script. Enter a quoted text string with a maximum of 128 characters including spaces.

The use-output option allows the script to parse the output for each executed command. This optional keyword allows the use grep and file direction within a script. By default, the script does not parse the output. For details on using script keepalives, see the "Using Script Keepalives with Services" section later in this chapter.

The script keepalive type is a Class B type. The CSS supports a maximum of 256 script keepalives and concurrently executes a maximum of 16 keepalives of this type at a time.


Note To preserve CSS system resources, use script keepalives only when needed. If an ICMP or HTTP keepalive message is sufficient to validate the service, then use that type of message instead of a script keepalive.


ssl - SSL HELLO keepalives for this service. Use this keepalive for all backend services supporting SSL. The CSS sends a client HELLO to connect the SSL server. After the CSS receives a HELLO from the server, the CSS closes the connection with a TCP RST.

The SSL keepalive type is a Class A type. The CSS supports a maximum of 2048 SSL keepalives and concurrently executes a maximum of 2048 keepalives of this type at a time.

When the 11500 series CSS is using an SSL module, use the keepalive type of none. The SSL module is an integrated device in the CSS and does not require the use of keepalive messages for the service.

tcp - A TCP session that determines service viability through a 3-way handshake and reset; SYN, SYN-ACK, ACK, RST-ACK. By default, the CSS sends a RST to close the socket on a server port for TCP keepalives. If your servers require a graceful closing of a socket using a FIN, you can use a keepalive to send a FIN to close a socket by using the tcp-close fin command. For more information on the tcp-close command, see the "Configuring a TCP Keepalive with Graceful Socket Close (FIN)" section. The tcp-close command may be applied to a maximum of 100 TCP keepalives.

The TCP keepalive type is a Class A type. The CSS supports a maximum of 2048 TCP keepalives and concurrently executes a maximum of 2048 keepalives of this type at a time.

Configuring a TCP Keepalive with Graceful Socket Close (FIN)

By default and in compliance with RFC 1122, the CSS sends a reset (RST) to close the socket on a server port for TCP keepalives. A RST is faster than a FIN, because a RST requires only one packet, while a FIN can take up to four packets. If your servers require a graceful closing of a socket using a FIN, you can configure a keepalive to send a FIN to close a socket.

To configure a keepalive to send a FIN to close a socket, use the service mode keepalive tcp-close fin command. For example, enter:

(config-service[serv1])# keepalive tcp-close fin

To reset the keepalive to send a RST, enter:

(config-service[serv1])# keepalive tcp-close rst

To configure a global keepalive to send a FIN to close a socket, use the keepalive mode tcp-close fin command. For example, enter:

(config-keepalive[keepimages])# tcp-close fin

To reset the keepalive to send a RST, enter:

(config-keepalive[keepimages])# tcp-close rst

The service mode keepalive tcp-close fin and keepalive mode tcp-close fin commands may be applied to a total of 100 TCP keepalives.

Configuring a Keepalive Port Number

By default, the port number for keepalives is based on the keepalive type. If the keepalive type is:

HTTP or TCP - The default port number is 80

FTP - The port number is 21 and is not configurable

SSL - The port number is 443

ICMP - The port number is the number for the service

You can configure a port number from 0 to 65535.

To specify the keepalive port number for a service, use the service mode keepalive port command. For example, to specify port 8080, enter:

(config-service[serv1])# keepalive port 8080

To reset the keepalive port to its default value, enter:

(config-service[serv1])# no keepalive port

To specify a port for a global keepalive, use the keepalive mode port command. For example, to specify port 8080,enter:

(config-keepalive[keepimages])# port 8080

To reset the keepalive port to its default value, enter:

(config-keepalive[keepimages])# no port

Configuring the HTTP Keepalive Method

By default, when you configure an HTTP keepalive type, the CSS uses an HTTP-HEAD method. The CSS issues an HTTP-HEAD method to the service and a 200 OK status is required. The CSS does not compute a reference hash value for this type of keepalive. If the 200 OK status is not returned, the CSS considers the service down.

You can also configure an HTTP GET method. The CSS issues an HTTP GET method to the service, computes an MD5 (Message Digest Algorithm Version 5) hash value on the page, and stores the hash value as a reference hash. Subsequent GETs require a 200 OK status (HTTP command completed OK response) and the hash value to equal the reference hash value. If the 200 OK status is not returned, or if the 200 OK status is returned but the hash value is different from the reference hash value, the CSS considers the service down.

When you specify the content information of an HTTP Uniform Resource Identifier (URI) for an HTTP keepalive, the CSS calculates a hash value for the content. If the content information changes, the hash value no longer matches the original hash value and the CSS assumes that the service is down. To prevent the CSS from assuming that a service is down due to a hash value mismatch, specify the keepalive method as HTTP HEAD.

For information of configuring an HTTP response code for an HTTP-HEAD non-persistent keepalive, see the "Configuring a Keepalive HTTP Response Code" section. For information of configuring an HTTP URI, see the "Configuring a Keepalive URI" section.

To specify the HTTP keepalive method for a service, use the service mode keepalive method command. For example, to specify the HTTP GET method, enter:

(config-service[serv1])# keepalive method get

To reset the HTTP keepalive method to HTTP HEAD, enter:

(config-service[serv1])# keepalive method head

To specify the HTTP keepalive method for a global keepalive, use the keepalive method command. For example, to specify the HTTP GET keepalive method, enter:

(config-keepalive[keepimages])# method get

To reset the HTTP keepalive method to HTTP HEAD, enter:

(config-keepalive[keepimages])# method head

If you change the keepalive method on an active service, make sure that you suspend and reactivate the service for the change to take effect.


Note By default, HTTP keepalives attempt to use persistent connections. If an HTTP persistent keepalive fails to make a persistent connection, then it attempts to make a non-persistent connection. If the non-persistent connection succeeds, then the keepalive succeeds. At the next interval, the keepalive attempts a persistent connection.


Configuring a Keepalive HTTP Response Code

By default, when the CSS issues an HTTP-HEAD keepalive, the CSS expects a response code of 200 in the response packet from the server it is querying. For HTTP-HEAD non-persistent keepalives, you can configure the CSS to expect a non-200 response code (for example, a 302 redirect response code). Enter the response code as an integer from 100 to 999.

To specify the keepalive response code for a service, use the service mode keepalive http-rspcode command. For example, to specify a response code of 302, enter:

(config-service[serv1])# keepalive http-rspcode 302

To reset the response code to its default value of 200, enter:

(config-service[serv1])# no keepalive http-rspcode

To specify the response code for a global keepalive, use the http-rspcode command. For example, to specify a response code of 302, enter:

(config-keepalive[keepimages])# http-rspcode 302

To reset the response code to its default value of 200, enter:

(config-keepalive[keepimages])# no http-rspcode

Configuring a Keepalive URI

When you configure an HTTP keepalive type, the CSS uses the URI string to determine if the service is alive. By default, the CSS uses the URI string to the root directory,"/". For an HTTP Get, the CSS uses the URI information to calculate the hash value. You can specify the URI content information for an HTTP keepalive.


Note When you specify the content information of a URI for an HTTP keepalive, the CSS calculates a hash value for the content. If the content information changes, the hash value no longer matches the original hash value and the CSS assumes that the service is down. To prevent the CSS from assuming that a service is down due to a hash value mismatch, define keepalive method as head. The CSS does not compute a hash value for this type of keepalive. If you specify a Web page with changeable content and do not specify the head keepalive method, you must suspend and reactivate the service each time the content changes.


Enter the content information of the URI as a quoted text string with a maximum of 64 characters. Do not include the host information in the string. The CSS derives the host information from the service IP address and the keepalive port number.

To specify the HTTP keepalive content information for a service, use the service mode keepalive uri command. For example, enter:

(config-service[serv1])# keepalive uri "/index.html"

To clear the content information for the keepalive, enter:

(config-service[serv1])# no keepalive uri

To specify the HTTP keepalive content information for a global keepalive, use the uri command. For example, to specify the content information for the global keepalive, enter:

(config-keepalive[keepimages])# uri "/index.html"

To clear the content information assigned to this keepalive, enter:

(config-keepalive[keepimages])# no uri

Configuring a Keepalive Hash Value

By default, the CSS uses the MD5 (Message Digest Algorithm Version 5) hash for an HTTP GET keepalive. The CSS compares the hash value against the computed hash value of all HTTP GET responses. A successful comparison causes the keepalive to maintain an Alive state.

For a service keepalive, use the service mode keepalive hash command to override the default MD5 hash. To configure the hash value for a service keepalive:

1. Configure the keepalive. The example below creates a keepalive GET to a test page.

(config)# service serv1
(config-service[serv1])# ip address 10.0.3.21
(config-service[serv1])# keepalive type http
(config-service[serv1])# keepalive method get
(config-service[serv1])# keepalive uri "/testpage.html"
(config-service[serv1])# keepalive hash 
"1024b91e516637aaf9ffca21b4b05b8c"
(config-service[serv1])# active

2. Display the hash value using the show keepalive command. For example, enter:

(config-service[serv1])# show keepalive
Keepalives:

Name: serv1
	Index: 0          State: ALIVE
	Description: Auto generated for service serv1
	Address: 10.0.3.21  Port: 80
	Type:             HTTP:GET:/testpage.html
	Hash:             1024b91e516637aaf9ffca21b4b05b8c
	Frequency:        5
	Max Failures:     3
	Retry Frequency:  5
	Dependent Services:

3. Use the hash value from the keepalive display to configure the keepalive hash. Enter the MD5 hash as a quoted hexadecimal string with a maximum of 32 characters. For example, enter:

(config-service[serv1])# keepalive hash 
"1024b91e516637aaf9ffca21b4b05b8c"

An excerpt of the service configuration from the running-config is as follows:

service serv1
	ip address 10.0.3.21
	keepalive type http
	keepalive method get
	keepalive uri "/testpage.html"
	keepalive hash "1024b91e516637aaf9ffca21b4b05b8c"
	active

To clear a hash value and return to the default hash value, enter:

(config-service[serv1])# no keepalive hash

For a global keepalive, use the hash command to override the default MD5 hash for an HTTP GET keepalive. To configure the hash value for a global keepalive:

1. Configure the global keepalive. For example, enter:

(config-keepalive[keepimages])# method get
(config-keepalive[keepimages])# uri "/testpage.html"
(config-keepalive[keepimages])# hash 
"1024b91e516637aaf9ffca21b4b05b8c"

2. Configure the service. For example, enter:

(config)# service imageserver1
(config-service[imageserver1])# ip address 10.0.3.21
(config-service[imageserver1])# keepalive type named keepimages
(config-service[imageserver1])# active

3. Display the hash value using the show keepalive command. For example, enter:

(config-keepalive[keepimages])# show keepalive

Keepalives:

Name: imageserver1
	Index:           0           State:      ALIVE
	Description:     Auto generated for service serv1
	Address:         10.0.3.21    Port:80
	Type:            HTTP GET:/testpage.html
	Hash:            1024b91e516637aaf9ffca21b4b05b8c
	Frequency:       5
	Max Failures:    3
	Retry Frequency: 5
	Dependent Services:

4. Use the hash value from the keepalive display to configure the keepalive hash. Enter the MD5 hash value as a quoted hexadecimal string with a maximum of 32 characters. For example, enter:

(config-keepalive[keepimages])# hash 
"1024b91e516637aaf9ffca21b4b05b8c"

An excerpt of the service configuration from the running-config is as follows:

service imageserver1
	ip address 10.0.3.21
	keepalive type http
	keepalive method get
	keepalive uri "/testpage.html"
	keepalive hash "1024b91e516637aaf9ffca21b4b05b8c"
	active

To clear a hash value and return to the default hash value, enter:

(config-keepalive[keepimages])# no hash

Showing Keepalive Configurations

To display keepalive information for a service, use the show service command. For more information on this command and what it displays, see the "Showing Service Configurations" section in this chapter.

To display global keepalive configurations, use the show keepalive command. To display a list of existing keepalives, use the show keepalive ? command.


Note Two sessions (for example, SSH, console or Telnet) can access keepalive data at the same time. If one session views the data through the show keepalive command when the other session reconfigures the keepalive data by clearing a service or a keepalive, the CSS may abort the show command and display the following message:
Command Aborted!!! Configuration changed. Please reissue command.


This command provides the following options:

show keepalive - Display information for all keepalives

show keepalive keepalive_name - Display information for a specific keepalive

show keepalive-summary - Display summary information for all keepalives

For example, enter:

(config)# show keepalive

Keepalives:

Name:          keepimages  Index: 1   State: ALIVE ( ICP Check )
Description:   This keepalive is for image servers
Address:       172.16.1.7	 Port: 80
Type: HTTP:HEAD-302:/index.html
Frequency: 5
Max Failures: 3
Retry Frequency: 5
Dependent Services: imageserver1

Name: rualive   Index: 2           State: ALIVE
Description: Auto generated for service serv2
Address:        172.16.1.8         Port: 80
Type: HTTP:HEAD:/index.html
Frequency: 5
Max Failures: 3
Retry Frequency: 5
Dependent Services: serv2

(config)# show keepalive-summary

Keepalives:
Alive1         DOWN     192.25.1.7
Alive2         ALIVE    192.25.1.8

Table 1-5 describes the fields in the show keepalive command output.

Table 1-5 Field Descriptions for the show keepalive Command Output 

Field
Description

Name

The name of the keepalive.

Index

The CSS-assigned unique index value for each keepalive.

State

The state of the keepalive. The possible states are Down, Alive, Dying, Suspended, and No Services.

Description

The description for the keepalive.

Address

The IP address where the keepalive messages are sent.

Port

The port number for the keepalive.

Type

The type of keepalive message assigned to the keepalive. The possible types are FTP, HTTP, ICMP, script, SSL, TCP, or named. For an HTTP Head keepalive, the response code is also displayed.

Frequency

The time, in seconds, between keepalive messages sent to the IP address. The range is from 2 to 255. The default is 5.

Max Failures

The configured number of times the IP address can fail to respond to a keepalive message before being considered down. The range is from 1 to 10. The default is 3.

Retry Frequency

The retry period, in seconds, to send messages to the keepalive IP address. The range is from 2 to 255. The default is 5.

Dependent Services

Services currently configured to use the keepalive. This is mainly used for named keepalive types.


Using Script Keepalives with Services

Script keepalives are scripts that you can create to provide custom keepalives for your specific service requirements. To create the scripts, use the rich CSS Scripting Language that is included in your CSS software. For details on using the CSS Scripting Language, including using socket commands and examples of keepalive scripts, refer to the Cisco Content Services Switch Administration Guide.

Currently, a CSS provides keepalives for FTP, HTTP, ICMP, SSL, and TCP. For information on configuring keepalive messages, see the "Configuring Keepalives" section earlier in this chapter.

Using script keepalives allow you to extend the CSS keepalive functionality beyond the default keepalives. For example, you can develop a script specifically to connect a CSS to a Post Office Protocol 3 (POP3) mail server.

Once you create a script offline, you can upload it to the CSS and configure the script keepalive option on a service.

The CSS supports a maximum of 256 script keepalives. If you specify a script to parse the output for each executed command, you can configure only 16 keepalives that use script output.


Note You can also configure a script keepalive without having the corresponding script present on the CSS. In this case, a constant Down state remains on the service until you upload the appropriate script to the CSS. This allows you to develop and implement a configuration before uploading all the scripts to the CSS.


Script Keepalive Considerations

When you configure a script keepalive, follow the same general guidelines as those for keepalive types, with the exceptions noted in these sections. For details on keepalives, see the "Configuring Keepalives" section earlier in this chapter.

The CSS Scripting Language allows you to pass 128 characters in a quoted argument. Assuming an average of seven characters per argument (plus a space delimiter), you can potentially use a maximum of 16 arguments in one script.

The CSS executes each line in a script keepalive. If your application requires numerous script keepalives (for example, greater than 60), keep each script as short and concise as possible. A smaller script yields much faster script execution results than a larger size script. To maximize CSS system performance, avoid complex protocols or extensive scripts (for example, no database queries, not performing a full login with validation), which can take the CSS longer to execute.

Use the script naming convention of ap-kal-type, so that when you press Tab or "?", you can easily see the keepalive scripts available for use. For example, an SMTP script would be named ap-kal-smtp. The script name can have a maximum of 32 characters. The arguments must be in a quoted text string with a maximum of 128 characters.

For the configured script keepalive to find the corresponding script, the script must reside in the /<current running version>/script directory. When you configure a script keepalive, use only script names. (A CSS does not accept path names.) If the script is present elsewhere on the CSS, the script keepalive assumes it does not exist.

To see a complete list of all scripts available in the /<current running version>/script directory, press the Tab key or "?". Optionally, you can type a script name not found in the list, then you can upload the script later. You can manipulate scripts using the archive, clear, and copy commands. You can also upload a script from a local hard drive to the /script directory on the CSS, or download a script from the /script directory on the CSS to a local hard drive.

Because many scripts have a multistep process such as connecting, sending a request, and waiting for a specific type of response, configure a higher frequency time value for script keepalives than for standard keepalives. A time interval of 10 seconds or higher ensures that the script keepalive has enough time to finish. Otherwise, state transitions may occur more often than is usual.

The CSS sends keepalives only to the first address in a service range. If you configure a service with a range of IP addresses and configure a script keepalive with an IP address to it, the address must be the first address in a service range.

Because a CSS reads an entire script into memory, there is a maximum script keepalive size of 200 KB (approximately 6,000 lines). If a script exceeds this limit, it will not load. This should be more than adequate for all applications. For example, the script keepalives included with your CSS software are approximately 1 KB. To further conserve CSS memory, services can share a common script keepalive so that only one instance of the script needs to reside in memory. However, you must configure the script keepalive for each service where you want the script to run.


Note For a large number of services that use script keepalives, use a smaller subset of global keepalives to handle the work for them. For information on global keepalives, see the "Configuring Global Keepalives" section earlier in this chapter.


Configuring Script Keepalives

Script keepalives are scripts that you can create to provide custom keepalives for your specific service requirements. Use the keepalive type script command to configure script keepalives. The syntax for this service configuration mode command is:

keepalive type script script_name {"arguments"} {use-output}

Enter the name of an existing script keepalive. The optional arguments variable passes arguments into the keepalive script. Enter a quoted text string with a maximum of 128 characters including spaces.

The optional use-output keyword allows the script to parse the output for each executed command. This optional keyword allows the use of grep and file direction within a script. You can configure a maximum of 16 script keepalives (out of a maximum of 255 script keepalives) to use script output. By default, the script does not parse the output.

For example, to configure a script keepalive named ap-kal-httplist, enter:

(config-service[serv1)# keepalive type script ap-kal-httplist 
"10.10.102.105 /default.htm"

In the previous example, the keepalive command configures the serv1 service keepalive to be of type script with the script name ap-kal-httplist and the arguments "10.10.102.105 /default.htm". The output is not parsed by the script.

To disable a script keepalive on a service, enter:

(config-service[serv1])# keepalive type none

Viewing a Script Keepalive in a Service

When you add a script keepalive to a service, the CSS recognizes that the script is the keepalive for the service in the show service screen. The script name appears in the Keepalive field, and any potential arguments appear directly below in the Script Arguments field. If there are no script arguments, then the Script Arguments field does not appear.

For example, enter:

(config-service[serv1])# show service

Name: serv1                    Index: 1
	Type: Local                  State: Alive
	Rule (10.10.102.105 ANY ANY)
   Session Redundancy: Disabled
   Redirect Domain:
   Redirect String:   
	Keepalive: (SCRIPT ap-kal-httplist 10   3   5)
	Script Arguments: "10.10.102.105 /default.htm"
	Script Error: None
	Script Run Time: 1 second
	Script Using Output Parsing:  No
   Last Clearing of Stats Counters  03/15/2002  13:45:01
	Mtu:               1500       State Transitions:   0
	Connections:       0          Max Connections:     0
	Total Connections: 0          Total Reused Conns:  0
	Weight:            1          Load:                2 

Note If a script keepalive terminates with an error, you can use the Script Error and Script Run Time fields to help troubleshoot the problem.


You can also use the show running-config command to display the script keepalive and its arguments.

For example, enter:

(config-service[serv1])# show running-config

service serv1
	ip address 10.10.102.105
	keepalive frequency 10
	keepalive type script ap-kal-httplist "10.10.102.105
	/default.htm"
	active 

The example above shows the script keepalive and arguments that have been configured on a service. If no arguments are specified in the script, then the quoted text following the script name will not appear.

Script Keepalive Status Codes

A script can return a status code of zero or non-zero. On a return of non-zero, the CSS flags the service state as Dying or Down; on a return of zero, the CSS flags the service state as Alive. For example, enter:

! Connect to the remote host
socket connect host einstein port 25 tcp
! Purposely fail
exit script 1

Because the above script fails when it executes the exit command, the script returns a non-zero value. By default, the script will fail with a syntax error if the connect command fails. Be sure to check the logic of your scripts to ensure that the CSS returns the correct value.

Script Keepalives and Upgrading WebNS Software

When you upgrade the WebNS software in your CSS, the upgrade process creates a new /<current running version>/script directory. You must copy your custom scripts (including custom script keepalives) to the new /<current running version>/script directory so that the CSS can find them.

Use the following procedure to ensure that your custom script keepalives operate properly after upgrading the software.

1. Upgrade the WebNS software in your CSS. Refer to the Cisco Content Services Switch Administration Guide.

2. Copy the scripts from the old /<current running version>/script directory to the new /<current running version>/script directory.

3. Reboot the CSS.

Configuring Source Groups

Group configuration mode allows you to configure a maximum of 255 source groups on a CSS. A source group is a collection of local servers that initiate flows from within the local web farm. The CSS enables you to treat a source group as a virtual server with its own source IP address.

For example, if you configure several streaming audio transmitters as a group, the CSS will process flows from the group members and give them all the same source IP address.

The following sections describe how to configure a source group:

Source Group Configuration Quick Start

Creating a Source Group

Configuring a Source Group for FTP Connections

Configuring Source Groups to Allow Servers to Resolve Domain Names Using the Internet

Showing Source Groups

Clearing Source Group Counters

Source Group Configuration Quick Start

Use the procedure in Table 1-6 to configure a source group for TCP/UDP traffic. To configure a source group for FTP traffic, see the next section. Note that each source group requires a content rule that contains the same services and VIP as the source group.

Table 1-6 Source Group Configuration Quick Start 

Task and Command Example

1. Create the source group. Source group names can be a maximum of
16 characters. The following example creates a source group ftpgroup.

(config)# group ftpgroup

The CLI transitions into config-group mode where you can activate the source group and configure attributes for it.

(config-group[ftpgroup])#

2. Configure the source group VIP address to which all service IP addresses will be translated. You can assign the same VIP address to multiple source groups, but only one of the source groups can be active at a time. For example, enter:

(config-group[ftpgroup])# vip address 172.16.36.58

3. Add previously defined services to the source group. For example, enter:

(config-group[ftpgroup])# add service server1
(config-group[ftpgroup])# add service server2

4. Activate the source group. Because a VIP address can belong to only one active source group at a time, the CSS will not allow you to activate a second source group that contains the same VIP address as the one in the active source group.

(config-group[ftpgroup])# active

To remove service server1 from the source group, enter:

(config-group[ftpgroup])# remove service server1

5. Create a content rule, add the same services and VIP that are configured in the source group, and activate the content rule. The content rule enables the CSS to match requests for the content rule VIP. When either server1 or server2 replies to the request, the CSS NATs the server IP addresses to the source group VIP.

For example, enter:

(config-owner[arrowpoint.com])# content ftpsource1

(config-owner-content[arrowpoint.com-ftpsource1])# add service 
server1

(config-owner-content[arrowpoint.com-ftpsource1])# add service 
server2 
 
(config-owner-content[arrowpoint.com-ftpsource1])# vip address 
172.16.36.58

(config-owner-content[arrowpoint.com-ftpsource1])# active

The following running-configuration example shows the results of entering the commands in Table 1-6.

!*************************** GROUP ***************************
group ftpgroup
  vip address 172.16.36.58
  add service server1
  add service server2
  active

!*************************** OWNER *************************** 
owner arrowpoint
  content ftpsource1
    add service server2
    vip address 172.16.36.58
    active

Creating a Source Group

To access group configuration mode, use the group command from any mode except ACL and boot configuration modes. The syntax for this command is:

group groupname

Enter an existing or a new source group name from 1 to 31 characters.

For example, enter:

(config)# group ftpgroup 
(config-group[ftpgroup])#

To view a list of existing source groups, enter:

(config)# group ?


Note You can also use the group command from within group mode to access or create another source group.


To remove a source group, enter:

(config)# no group ftpgroup


Note To make certain modifications to an active source group, you must first suspend the source group using the suspend command. Such modifications include: changing the IP address to 0 or using the no ip address command, adding or removing a service or destination service, or using the portmap command.


Source Group Commands

Use the following commands in group mode:

active - Activates a source group.

add destination service service_name - Adds a destination service to a source group. You can configure a maximum of 64 destination services per source group. You cannot use a service with the same name in other source groups or the source service list within the same source group. You can use services with duplicate addresses among destination services because the actual service is chosen through content rule selection. The destination service must be active and must be added to a content rule in order for it to perform destination source address NATing for the source group (see Chapter 3, Configuring Content Rules).


Note Adding a destination service to a source group does not allow the destination service flows to be NATed by the source group, when the service initiates the flows. This is because the destination service applies group membership based on rule and service match. To ensure that service initiated connections are NATed, you must also configure ACL match criteria or additional service names with duplicate addresses, then add those services to a source group. The source group used could be the current source group with the destination service or any other configured source group.


add service - Adds a service to a source group. You can configure a maximum of 64 services per source group. A service may belong to only one group at a time. When the source group is active and the same service is hit through a content rule, ACL preferred service, or sorry service, the source group is used to NAT (Network Address Translation) the source address. The service must be active in order for it to perform source address NATing for the source group (see Chapter 1, Configuring Services).

Be aware that you cannot use a service with:

The same name in other source groups or the destination service list within the same source group

The same address as a source service on another source group

vip address - Specifies the source Virtual IP address (VIP) for the group. The CSS substitutes this IP address for the source address in flows originating from one of the group's sources. You can assign the same VIP address to multiple source groups, but only one of the source groups can be active at a time. The syntax for this command is:

vip address ip_or_host {range number}

The options and variables for this command are:

ip_or_host - IP address or name for the group. Enter the address in either dotted-decimal IP notation (for example, 192.168.11.1) or mnemonic host-name format (for example, myhost.mydomain.com).

range number - (Optional) Defines the range of IP addresses for the group. Enter a number from 1 to 65353. The default is 1. The ip_or_host variable is the first address in the range.

For example enter:

(config-group[ftpgroup])# vip address 172.16.36.58 range 3

remove service - Removes a previously configured service from a source group.

portmap - Defines the source port address translation (PAT) of flows from the services configured in a source group. By default, PAT or port mapping is enabled for source groups on source ports greater than 1023. The CSS translates such source ports to a range starting at 2016. Use the following portmap options to change the default PAT behavior of the CSS. The syntax and options for this group mode command are:

portmap base-port base_number - Defines the base port (starting port number) for the CSS. Enter a base number from 2016 to 63456. The default is 2016.

To reset the starting port number to its default value of 2016, use the
no portmap base-port command.

portmap number-of-ports number - Defines the total number of ports in the portmap range for the entire CSS. The CSS allocates the total number of configured ports proportionally among all the SPs in the CSS chassis according to the session processor relative weight value. To display the relative weight value of a session processor, enter the show chassis session-processors command as described in the Cisco Content Services Switch Administration Guide.

The more modules you add to the CSS chassis, the fewer session processing each module performs and the fewer ports the CSS makes available to each module. To display the number of ports that the CSS allocates to each module, enter the show group portmap command as described in the "Showing Source Groups" section. For more information about the port mapping behavior of the CSS, see the "Source Group Port Mapping Behavior" section.

Enter a number from 2048 to 63488. The default is 63488. This default value should be fine for most applications. If you enter a value that is not a multiple of 32, the CSS rounds up the value to the next possible multiple of 32.

To reset the number of ports to the default value, use the no portmap number-of-ports command.

portmap disable - Instructs the CSS to perform Network Address Translation (NAT) on the source IP addresses, but not to PAT on the source ports of UDP traffic hitting a particular source group. Use this option for Wireless Application Protocol (WAP) or other applications where you need to preserve the registered UDP port number for return traffic.


Note This command does not affect TCP flows.


The CSS maintains but ignores any base-port or number-of ports (see the previous options) values configured in the source group. If you later reenable PAT for that source group, any configured base-port or number-of ports values will take effect. The default behavior for a configured source group is to NAT the source IP address and to PAT the source port for port numbers greater than 1023.

To restore the default CSS behavior of NATing source IP addresses and PATing source ports for a configured source group, use the portmap enable command.

suspend - Suspends a source group. The group and its attributes remain the same but no longer have an effect on flow creation.

Source Group Port Mapping Behavior

When you configure a source group, a CSS provides network address translation (NAT) of source IP addresses and port address translation (PAT) of source ports. NAT and PAT add a measure of security to your network by not exposing private network addresses and ports to the public side of a CSS. To NAT source IP addresses and source ports for flows originating from a server (server-side) on the private side of the CSS, add existing services to a source group. To NAT source IP addresses and source ports for flows originating from a client (client-side) on the public side of the CSS, add existing services to a source group as destination services. You can also configure access control lists (ACLs) to perform source NATing.

Each CSS module (except the SSL module) has one session processor (SP) that is responsible for mastering flows.

CSS 11501 supports one SP

CSS11503 supports a maximum of three SPs

CSS 11506 supports a maximum of six SPs

The default number of source ports available for one source group is 63488 (65533 minus the named ports). With one source group configured, the CSS allocates the total number of ports proportionally among all the SPs in the CSS chassis according to the SP relative weight value. To display the relative weight value of an SP, enter the show chassis session-processors command as described in the Cisco Content Services Switch Administration Guide.

For client-side flows, the CSS sends packets to different SPs for flow processing and the flows have access to the source ports in that SP. The CSS performs a simple XOR hash of the TCP or UDP source and destination port numbers to determine the SP that becomes master for that flow. If the port numbers are the same (for example, DNS UDP port 53), then the CSS uses the low order bits of the source and destination IP addresses to calculate the hash value. The CSS uses the hash value to index into a weighted table of SPs and selects the appropriate SP.

When the CSS performs PAT, the master SP for the flow uses a source port from either a source group or the global portmapper, depending on your configuration. (For information about global port mapping, see Chapter 5, Configuring Flow and Port Mapping Parameters, in the "Configuring Global Port Mapping" section.) The CSS chooses a source port so that the hash of it and the destination port will select the same SP for the server-side flow as the SP that mastered the client-side flow.

For the server-side flow from a given destination port, only certain source port numbers hash to the same SP that was used for the client-side flow. For this reason, all ports available to a particular SP are not necessarily eligible for use when establishing the back-end connection. Therefore, the hash algorithm selects only a percentage of the available ports on any one SP.

To make more available source ports eligible for flows or to provide additional source ports for each SP:

Configure services on different destination ports (vary the destination port) to broaden the hash across the SPs and allow a larger percentage of available ports to be eligible for port mapping. This strategy works by making the hashing algorithm less restrictive in the sense that now more source ports can be used to satisfy the hashing equations.

Configure another source group to provide an additional 63488 ports, which the CSS also distributes among the SPs in the same manner as described earlier in this section

Table 1-7 illustrates how the number of eligible ports in a CSS 11506 decreases as you increase the number of installed modules (SPs). In all cases, the CSS is configured with one service and a single destination port for all flows (for example, port 80). The numbers of eligible ports in Table 1-7 are approximate and are used for illustration only. Your results may vary depending on your configuration.

Table 1-7 Adding Modules to a CSS 11506 Decreases the Number of Eligible Source Ports 

Number of SPs
Number of Eligible Source Ports for the Chassis

1

63488

2

33728

3

21824

4

16616

5

13144

6

11408


Table 1-8 shows that, by increasing the number of destination ports, even in a fully-loaded CSS 11506 (six SPs), you can dramatically increase the number of source ports that are eligible for port mapping. In this example, the destination ports were chosen consecutively (for example, ports 80 through 89 for row 1).

Table 1-8 Increasing Destination Ports Increases Eligible Source Ports 

Number of Destination Ports
Number of Eligible Source Ports for the Chassis

10

28788

20

31757

32

40000


By comparing row six in Table 1-7 with row 1 in Table 1-8, you can see that increasing the number of destination ports to 10 more than doubles the number of source ports eligible for port mapping.

Note that it is algorithmically significant which destination ports you select to increase the number of eligible source ports and it is not a linear relationship. You may need to select several ranges of destination ports to produce the maximum number of eligible source ports.

Adaptive Session Redundancy (ASR) imposes further restrictions on the number of available and eligible source ports because of the mapping of resources to the backup CSS with an unknown chassis configuration. In a CSS 11503 or a CSS 11506 with ASR and one source group configured, the number of source ports eligible for flows for the entire chassis is 1984 (63488 ÷ 32) per destination port, regardless of the number of installed modules. To make more source ports available for mapping flows, you can configure more source groups and additional destination ports for services. For more information, refer to the Cisco Content Services Switch Redundancy Configuration Guide.

Configuring a Source Group for FTP Connections

To use source groups to support FTP sessions to a VIP that is load balanced across multiple services, configure a content rule for the VIP and then a source group.


Note When you use an FTP content rule with a configured VIP address range, be sure to configure the corresponding source group with the same VIP address range (see Chapter 3, Configuring Content Rules).


To configure FTP sessions to a VIP:

1. Configure a content rule as required using the VIP that will be load balanced across multiple servers. The following example shows the portion of a running-config for content rule ftp_rule. Ensure that you use the application ftp-control command to define the application type.

content ftp_rule 
	vip address 192.168.3.6 
	protocol tcp 
	port 21 
	application ftp-control 
	add service serv1 
	add service serv2 
	add service serv3 
	active

2. Configure a source group defining the same VIP and services as configured in the content rule.


Note If you are load-balancing passive FTP servers, you must configure services directly in the associated source groups as shown in the following example.


The following running-config example shows source group ftp_group.

group ftp_group 
	vip address 192.168.3.6 
	add service serv1 
	add service serv2 
	add service serv3 
	active

Configuring Source Groups to Allow Servers to Resolve Domain Names Using the Internet

The CSS provides support to enable servers to resolve domain names using the Internet. If you are using private IP addresses for your servers and wish to have the servers resolve domain names using domain name servers that are located on the Internet, you must configure a content rule and source group. The content rule and source group are required to specify a public Internet-routable IP address (VIP address) for the servers to allow them to resolve domain names.

To configure a server to resolve domain names:

1. If you have not already done so, configure the server.

The following example creates Server1 and configures it with a private IP address 10.0.3.251 and activates it.

(config)# service Server1 
(config-service[Server1])# ip address 10.0.3.251 
(config-service[Server1])# active

2. Create a content rule to process DNS replies. The content rule to process DNS replies is in addition to the content rules you created to process Web traffic. The content rule example below enables the CSS to NAT inbound DNS replies from the public VIP address (192.200.200.200) to the server's private IP address (10.0.3.251).

The following example creates content rule dns1 with a public VIP 192.200.200.200 and adds server Server1.

(config-owner[arrowpoint.com])# content dns1 
(config-owner-content[arrowpoint.com-dns1])# vip address 
192.200.200.200 
(config-owner-content[arrowpoint.com-dns1])# add service Server1 
(config-owner-content[arrowpoint.com-dns1])# active

3. Create a source group to process DNS requests. The source group enables the CSS to NAT outbound traffic source IP addresses from the server's private IP address (10.0.3.251) to the public VIP address (192.200.200.200).

To prevent server source port collisions, the CSS NATs the server's source IP address and port by translating the:

Source IP address to the IP address defined in the source group.

Port to the port selected by the source group. The source group assigns each server a unique port for a DNS query so that the CSS can match the DNS reply with the assigned port. This port mapping enables the CSS to direct the DNS reply to the correct server.

The following example creates source group dns1 with public VIP address 192.200.200.200 and adds the service Server1.

(config)# group dns1 
(config-group[dns1])# vip address 192.200.200.200 
(config-group[dns1])# add service Server1 
(config-group[dns1])# active

Showing Source Groups

To display source group configuration information, use the show group commands in SuperUser, User, Global Configuration, and Group modes. The options are:

show group - Display all source group configurations

show group group_name - Display the source group configuration specified by group_name

show group group_name portmap - Display the starting port number and number of ports configured on each SP in a CSS.

For example, enter:

(config)# show group

Table 1-9 describes the fields in the show group command output.

Table 1-9 Field Descriptions for the show group Command
Output 

Field
Description

Group

The name of the group, whether the group is activated (Active) or suspended (Suspend), and the source IP address for the group.

Session Redundancy

Indicates whether ASR is enabled or disabled for the source group. For details on ASR, refer to the Cisco Content Services Switch Global Server Load-Balancing Configuration Guide.

Redundancy Global Index

The unique global index value for Adaptive Session Redundancy assigned to the source group using the redundant-index command in group configuration mode.

Associated ACLs

Any ACLs associated with the group.

Source/Destination Services

The source or destination services of the source group.

Name

The name of the service.

Hits

The number of content accessed (hit) on the service. This field is incremented for traffic from a group server going out from the source group. Traffic coming into the group does not increment the counter.

State

The state of the service. The possible states are Alive, Dying, or Dead.

DNS Load

The DNS load for the service. A load of 255 indicates that the service is down. An eligible load range is from 2 to 254.

Trans

The number of times that the state of the service has transitioned.

Keepalive

The keepalive type of the service. The possible types are FTP, HTTP, ICMP, NAMED, SCRIPT, or TCP.

Conn

The number of connections currently on the service.

Flow Timeout Multiplier

Number of seconds that a flow remains idle before the CSS reclaims the flow resources, as configured with the flow-timeout-multiplier command. For details on the flow-timeout-multiplier command, refer to the Cisco Content Services Switch Content Load-Balancing Guide.

Group Cumulative Counters

The counters for the group.

Hits/Frames/Bytes

The number of group hits, frames, and bytes. This field is incremented for traffic from a group server going out from the source group. Traffic coming into the group does not increment the counter.

Connection Total/Current

The total number of connections and the current number of connections for the group.

FTP Control Total/Current

The total number of FTP control channels that were mapped and monitored by the CSS, and the current number of those connections that are mapped.

SP Port Map Info

The port map information for each SP in the CSS. Includes the status of the portmap command (Enabled or Disabled).

SP

The slot and port number of the SP in the CSS.

Base Port

The starting SP port number in the CSS in the chassis.

Configured Base Port

The configured starting port number.

Configured Ports SP (or SFP)

The configured number of ports allowed on each SP in the CSS.

Current Mapped Ports

The current number of mapped ports.

Last Mapped Port

The most recently mapped port number for each SP in the CSS.

High Water Mark

The highest number of ports that this source group has had concurrently mapped since the last group was activated.

No Portmap Errors

The number of times no port could be allocated by the portmapper.


Clearing Source Group Counters

To set the statistics displayed by the show group command to zero, use the zero all command. The reset counter statistics appear as zero in the show group display.

For example, enter:

(config-group[ftpgroup])# zero all

Configuring Relative Load for Services

The following sections describe how to configure relative load for services:

Relative Load Overview

Configuring Relative Load

Showing Global Service Loads

Relative Load Overview

Relative load is a mechanism that the CSS uses to express the current load experienced by a service. The CSS calculates relative load by using the variances in normalized response times from client to service to determine a service's load number. A service with a heavier processing load would be biased toward a more significant, larger load number. For details on configuring absolute load, see the "Configuring the Absolute Load Calculation Method" section.

To configure global load parameters for the eligibility and ineligibility of CSS services, use the load report, load teardown timer, and load ageout timer commands (discussed later in this section).


Note Use relative load in a GSLB environment when the configurations and traffic patterns of all CSSs in the peer mesh are very similar.


You can adjust relative load calculations by changing the load step size, which is the difference, in milliseconds, between load numbers. The CSS can determine the load step dynamically, or you can configure the initial load step using the load step command.

The load on a service has a range of 2 to 255, with an eligible load of 2 to 254. An eligible service is an active service that can receive flows. A service with a load of 255 is offline.

A service becomes ineligible to receive flows when its load number exceeds the configured load threshold. The CSS uses the configured ageout timer value to return the service to the eligible state.

For the CSS to consider the service loads as different, response times of the services must differ by the configured load step or greater. If the response times differ by less than the configured load step, the CSS considers the services to have the same load.


Note Redirect services have load numbers associated with them, but the load numbers are either 2 (available) or 255 (unavailable).


Figure 1-2 shows servers A, B, and C with response times of 100 ms, 1100 ms, and 120 ms, respectively. One group of servers has load step configured to 10 ms. The second group of servers has load step configured to 100 ms.

Figure 1-2 Load Calculation Example with Three Servers

For the servers set to the 10 ms load step, the difference in response time between:

ServerA and serverB is 1000 ms. Because this value is greater than the configured load step of 10 ms, the CSS considers the server loads to be different.

ServerA and serverC is 20 ms. Because this value is greater than the configured load step of 10 ms, the CSS considers the server loads to be different.

For the servers set to 100 ms load step, the difference in response time between:

ServerA and serverB is 1000 ms. Because this value is greater than the configured load step of 100 ms, the CSS considers the server loads to be different.

ServerA and serverC is 20 ms. Because this value is less than the configured load step of 100 ms, the CSS considers servers A and C to be the same load.

Increasing the load step causes the load for servers to be closer to each other. Decreasing the load step causes the load for servers to be further from each other.

To enable you to configure an accurate load threshold for a server, you can calculate a load number for a server. To calculate a server load number:

1. Take the difference between the server with the lowest response time and the server for which you want to determine a load number.

2. Divide the difference by the configured load step.

3. Add this number to the calculated load step of the server with the lowest response time, which is always 2.

For example, to calculate the load number for serverC with the 10 ms load step:

1. Take the difference in server response time between serverA and serverC (20 ms).

2. Divide it by the configured load step (10 ms). The result equals 2.

3. Add 2 to serverA's (server with lowest response time) calculated load of 2 to determine serverC's calculated load of 4.

Configuring Relative Load

The following sections describe how to configure load:

Relative Load Configuration Quick Start

Configuring Global Load Reporting

Configuring the Relative Load Step

Configuring the Global Load Threshold

Configuring the Load Teardown Timer

Configuring the Load Ageout Timer

Relative Load Configuration Quick Start

Table 1-10 provides a quick overview of the basic steps required to configure relative load for services. Each step includes the CLI command required to complete the task. For a complete description of each feature and all the options associated with the CLI commands, see the sections following Table 1-10.

Table 1-10 Relative Load Configuration Quick Start 

Task and Command Example

1. Enter config mode by typing config.

# config
(config)#

2. Enable the CSS to generate teardown reports and to derive load numbers.

(config)# load reporting

3. Set the relative load step, which is the difference, in milliseconds, between load numbers.

(config)# load step 100 dynamic

4. Define the global load number. The CSS uses this number to determine whether a service is eligible to receive flows.

(config)# load threshold 25

5. Set the maximum time interval, in seconds, between teardown reports

(config)# load teardown-timer 120

6. Set the time interval, in seconds, in which the CSS times out stale load information for a service.

(config)# load ageout-timer 180

7. (Recommended) Use the show load command to verify your configuration.

(config)# show load

The following running-configuration example shows the results of entering the commands in Table 1-10.

!*************************** GLOBAL ***************************
  load teardown-timer 120 
  load ageout-timer 180 

  load step 100 dynamic 
  load threshold 25 

Configuring Global Load Reporting

A teardown report is a summary of response times for services when flows are being torn down. The CSS uses the teardown report to derive the load number for a service. By default, load reporting is enabled on the CSS. This command applies to both relative load and absolute load. Use the load reporting command to enable load reporting; the CSS generates teardown reports and derives load numbers.

If you are not concerned about load reporting, disable it and it may increase performance (depending on flows and load reporting already occurring). To disable load reporting, enter:

(config)# no load reporting

To reenable load reporting, enter:

(config)# load reporting

Configuring the Relative Load Step

By default, the CSS starts at a load step of 10 ms and then dynamically calculates the load step as it accumulates minimum and maximum response times for the services. Use the load step command to set the relative load step, which is the difference, in milliseconds, between load numbers. Load numbers have a range from 2 to 254.

When you configure the load step to reduce the flows to a slower service, consider the differences in response times between services. For example:

Increasing the load step causes the load for services to be closer to each other, thus increasing the number of flows to a slower service.

Decreasing the load step causes the load for services to be further from each other, decreasing the flows to a slower service.

The options and syntax for this global configuration mode command are:

load step ms dynamic (default) - Set the initial load step. The CSS uses the default of 10 ms as the initial load step, modifying it after the CSS collects sufficient response-time information.

load step ms static - Set a constant load step. The CSS uses this load step value instead of making dynamic calculations.

Enter the load step, in milliseconds, from 10 to 1000000000. The default is 10 ms. For example, to set the load step to 100 ms, enter:

(config)# load step 100

To set the load step to the default of 10 ms, enter:

(config)# no load step

Configuring the Global Load Threshold

The CSS uses the global load number to determine whether a service is eligible to receive flows. Use the load threshold command to define the global load number. If the service load exceeds the threshold, the service becomes ineligible to receive flows until the CSS ages the service into the eligible state. This command applies to both relative load and absolute load.

Enter the threshold as a number from 2 to 254. The default is 254, which is the maximum threshold services can reach before becoming unavailable. To view the global load on services, use the show load command (see Table 1-11 for details).

For example, to set the load threshold to 25, enter:

(config)# load threshold 25

Note If you do not configure a load threshold for the content rule with the (config-owner-content) load-threshold command, the rule inherits the global load threshold.


To set the load threshold to the default of 254, enter:

(config)# no load threshold

Note If you configure the absolute load calculation method on a CSS and a service exceeds its configured global load threshold, the CSS does not include the load of that service in any content rule load that the CSS advertises.


Configuring the Load Teardown Timer

A teardown report is a summary of response times for services when flows are being torn down. The CSS uses the teardown report to derive the load number for a service. This command applies to both relative load and absolute load.

When the CSS has sufficient teardown activity for a service, it generates a teardown report and the teardown timer is reset. If a teardown report is not triggered at the end of the teardown timer interval due to insufficient activity, the CSS generates a teardown report based on its current activity. If there is no activity, no report is generated and the timer resets.

Use the load teardown-timer command to set the maximum time between teardown reports. The teardown timer is the the number of seconds between teardown reports. Enter an integer from 0 to 1000000000. The default is 20. The value of 0 disables the timer.


Note The teardown timer is overridden when a service is reset. After 10 teardown reports are recorded, the timer is reset to its configured value.


For example, to set the teardown timer to 120 seconds, enter:

(config)# load teardown-timer 120

To reset the teardown time interval to its default of 20 seconds, enter:

(config)# no load teardown-timer

Configuring the Load Ageout Timer

By default, the CSS times out stale load information for a service at time interval of 60 seconds. When the ageout timer interval expires, the CSS erases the information and resets the service load to 2. Load information is stale when the teardown report number recorded on a service has not incremented during the ageout time interval because no flows (long or short) are being torn down on the service. This command applies to both relative load and absolute load.

At the beginning of the time interval, the ageout timer saves the number of the current teardown report. When the CSS generates a new teardown report, the report number in the CSS increments and any services in the report will save this number. At the end of the ageout time interval, the CSS compares the initial teardown number, saved at the beginning of the time interval, with the current teardown number saved by each service. If the number of a service is less than or equal to the timer number, the load information is stale. The CSS erases it and the service load is reset to 2.

Use the load ageout-timer command to set the time interval, in seconds, in which the CSS times out stale load information for a service. Enter the ageout timer as the number of seconds to time out load information for a service. Enter an integer from 0 to 1000000000. The default is 60. A value of 0 disables the timer.

For example, enter:

(config)# load ageout-timer 180

To set the ageout time to the default of 60, enter:

(config)# no load ageout-timer

Showing Global Service Loads

Use the show load command to display the global load configuration and service load information. For example, enter:

(config)# show load

Table 1-11 describes the fields in the show load command output.

Table 1-11 Field Descriptions for the show load Command Output 

Field
Description

Global load information

The configured state of load reporting (enabled or disabled). Reporting is disabled by default.

Step Size

The configured method in which the load step size is calculated:

Dynamic indicates that the CSS calculates the step size.

Static indicates that the configured step size is used.

Configured

The configured load step. The value is the difference, in milliseconds, between load numbers. If the step size method is dynamic, this is the initial load step. The CSS modifies the value after it collects sufficient response time information from the services.

Actual

The actual load step. The value is the difference, in milliseconds, between load numbers. If the step size method is configured, the actual value will be the same as that in the Configured field.

Threshold

The configured global load number that the CSS uses to determine whether a service is eligible to receive flows. The range is from 2 to 254. The default is 254.

Ageout-Timer

The configured time interval, in seconds, in which stale load information for a service is timed out. When the ageout timer interval expires, the CSS erases the information and resets the service load to 2. The range is an integer from 0 to 1000000000. The default is 60. A value of 0 disables the timer.

Teardown-timer

The maximum time between teardown reports. The range is from 0 to 1000000000. The default is 20. A value of 0 disables the timer.

Configured

The configured maximum time between teardown reports. The range is from 0 to 1000000000. The default is 20. A value of 0 disables the timer.

Actual

The actual time between teardown reports.

Service Name

The name of the service.

Average Load Number

The average load number for the service.


Configuring the Absolute Load Calculation Method

Configure the absolute load calculation method on a CSS to enhance the way the CSS determines service load, either locally, or in a global server load balancing (GSLB) environment. This method is an alternative to the relative load-calculation algorithm and calculates the load on a service without normalizing load values against the fastest services on the CSS. Consider using absolute load instead of relative load when you have a single CSS serving multiple applications, or when you are using GSLB to balance between multiple CSSs.

The section contains the following subsections:

Overview of Calculating Absolute Load

Configuration Requirements and Restrictions

Configuring Load Calculation

Using the load absolute-sensitivity Command

Configuring Load Variance

Displaying Relative Load Statistics

Displaying Absolute Load Calculation Ranges

Overview of Calculating Absolute Load

Calculating absolute load numbers for services may allow the CSS to make more intelligent load-balancing decisions than using relative load numbers. Absolute load only takes into account the actual observed load on a service, whereas relative load compares services to the service with the fastest response time.

Absolute load also allows you to configure the response times that correlate with values within the CSS load number scale. Unlike the relative load number scale, where all the load numbers between 2 and 254 represent equal steps or increases in response times, absolute load creates 16 different divisions or ranges within the CSS load number scale. Ranges are groups of consecutive load numbers that share a common step size (delta) between numbers.


Note Regardless of which load calculation method you choose, be sure that all CSSs in a GSLB environment have very similar configurations.


This feature provides a default set of 16 ranges with a configurable sensitivity option that you can use to modify the upper boundary of the load number scale while adjusting the step sizes (granularity) within the ranges. In general, the better the granularity between load numbers, the better load balancing a CSS performs. However, if the granularity is too fine, the slower servers will be excluded from the load number scale and load numbers will be meaningless for these load-balancing decisions. Keeping the ranges within the load number scale allows some fine granularity for faster servers and coarser granularity for slower servers, while accommodating both short-lived and long-lived flows.

A CSS calculates the average response time for a service based on the measured lifetime of flows to that service. The CSS filters the response values for deviation and damps them to avoid sudden changes. The average response time is then mapped to the absolute load ranges.

For example, suppose a site has two groups of services serving two different types of applications. Group A supports application A, which involves mainly short-lived, quick connections; Group B supports application B, which is much more server-intensive and takes longer to complete. Further, it should never take more than 200 ms for a service handling application A to respond, but it could take up to 200,000 ms for services handling application B to respond. Rather than grouping these services together and using a response time much too large for application A, absolute load allows the CSS to use ranges within the load number scale to better handle load monitoring and balancing for each application.

Configuration Requirements and Restrictions

Observe the following configuration requirements and restrictions when you configure your services.

You must configure the load reporting command to enable the CSS to derive loads on services. See the "Configuring Global Load Reporting" section.

If you are using absolute load calculations in a GSLB configuration, the values of load absolute sensitivity should be the same for all participating sites.

If you decide to change an existing configuration to use absolute load instead of relative load, it is possible that the CSS load-balancing behavior will change. The CSS may report some service load numbers differently; any configured load thresholds may affect these load numbers.

If you plan to combine absolute load calculation with the GSLB least-loaded algorithm, we recommend that you set the load variance to 0. This ensures that the CSS always uses load numbers to determine the least-loaded site.

Absolute Load Configuration Quick Start

Table 1-12 provides a quick overview of the basic steps required to configure absolute load. Each step includes the CLI command required to complete the task. For a complete description of each feature and all the options associated with the CLI commands, see the sections following Table 1-12.

Table 1-12 Absolute Load Configuration Quick Start 

Task and Command Example

1. Enter config mode by typing config.

# config
(config)#

2. Specify the absolute load method, which the CSS uses to assign load numbers to all configured services. See the "Configuring Load Calculation" section.

(config)# load calculation absolute

3. Configure the load variance using one of the following commands, depending on your DNS load-balancing configuration. We recommend that you configure a load variance value of 0 when you use the absolute load calculation method.

dns-peer load-variance - Sets the difference in peer load numbers that a CSS considers to be similar for the least loaded algorithm in a rule-based DNS load-balancing decision. For more information on the dns-peer command, refer to the Cisco Content Services Switch Global Server Load-Balancing Configuration Guide.

dns-server zone load variance - Sets the deterministic difference in peer load numbers that a CSS considers to be similar for the least loaded algorithm in a zone-based DNS load-balancing decision. For more information on the dns-server zone command, refer to the Cisco Content Services Switch Global Server Load-Balancing Configuration Guide.

(config)# dns-peer load variance 0
(config)# dns-server zone load variance 0

4. (Recommended) Use the show load command to display the load calculation information for each service configured on your CSS.

(config)# show load

5. (Recommended) Use the show load absolute command to display absolute load number ranges.

(config)# show load absolute

The following running-configuration example shows the results of entering the commands in Table 1-12.

!*************************** GLOBAL ***************************
   dns-server zone load variance 0 

   load calculation absolute 

Configuring Load Calculation

By default, the CSS uses the relative load calculation method to assign load numbers to all configured services. This method assigns load numbers to services based on a comparison with the fastest local service. Use the load calculation command to specify the calculation method that the CSS uses to assign load numbers to all configured services. The syntax for this global configuration mode command is:

load calculation relative|absolute

The options are:

relative (default) - Specifies that the CSS assigns load numbers to services based on a comparison with the fastest local service. For details about relative load, see the "Relative Load Overview" section.

absolute - Specifies that the CSS assigns load numbers to services based strictly on pure response times.

For example, to configure the absolute load calculation method, enter:

(config)# load calculation absolute

To return the load calculation method to the default of relative, enter:

(config)# no load calculation

Note In a GSLB environment with the absolute load calculation method configured, if a service exceeds its maximum connections limit, exceeds the local load threshold, or has a configured weight of 0 (to gracefully shut down), a CSS does not consider the load for that service in the calculation of reported load average for one or more content rules. This behavior results in more accurate load average reporting for APP, kal-ap, and kal-ap-vip. For information about services, refer to the Cisco Content Services Switch Content Load-Balancing Configuration Guide. For details about APP, kal-ap, and kal-ap-vip, refer to the Cisco Content Services Switch Global Server Load-Balancing Configuration Guide.


Using the load absolute-sensitivity Command

By default, the absolute load calculation method uses an internal load number scale designed to support a wide range of configurations and applications. However, you can adjust the absolute load number scale to suit your configuration.

Configuring load absolute-sensitivity

Increasing the CSS load absolute-sensitivity value increases the upper boundary of the maximum response time and the step size (granularity) of the absolute load number scale, thereby reducing the load value for a given service response time. Conversely, decreasing the load absolute-sensitivity value decreases upper boundary of the the maximum response time and the step size (granularity) of the absolute load number scale, thereby increasing the load value for a given service response time.

Use the load absolute-sensitivity command to modify the absolute load number scale. The syntax for this global configuration mode command is:

load absolute-sensitivity number

The number variable specifies the sensitivity of the absolute load number scale. Enter an integer from 1 to 25. The default is 21.

For example, to configure a load sensitivity of 18, enter:

(config)# load absolute-sensitivity 18

To return the load absolute-sensitivity to the default value of 21, enter:

(config)# no load absolute-sensitivity

For number values from 1 to 20, the absolute load number ranges are linear, which means that the step sizes are equal among all the ranges. For values from 21 to 25, the ranges are nonlinear, which means different ranges have different step sizes that increase as the range number increases. For details, see the "Displaying Absolute Load Calculation Ranges" section later in this chapter.

Optimizing the Absolute Load Number Scale

As an experienced user, you can optimize the absolute load number scale to more closely resemble the actual load numbers and maximum response times of your configured services. Before you attempt to modify the absolute load number scale, read this procedure in its entirety to familiarize yourself with the steps. To optimize the absolute load number scale:

1. Use the show load command to gather information about the load numbers and response times of your configured services. Capture and print out or write down the statistics from the show load command output. See the "Displaying Relative Load Statistics" section later in this chapter.

2. Use the data you gathered in Step 1 to determine if you have services whose peak average response times correspond approximately with the maximum response time associated with a load of 254, as displayed with the show load absolute command. See the "Displaying Absolute Load Calculation Ranges" section later in this chapter.

3. Expand the absolute response time range if you do have such services and the high load values are unexpected. Do this by gradually increasing the load absolute-sensitivity value in increments of one, thereby reducing the load number for those services. You may find it desirable to repeat this step until the target service load values reach the middle of the absolute load number scale.

4. Condense the absolute response time range if your peak average service response times tend to cluster around lower load number range. Do this by gradually decreasing the load absolute-sensitivity value in decrements of two, thereby increasing the load number for those services.

5. Monitor the results of each change you make to the load absolute-sensitivity value by observing the show load absolute command output. See the "Displaying Absolute Load Calculation Ranges" section later in this chapter.

6. Repeat Steps 3, 4, and 5 until you are satisfied with the load number and response time results for each configured service.

7. Be sure to allow sufficient load number differentiation among all your services for best load-balancing result. Check to ensure that all services are represented on the absolute load number scale and that services are not clustered around a particular load number range.

8. Test the new configuration by running traffic through the CSS and checking the load-balancing results with the show rule owner_name content_rule_name services and show service commands. If necessary, repeat this entire procedure.

Configuring Load Variance

Load variance is a configured value that represents a range of load numbers among sites or zones that the CSS considers to be similar for the least-loaded algorithm in a DNS load-balancing decision. For example, if you configure a load variance of 50, and the load difference among three sites is 50 or less, the CSS calculates the minimum response time for each site, then selects the site with the fastest service, ignoring the similar load values.


Note For GSLB, we recommend that you set the same load variance value on all CSSs in a peer mesh. If you configure the absolute load calculation method, we recommend that you configure a load variance of 0. See the "Configuring Load Calculation" section.


To set the deterministic difference in peer load numbers that a CSS considers to be similar for the least-loaded algorithm in a zone-based DNS load-balancing decision, use the dns-server zone load variance command. For the number variable, enter an integer from 0 to 254. The default is 50. Use the no dns-server zone load variance command to restore the load variance to the default of 50. For more information on the dns-server zone command, refer to the Cisco Content Services Switch Global Server Load-Balancing Configuration Guide.

Displaying Relative Load Statistics

Use the show load command to display the load calculation information for each service configured on your CSS.

Table 1-13 describes the service-specific fields in the show load command output.

Table 1-13 Service-Specific Field Descriptions for the show load Command Output 

Field
Description

Service Name

Name of the configured service

Average Load Number

Accumulated average load number for the service identified in the Service Name field. Values range from 2 to 255 and indicate a position on the load number scale. A load of 255 indicates that the service is unavailable.

Average Response Time

Accumulated average response time, in milliseconds, for the service identified in the Service Name field. The displayed value indicates the response time measured from flow setup to flow teardown.

Peak Average Response Time

Highest Average Response Time, in milliseconds, reported for each configured service.


Use the Average Response Time and the Peak Average Response Time values when you configure services and their associated load and when monitoring configured services. These two fields appear in the show load command output regardless of the configured load calculation method.

After monitoring traffic, use the show load command to determine whether the absolute-sensitivity value needs to be modified for your configuration. Observe the peak response times of all the servers and determine the worst performing service. By comparing the worst server response time to the associated response time of the load number 254, you can determine whether the load number scale needs to be expanded.


Note You can reset the current values of Average Response Time and Peak Average Response Time by toggling load reporting using the no load reporting and the load reporting commands. Be sure that load reporting is enabled when you are finished. The CSS requires that the load reporting command be enabled to calculate loads for services.


Displaying Absolute Load Calculation Ranges

Use the show load absolute command to display absolute load number ranges. This command displays all load numbers and their associated maximum response times based upon the currently configured value for load absolute-sensitivity (see the "Configuring load absolute-sensitivity" section). The show load absolute command also displays the ranges and their calculated step sizes for load numbers within a range. Table 1-14 displays the show load absolute command output based on the load absolute-sensitivity default value of 21.

Table 1-14 Output for the show load absolute Command (load absolute-sensitivity = 21) 


Range Number


Load Numbers


Step Size (ms)
Maximum Response Time (ms)
Maximum Response Time (h:m:s)

1

2-15

2

32

0: 0: 0

2

16-31

4

96

0: 0: 0

3

32-47

8

224

0: 0: 0

4

48-63

16

480

0: 0: 0

5

64-79

32

992

0: 0: 0

6

80-95

64

2016

0: 0: 2

7

96-111

128

4064

0: 0: 4

8

112-127

256

8160

0: 0: 8

9

128-143

512

16,352

0: 0:16

10

144-159

1024

32,736

0: 0:32

11

160-175

2048

65,504

0: 1: 5

12

176-191

4096

131,040

0: 2:11

13

192-207

8192

262,112

0: 4:22

14

208-223

16,384

524,256

0: 8:44

15

224-239

32,768

1,048,544

0:17:28

16

240-254

65,536

2,031,584

0:33:51


Table 1-15 describes the fields in the show load absolute command output.

Table 1-15 Field Descriptions for the show load absolute Command Output 

Field
Description

Range Number

Numbers from 1 to 16 representing the Load Number ranges

Load Numbers

Numbers from 2 to 254 of the CSS load scale segmented into 16 ranges

StepSize

Difference between response times for load numbers within a range

Maximum Response Time

Maximum response time, measured from flow setup to flow teardown, permitted in a range


The load number scale starts at 2 and ends at 255, where the value of 255 means a service is unavailable. Within the load number scale, there are 16 equal-sized ranges. The response time boundaries of each range are based on deriving a step size and the number of steps within a range. The stepsizes differ among ranges, with stepsizes getting larger as load numbers increase. This scheme provides finer granularity to faster services where it is needed and provides coarser granularity to slower services.

Table 1-16 displays the show load absolute command output based on a load absolute-sensitivity value of 22. Notice that both the Step Size and the Maximum Response Time values have increased for each range.

Table 1-16 Output for the show load absolute Command (load absolute-sensitivity = 22) 


Range Number


Load Numbers


Step Size (ms)
Maximum Response Time (ms)
Maximum Response Time (h:m:s)

1

2-15

4

60

0: 0: 0

2

16-31

8

188

0: 0: 0

3

32-47

16

444

0: 0: 0

4

48-63

32

956

0: 0: 0

5

64-79

64

1980

0: 0: 1

6

80-95

128

4028

0: 0: 4

7

96-111

256

8124

0: 0: 8

8

112-127

512

16,316

0: 0:16

9

128-143

1024

32,700

0: 0:32

10

144-159

2048

65,468

0: 1: 5

11

160-175

4096

131,004

0: 2:11

12

176-191

8192

262,076

0: 4:22

13

192-207

16,384

524,220

0: 8:44

14

208-223

32,768

1,048,508

0:17:28

15

224-239

65,536

2,097,084

0:34:57

16

240-254

131,072

4,063,164

1: 7:43


Table 1-17 displays the show load absolute command output based on a load absolute-sensitivity value of 1. This value represents the smallest (finest) granularity allowed between service response times and the load numbers that represent them. Notice that the step size remains constant (linear) for all ranges.

Table 1-17 Output for the show load absolute Command (load absolute-sensitivity = 1) 


Range Number


Load Numbers


Step Size (ms)
Maximum Response Time (ms)
Maximum Response Time (h:m:s)

1

2-15

1

16

0: 0: 0

2

16-31

1

32

0: 0: 0

3

32-47

1

48

0: 0: 0

4

48-63

1

64

0: 0: 0

5

64-79

1

80

0: 0: 0

6

80-95

1

96

0: 0: 0

7

96-111

1

112

0: 0: 0

8

112-127

1

128

0: 0: 0

9

128-143

1

144

0: 0: 0

10

144-159

1

160

0: 0: 0

11

160-175

1

176

0: 0: 0

12

176-191

1

192

0: 0: 0

13

192-207

1

208

0: 0: 0

14

208-223

1

224

0: 0: 0

15

224-239

1

240

0: 0: 0

16

240-254

1

255

0: 0: 0


Table 1-18 displays the show load absolute command output based on a load absolute-sensitivity value of 2. The step size remains constant for all ranges, but its value has increased. The maximum response time associated with each range has also increased.

Table 1-18 Output for the show load absolute Command (load absolute-sensitivity = 2) 


Range Number


Load Numbers


Step Size (ms)
Maximum Response Time (ms)
Maximum Response Time (h:m:s)

1

2-15

2

30

0: 0: 0

2

16-31

2

62

0: 0: 0

3

32-47

2

94

0: 0: 0

4

48-63

2

126

0: 0: 0

5

64-79

2

158

0: 0: 0

6

80-95

2

190

0: 0: 0

7

96-111

2

222

0: 0: 0

8

112-127

2

254

0: 0: 0

9

128-143

2

286

0: 0: 0

10

144-159

2

318

0: 0: 0

11

160-175

2

350

0: 0: 0

12

176-191

2

382

0: 0: 0

13

192-207

2

414

0: 0: 0

14

208-223

2

446

0: 0: 0

15

224-239

2

478

0: 0: 0

16

240-254

2

508

0: 0: 0


Using ArrowPoint Content Awareness Based on Server Load and Weight

The ArrowPoint Content Awareness (ACA) load-balancing algorithm balances traffic between a group of servers. You can configure the CSS to make ACA load-balancing decisions based on:

Server load

Server weight and load

Using ACA Based on Server Load

ACA determines the best service for each content request based on server load and size of the content being requested. ACA estimates the file size based on previous requests for the same content. A service with a lower load receives more flows than a service with a higher load.

Using ACA Based on Server Weight and Load

Server weight is a mechanism to express the processing capabilities of a server. Weights allow you to configure the CSS to prefer one group of servers over another. When you configure weights, the number of hits per server is relative to the weight configured on that server. A higher weight will bias flows toward the specified server. For example, in Figure 1-2, ServerA with a weight of two is hit twice as often as ServerB which has a weight of one. ServerC has a weight of 10 and is hit 10 times as often as ServerB. All servers with the same weight are hit equally in a roundrobin manner.

The CSS can use a server's weight in tandem with server load to determine server availability. When you configure ACA on a content rule to use both weight and load, the CSS calculates the number of requests per weight level based on the number of servers with that weight. The CSS then balances the requests among the servers based on their individual loads. The number of requests per weight level is equal to weight level times the number of servers times 10. The CSS then increments the weight level and uses the same mechanism to balance requests among the servers in the next weight level.

For information on configuring weight for a service, see the "Configuring Weight and Graceful Shutdown" section earlier in this chapter. Also see the "Specifying a Service Weight" section in Chapter 3, Configuring Content Rules.

Configuring the Load Command for Use with ACA

To configure a load on a service and bypass the CSS load calculation method (relative or absolute), use the load command in service configuration mode. Use this command with the ACA load-balancing method when you want to take into account server load parameters, for example:

CPU utilization

Free memory

Application threads

Other server tasks

You can set the load command value with your application or server using SNMP or the CSS XML interface. For information about ACA, see the "Using ArrowPoint Content Awareness Based on Server Load and Weight" section. For information about SNMP and the XML interface, refer to the Cisco Content Services Switch Administration Guide.


Caution Before you can use the load command on a service, you must disable load reporting by entering the no load reporting command in global configuration mode. Do not reenable load reporting. If you do, the load value you entered with the load command will no longer apply to the service. To recover, you must disable load reporting again and reenter the load command on the service at the CLI.

The load command has the following syntax:

load number

The number variable is the load value that you assign to a service. A service with a higher load number receives fewer hits than a service with a lower load number. The CSS considers a service with a load of 254 as unavailable, and, therefore, the service receives no hits. Enter an integer from 2 to 254. The default is 2.

For example, to configure a load of 50, enter:

(config-service[server1])# load 50

Use the no form of the command to reset the load value to the default of 2. For example, enter:

(config-service[server1])# no load

To display the configured value for the load command, use the show load command. For details about the show load command, see the "Showing Global Service Loads" section.

Configuring Dynamic Feedback Protocol for Server Load Balancing

The Dynamic Feedback Protocol (DFP) is a mechanism that allows load-balanced servers (both local and remote) to dynamically report changes in their status and their ability to provide services to a CSS. A status report sent to a CSS from a server contains a relative weight/number of connections to define the load and availability of each server. A CSS incorporates server feedback into the load-balancing decision process in order to:

Obtain server availability information

Identify load imbalances over multiple sites

Distribute traffic more evenly

The following sections describe DFP and how to configure it:

DFP Overview

Functions of a DFP Agent

Types of DFP Messages

DFP System Flow

Configuring a DFP Agent

Maintaining a Consistent Weight Range Among Services

Displaying Configured DFP Agents

Displaying Services Supported by Configured DFP Agents

Displaying DFP Information

DFP Overview

The DFP manager (running on the CSS as a task and part of the load manager) is responsible for establishing TCP connections with the DFP agents that reside on each server. A DFP manager can communicate simultaneously with a maximum of 127 DFP agents. DFP agents can be software running on the actual server itself or may be separate hardware devices that collect and consolidate information from one or more servers for load-balancing purposes. DFP agents are available from a number of third-party sources.

DFP agents collect relative weights from the load-balanced servers and periodically send new or adjusted weights to the DFP manager in the form of load vectors. The CSS load manager distributes the incoming connections or services (local or remote) to the servers in the order of weight assigned to the load-balanced servers. The load manager uses the reported weights to choose the best available server, resulting in optimal performance of servers and less response time.


Note If you configure a weight on a service using the add service weight command in owner-content configuration mode, the configured weight takes precedence over the service weight reported by the DFP agent for that content rule. In turn, the DFP-reported weight take precedence over the weight configured on a service in service configuration mode.


The CSS uses load-balancing algorithms such as roundrobin, weighted roundrobin, Arrowpoint Content Aware (ACA), and least connections to distribute the incoming connections or service requests. Weighted roundrobin can take advantage of the server weights reported by the DFP agents.

The weighted roundrobin load-balancing method uses weight to specify how many consecutive connections to give to the highest-weighted server before moving on to the next highest-weighted server. As a server's load changes, the DFP agent recalculates the weight for each server and reports the updated weights to the DFP manager, thereby influencing how the load manager distributes the service requests. For more information on CSS server load-balancing, refer to Chapter 3, Configuring Content Rules.

Functions of a DFP Agent

A DFP agent reports server weight/connection information to the DFP manager. Multiple DFP agents can exist on a server platform. An agent provides several benefits to the load-balancing process. A DFP agent can inform the CSS that the server:

Is congested

Is under-utilized

Should not be used for load balancing for a period of time

Types of DFP Messages

The following messages are defined for communication between the DFP agent and the DFP manager in the CSS:

The preference information message reports the status or weight of an IP server and is sent from the DFP agent to the DFP manager.

The server state message, sent from the DFP manager to the agent, informs the agent that the load manager has decided to take the server in or out of service.

The DFP parameters send configuration information from the DFP manager to the agent. Currently, the only configuration parameter passed is the keepalive interval.

DFP messages consist of a DFP header called a signal header followed by message vectors. Vectors are optional commands that exist in the defined messages. Each message vector contains a vector header, which is the first part of each vector in the DFP message, followed by data specific to the defined vector. The vector header allows the DFP manager or the DFP agent to discard any vectors or commands that it does not understand.

Defined vectors for DFP include:

Security Vector - Allows each DFP message to be verified.

Load Vector - Contains the actual load information being reported for the real servers and represents the servers' preferred capability.

Keepalive Vector - Part of the DFP connection configuration. The keepalive vector allows the load manager to inform the DFP agent of the minimum time interval by which the agent must send information over the DFP connection to the CSS.

If a CSS receives a message that contains a vector type that it does not understand, The CSS discards the unknown vector.

DFP System Flow

When you configure a DFP agent on a CSS, the DFP manager initiates a single TCP connection with the DFP agent (regardless of the number of servers the agent supports) with the parameters specified in the DFP agent configuration. The DFP manager sends a keepalive vector in a DFP message to change the default keepalive time if required.

After the connection is established, the DFP agent periodically sends update information in the form of a load-vector. If an agent has no information to send, it still must send an empty DFP packet to prevent the connection from being torn down.

If a DFP agent is responsible for collecting information from multiple servers, the servers are grouped by their port number and protocol type, and a separate load vector is required for each grouping. A DFP agent can report weights for a maximum of 128 servers in a single weight report. Upon receiving information about an adjusted weight, the e DFP manager updates the weights of the server reported in the list of load-balanced servers.

If DFP is disabled, a CSS uses the weight configured on a service in owner-content configuration mode using the add service weight command (for that content rule only) or the weight configured on the service in service configuration mode, in that order. If no weight is configured on the service, the CSS uses a default weight of 1 to load balance the service. If a connection between a DFP agent and the DFP manager closes because of a timeout, a CSS uses the default weight for load balancing until the DFP manager reestablishes the connection with the DFP agent and obtains a new weight report.

If the configured DFP agent supports MD5 security, you can specify a shared key text string in the DFP manager. MD5 encryption is a one-way hash function that provides strong encryption protection. The CSS provides an MD5 secure connection between the DFP manager and the DFP agent on the server. In this secure environment, the CSS discards DFP messages from the server unless the messages contain the MD5 code.

Figure 1-3 summarizes the relationship between the DFP manager (in the CSS) and a DFP agent.

Figure 1-3 Example of DFP Manager to DFP Agents System Flow

Configuring a DFP Agent

To configure a DFP agent listening for DFP connections on a particular IP address and TCP port combination on a server and to enable the DFP manager on the CSS, use the dfp command. You can configure a maximum of 127 DFP agents for the DFP manager in the CSS. Use the no dfp command to disable the DFP agent connection to a particular IP address.

The syntax for the dfp command is:

dfp ip_or_host {port} {key "secret"|[des-encrypted encrypted_key|"encrypt_key"]} {timeout seconds} {retry count}
{
delay time} {max-agent-wt weight}

The variables and options are:

ip_or_host - The IP address or host name of the configured DFP agent. Enter an IP address in dotted-decimal notation (for example, 192.168.11.1) or a mnemonic host name (for example, myhost.mydomain.com).

port - (Optional) The server TCP port that the configured DFP agent uses to listen for connections from the CSS DFP manager. Valid entries are 0 to 65535. The default is 14001.


Note Do not configure a service TCP keepalive to connect to the same port that the DFP agent uses to listen for connections from the DFP manager. This type of configuration causes the built-in DFP keepalive to fail.


key "secret" - (Optional) An MD5 security key used for encryption to provide a secure data exchange between the CSS DFP manager and the DFP agents. MD5 encryption is a one-way hash function that provides strong encryption protection. Enter the secret as a case-sensitive quoted text string (maximum of 64 characters). It can include any printable ASCII character except tabs.

For DFP to function properly, ensure that you configure the same key on each DFP agent that you configured on the DFP manager. If the key on an agent does not match the key on the DFP manager, no connection will be established and the DFP agent will not be able to send a weight report to the CSS. In this case, when the DFP manager fails to establish a connection with an agent for a given key, the CSS logs the following informational message in SYSLOG: Secret key might not be same as DFP agent's key. Check secret key.

des-encrypted - (Optional) Specifies that a Data Encryption Standard (DES) key follows.

encrypted_key - The DES key that the CSS previously encrypted. The CSS does not reencrypt this key. The CSS saves the key in the running-config the same as you entered it. Enter an unquoted case-sensitive text string with no spaces and a maximum of 128 characters.

"encrypt_key" - The DES encryption key that you want the CSS to encrypt. The CSS saves the encrypted key in the running-config as you entered it. Enter a quoted case-sensitive text string with no spaces and a maximum of 64 characters.

timeout seconds - (Optional) The maximum inactivity time period (the keepalive time) for the connection between the CSS DFP manager and the server DFP agent. If the inactivity time period exceeds the timeout value, the DFP manager closes the connection. The DFP manager attempts to reopen the connection as often as specified by the value of the retry option. The range is from 1 to 10000 seconds. The default is 3600 seconds (1 hour).

retry count - (Optional) The number of times the CSS DFP manager tries to reopen a connection with the server DFP agent. The range is from 0 (for continuous retries) to 65535. The default is 3 retry attempts.

delay time - (Optional) The delay time, in seconds, between each attempt to reestablish a connection. Valid entries are 1 (immediately) to 65535 seconds (18 hours). The default value is 5 seconds.

max-agent-wt value - (Optional) Maximum value of the weight reported by a DFP agent. A CSS uses this option to scale the reported weight when the weight range of a DFP agent does not match the weight range of the DFP manager. For example, the DFP manager weight range is 0 to 255. If a DFP agent reports weight in the range 0 to 16, the CSS scales up the agent-reported weight to match the weight range of the DFP manager. If an agent reports weight in the range 0 to 65535, the CSS scales down the agent-reported weight to match the weight range of the DFP manager.

If a DFP agent reports a weight greater than the maximum configured weight, then the CSS rejects the weight report and does not use the weight in load-balancing decisions. In this case, the CSS also logs an error in SYSLOG. Enter an integer from 1 to 65535. The default is 255.

For example, the following command configures the DFP manager to communicate with the DFP agent at the specified address running with the following options and variables:

DFP agent IP address - 192.168.1.2

Port - 14001 (default)

MD5 security key - "hello"

Connection timeout - 6000 seconds

Number of connection retries - 3

Delay between connection retries - 60 seconds

(config)# dfp 192.168.1.2 14001 key "hello" timeout 6000 retry 3 
delay 60 

To disable the DFP agent, enter:

(config)# no dfp 192.168.1.2 

Maintaining a Consistent Weight Range Among Services

The CSS has a weight range of 1 through 10; the DFP manager has a weight range of 0 through 255. Because of this difference in weight ranges, you may need to manually adjust the weights configured on the DFP agent for different services to maintain the same service weight range that exists outside of the DFP.

For example, suppose that you configure on the same content rule three services (serv1, serv2, and serv3) with weights of 1, 2, and 5, respectively. If the DFP agent reports a weight of 20 for serv1, serv1 will now receive 20 connections for every 2 connections on serv2 and 5 connections on serv3. This configuration places a disproportionate load on serv1, especially if serv2 and serv3 represent fast servers with plenty of unused resources.

To solve this problem and to maintain the same weight range for all three services, you can do either of the following:

Force the DFP agent to report a weight in the range of 1 to 10 for serv1

Have the DFP agent report weights for all three services to maintain the same weight range

Displaying Configured DFP Agents

For reporting purposes, you can view the configured DFP agents on a CSS using the show dfp command. This command displays a list of all DFP agents or the DFP agents at the specified IP address or host name arranged by their IP addresses, the port number on which the agent is connected to the DFP manager, the current state of the DFP agent, the keepalive time for the DFP TCP connection, and the DES-encrypted key of the agent, if any.

The syntax for this command is:

show dfp ip_or_host

The ip_or_host variable allows you to specify the DFP agent or agents running at a particular IP address or host name.

For example, to display configuration information for all DFP agents, enter:

# show dfp

Table 1-19 describes the fields in the show dfp command output.

Table 1-19 Field Descriptions for the show dfp Command Output 

Field
Description

IP Address

The IP address of the configured DFP agent.

Port

The port number of the configured DFP agent. The default is 14001.

State

The state of the DFP agent. Possible states are Active, Dead, or Connecting.

KAL

The configured maximum inactivity time, in seconds, for the TCP connection between the DFP manager and the DFP agent. When this time elapses, the CSS tears down the connection.

MD5 Key

The DES-encrypted key of the DFP agent, if configured.


Displaying Services Supported by Configured DFP Agents

To view the individual weights of load-balanced services reported by a configured DFP agent, use the show dfp-reports command. This command groups the weights by the port number of reported services, the type of protocol, and the IP address of servers.

The syntax for this command is:

show dfp-reports {ip_or_host {port number {protocol text {ip ip_or_host}}}}

The options and variables for this command are:

ip_or_host - The IP address or host name of the configured DFP agent. Enter an IP address in dotted-decimal notation (for example, 192.168.11.1) or a mnemonic host name (for example, myhost.mydomain.com).

port number - (Optional) The port number for the load-balanced server or service. Valid entries are 0 to 65535. The default is 14001.

protocol text - (Optional) The type of protocol for the load-balanced server or service. Possible values are TCP, UDP, HTTP, or FTP.

ip ip_or_host - (Optional) The IP address or host name of the load-balanced server or service. Enter an IP address in dotted-decimal notation (for example, 192.168.11.1) or a mnemonic host name (for example, myhost.mydomain.com).

The following example shows the weight reported by a DFP agent configured at 192.168.1.2, for server 192.168.1.3. Weights are first grouped by port number of reported servers, and then by protocol.

# show dfp-reports 192.168.1.2 port 80 protocol tcp ip 192.168.1.3

Table 1-20 describes the fields in the show dfp-reports command output.

Table 1-20 Field Descriptions for the show dfp-reports Command Output 

Field
Description

Service

The name of the configured service for which the DFP agent is reporting

Weight

The last weight reported by the DFP agent for the service

Time-Stamp

The month, day, and time of the last-received report

# of Reports

The total number of reports


Displaying DFP Information

To display DFP information, see the following sections:

Using the show service Command

Using the show rule services Command

Using the show service Command

Use the show service command to display service-specific information. The show service command output includes a DFP field that indicates the state of DFP. Possible states are Enable or Disable.

The state is Enable when DFP is configured and there is no weight configured on the service in owner-content configuration mode. The state is Disable if DFP is not enabled or if DFP is enabled and you have configured a service weight in owner-content configuration mode using the add service weight command.

For details on the show service command, see the "Showing Service Configurations" section earlier in this chapter.

Using the show rule services Command

Use the show rule services command in owner-content mode to display weights configured for services in service mode, owner-content mode, and DFP, as well as other service-related information. The output of the command includes the weight assigned to each service preceded by a code letter. The code letters have the following meanings:

D, the weight reported by a DFP agent

R, the weight configured for a service using the add service weight command in owner-content mode

S, the weight configured for a service using the weight command in service mode

For details on the show rule services command, see Chapter 3, Configuring Content Rules.

Where to Go Next

For information on creating and configuring owners, see Chapter 2, Configuring Owners.