26
Catalyst 6000 Family Content Switching Module Installation and Configuration Note
78-11631-02 Rev. A0
Configuring the Content Switching Module
This example shows how to create real servers:
Router(config)#
ip slb serverfarm
serverfarm
Router(config-slb-sfarm)#
real 10.8.0.7
Router(config-slb-real)#
inservice
Router(config-slb-sfarm)#
real 10.8.0.8
Router(config-slb-real)#
inservice
Router(config-slb-sfarm)#
real 10.8.0.9
Router(config-slb-real)#
inservice
Router(config-slb-sfarm)#
real 10.8.0.10
Router(config-slb-real)#
inservice
Router(config-slb-real)#
end
Router# show ip slb real
detail
Router# show ip slb conns
detail
Configuring Policies
Policies are access rules that traffic must match when balancing to a server farm. They provide the means
for the CSM to balance Layer 7 traffic. Multiple policies can be assigned to one virtual server, creating
multiple access rules for that virtual server. When configuring policies, you first specify access rules by
URL maps, client-groups, and sticky groups, and then you combine these access rules under a particular
policy.
Note
You must associate policies with one server farm. A policy that does not have an associated server
farm cannot forward traffic. The server farm associated with a policy receives all the requests that
match that policy.
When the CSM is able to match policies, it selects the policy that appears first in the policy list. Policies
are located in the policy list in the sequence in which they were bound to the virtual server. You can
reorder the policies in the list by removing policies and reentering them in the correct order. Enter the
no slb-policy
policy name
and the
slb-policy
policy name
commands in the
ip slb vserver
submode to
remove and enter policies.
Caution
When changing the policies associated with a vserver, you must take out and put back the vserver in
service to reflect the changes.
To configure load-balancing policies, perform this task:
Command
Purpose
Step 1
Router(config)#
ip slb policy
policy-name
Create the policy and enter the policy submode
to configure the policy attributes
1
.
Step 2
Router(config-slb-policy)#
url-map
url-map-name
C
onfigure a list of URLs with a policy
2
. You
must have previously created and configured the
URL maps and cookie maps with the
ip slb map
command. See the
“Configuring Maps” section
on page 27
.
Step 3
Router(config-slb-policy)#
cookie-map
cookie-map-name
Configure a list of cookies with a policy
2
.
Step 4
Router(config-slb-policy)#
sticky-group
group-id
Associate this policy to a specific sticky group
2
.