ADC

Managing a content switching setup

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

These tasks might require unbinding policies from the content switching virtual server, or disabling or removing content switching virtual servers. After you have changed your setup, you might 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 CLI

At the command prompt, type:

unbind cs vserver <name> -policyname <string>

Example:

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

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

  1. Navigate to Traffic Management > Content Switching > Virtual Servers, and open the virtual server.
  2. Click Policies section, select the policy, and click Unbind.

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 NetScaler 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 CLI

At the command prompt, type:

rm cs vserver <name>

Example:

rm cs vserver Vserver-CS-1

To remove a content switching virtual server by using the GUI

Navigate to Traffic Management > Content Switching > Virtual Servers, select a virtual server, and click Delete.

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 CLI

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

  • disable cs vserver <name>
  • enable cs vserver <name>

Example:

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

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

Navigate to Traffic Management > Content Switching > Virtual Servers, select a virtual server and, in the Action list, select Enable or Disable.

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 NetScaler configuration.

To rename a virtual server by using the CLI

At the command prompt, type:

rename cs vserver <name> <newName>

Example:

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

To rename a virtual server by using the GUI

Navigate to Traffic Management > Content Switching > Virtual Servers, select a virtual server and, in the Action list, select Rename.

Managing content switching policies

You can modify an existing policy by configuring the 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 Examples of URL-Based Policies.

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 CLI

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

  • set cs policy <policyName> [-rule <expression>] [-action <string>] [-logAction <string>]
  • rm cs policy <policyName>
  • rename cs policy <policyName> <newPolicyName>

Example:

set cs policy-CS-1 -domain "www.domainxyz.com"

set cs policy-CS-1 -rule "CLIENT.IP.SRC.SUBNET(22).EQ(10.100.148.0)"

set cs policy-CS-2 -rule "SYS.TIME.BETWEEN(GMT 2010 Jun,GMT 2010 Jul)"

set cs policy-CS-1 -rule http.req.url.startswith ("/sports/")

rename cs policy-CS-1 Policy-CS-11

rm cs policy-CS-1

To modify, remove, or rename a policy by using the GUI

  1. Navigate to Traffic Management > Content Switching > Policies.
  2. Select the policy, and either delete it, edit it or, in the Action list, click Rename.
Managing a content switching setup