ADC

Managing a Content Switching Setup

After a content switching setup is configured, it may require periodic changes. When operating systems or software are updated, or hardware wears out and is replaced, you may need to take down your setup. Load on your setup may increase, requiring additional resources. You may also modify the configuration to improve performance.

这些任务可能需要从th无约束力的政策e content switching virtual server, or disabling or removing content switching virtual servers. After you have made changes to your setup, you may need to re-enable servers and rebind policies. You might also want to rename your virtual servers.

Unbinding Policies from the Content Switching Virtual Server

When you unbind a content switching policy from its virtual server, the virtual server no longer includes that policy when determining where to direct requests.

To unbind a policy from a content switching virtual server by using the command line interface

At the command prompt, type:

unbind cs vserver -policyname

Example:

unbind cs vserver Vserver-CS-1 -policyname Policy-CS-1

To unbind a policy from a content switching virtual server by using the configuration utility

  1. Navigate toTraffic Management > Content Switching > Virtual Servers, and open the virtual server.
  2. ClickPoliciessection, select the policy, and clickUnbind.

Removing Content Switching Virtual Servers

You normally remove a content switching virtual server only when you no longer require the virtual server. When you remove a content switching virtual server, the Citrix ADC appliance first unbinds all policies from the content switching virtual server, and then removes it.

To remove a content switching virtual server by using the command line interface

At the command prompt, type:

rm cs vserver

Example:

rm cs vserver Vserver-CS-1

To remove a content switching virtual server by using the configuration utility

Navigate toTraffic Management > Content Switching > Virtual Servers, select a virtual server, and click删除.

Disabling and Re-Enabling Content Switching Virtual Servers

Content switching virtual servers are enabled by default when you create them. You can disable a content switching virtual server for maintenance. If you disable the content switching virtual server, the state of the content switching virtual server changes to Out of Service. While out of service, the content switching virtual server does not respond to requests.

To disable or re-enable a virtual server by using the command line interface

At the command prompt, type one of the following commands:

  • disable cs vserver
  • enable cs vserver

Example:

`disable cs vserver Vserver-CS-1 `enable cs vserver Vserver-CS-1`

To disable or re-enable a virtual server by using the configuration utility

Navigate toTraffic Management > Content Switching > Virtual Servers, select a virtual server and, in theActionlist, selectEnableorDisable.

Renaming Content Switching Virtual Servers

You can rename a content switching virtual server without unbinding it. The new name is propagated automatically to all affected parts of the Citrix ADC configuration.

To rename a virtual server by using the command line interface

At the command prompt, type:

rename cs vserver

Example:

`rename cs vserver Vserver-CS-1 Vserver-CS-2`

To rename a virtual server by using the configuration utility

Navigate toTraffic Management > Content Switching > Virtual Servers, select a virtual server and, in theActionlist, selectRename.

Managing Content Switching Policies

You can modify an existing policy by configuring rules or changing the URL of the policy, or you can remove a policy. You can also rename an existing advanced content switching policy. You can create different policies based on the URL. URL-based policies can be of different types, as described in the following table.

For more information, see例子of URL-Based Policiespdf.

Note

You can configure rule-based content switching using classical policy expressions or advanced policy expressions.

To modify, remove, or rename a policy by using the command line interface

At the command prompt, type one of the following commands:

  • set cs policy [-domain ] [-rule ] [-url ]
  • rm cs policy
  • rename cs policy

Example:

set cs policy Policy-CS-1 -domain "www.domainxyz.com" set cs policy Policy-CS-1 -rule "CLIENT.IP.SRC.SUBNET(22).EQ(10.100.148.0)" set cs policy Policy-CS-2 -rule "SYS.TIME.BETWEEN(GMT 2010 Jun,GMT 2010 Jul)" set cs policy Policy-CS-1 -url /sports/* rename cs policy Policy-CS-1 Policy-CS-11 rm cs policy Policy-CS-1

To modify, remove, or rename a policy by using the configuration utility

  1. Navigate toTraffic Management > Content Switching > Policies.
  2. Select the policy, and either delete it, edit it or, in theActionlist, clickRename.
Managing a Content Switching Setup