ADC

Customizing the basic content switching configuration

After you configure a basic content switching setup, you might need to customize it to meet your requirements. You can configure HTTP and SSL content switching virtual servers to listen on multiple ports instead of creating separate virtual servers. If you want to configure content switching for a specific virtual LAN, you can configure a content switching virtual server with a listen policy.

Support for Multiple Ports for HTTP and SSL Type Content Switching Virtual Servers

You can configure the NetScaler so that HTTP and SSL content switching virtual servers listen on multiple ports, without having to configure separate virtual servers. This feature is especially useful if you want to base a content switching decision on a part of the URL and other L7 parameters. Instead of configuring multiple virtual servers with the same IP address and different ports, you can configure one IP address and specify the port as *. As a result, the configuration size is also reduced.

To configure an HTTP or SSL content switching virtual server to listen on multiple ports by using the command line

At the command prompt, type:

add cs vserver <name> <serviceType> <IPAddress> Port *

Example

> add cs vserver cs1 HTTP 10.102.92.215 *
 Done
> sh cs vserver cs1
        cs1 (10.102.92.215:*) - HTTP    Type: CONTENT
        State: UP
        Last state change was at Tue May 20 01:15:49 2014
        Time since last state change: 0 days, 00:00:03.270
        Client Idle Timeout: 180 sec
        Down state flush: ENABLED
        Disable Primary Vserver On Down : DISABLED
        Appflow logging: ENABLED
        Port Rewrite : DISABLED
        State Update: DISABLED
        Default:        Content Precedence: RULE
        Vserver IP and Port insertion: OFF
        L2Conn: OFF     Case Sensitivity: ON
        Authentication: OFF
        401 Based Authentication: OFF
        Push: DISABLED  Push VServer:
        Push Label Rule: none
        IcmpResponse: PASSIVE
        RHIstate:  PASSIVE
        TD: 0
 Done
<!--NeedCopy-->

To configure an HTTP or SSL content switching virtual server to listen on multiple ports by using the configuration utility

  1. Navigate to Traffic Management > Content Switching > Virtual Servers, and create a virtual server of type HTTP or SSL.
  2. Use an asterisk (*) to specify the port.

Configuring per-VLAN Wildcard Virtual Servers

If you want to configure content switching for traffic on a specific VLAN, you can create a wildcard virtual server with a listen policy that restricts it to processing traffic only on the specified VLAN.

To configure a wildcard virtual server that listens to a specific VLAN by using the command line interface

At the command prompt, type:

add cs vserver <name> <serviceType> IPAddress `* Port *` -listenpolicy <expression> [-listenpriority <positive_integer>]
<!--NeedCopy-->

Example:

add cs vserver Vserver-CS-vlan1 ANY * *
-listenpolicy "CLIENT.VLAN.ID.EQ(2)"  -listenpriority 10
<!--NeedCopy-->

To configure a wildcard virtual server that listens to a specific VLAN by using the configuration utility

Navigate to Traffic Management > Content Switching > Virtual Servers, and configure a virtual server. Specify a listen policy that restricts it to processing traffic only on the specified VLAN.

After you have created this virtual server, you bind it to one or more services as described in Setup basic load balancing.

Configuring the Microsoft SQL Server Version Setting

You can specify the version of Microsoft® SQL Server® for a content switching virtual server that is of type MSSQL. The version setting is recommended if you expect some clients to not be running the same version as your Microsoft SQL Server product. The version setting provides compatibility between the client-side and server-side connections by ensuring that all communication conforms to the server’s version.

To set the Microsoft SQL Server version parameter by using the command line interface

At the command prompt, type the following commands to set the Microsoft SQL Server version parameter for a content switching virtual server and verify the configuration:

  • set cs vserver <name> -mssqlServerVersion <mssqlServerVersion>
  • show cs vserver <name>

Example

> set cs vserver myMSSQLcsvip -mssqlServerVersion 2008R2 Done > show cs vserver myMSSQLcsvip myMSSQLcsvip (192.0.2.13:1433) - MSSQL Type: CONTENT State: UP . . . . . . MSsql Server Version: 2008R2 . . . . . . Done >
<!--NeedCopy-->

To set the Microsoft SQL Server version parameter by using the configuration utility

  1. Navigate to Traffic Management > Content Switching > Virtual Servers, configure a virtual server, and specify the protocol as MSSQL.
  2. In Advanced Settings, specify the Server Version.

Enable external health check for UDP and non-HTTP TCP virtual servers

In public clouds, you can use the NetScaler appliance as a second-tier load balancer when the native load balancer is used as a first tier. The native load balancer can be an application load balancer (ALB) or a network load balancer (NLB). Most of the public clouds do not support UDP health probes in their native load balancers. Hence, if these servers are down their actual status might not be updated. As a result, traffic is sent unconditionally to NetScaler, even if the request cannot be serviced. To monitor the health of such applications, NetScaler supports HTTP and TCP health checks.

An HTTP or TCP listener is created for a content switching virtual server when both the probeProtocol and probePort parameters are configured. The listener reflects the status of the virtual server. The ProbeSuccessResponseCode` parameter applies only to HTTP and returns the configured string when the probe is successful.

To enable external health check for UDP and non-HTTP TCP virtual servers by using CLI

At the command prompt, type the following command to enable an external TCP health check with the tcpProbePort option:

add cs vserver <name> <protocol> <IPAddress> <port> -ProbeProtocol <Http/TCP> -ProbePort <port-num> -ProbeSuccessResponseCode<http-code>
<!--NeedCopy-->

Example:

add cs vserver Vserver-CS-1 HTTP 10.102.29.161 5002 -ProbeProtocol HTTP -probeport 5000 -probesuccessResponseCode 200OK
<!--NeedCopy-->

To enable external health check for UDP and non-HTTP TCP virtual servers by using GUI

  1. Navigate to Traffic Management > Content Switching > Virtual Servers, and then create a virtual server.
  2. Click Add to create a virtual server.
  3. In the Basic Settings pane, update the following details:
    1. Probe Protocol –Select the protocol (HTTP or TCP) of the probe for an external health check of the virtual server.
    2. Probe Success Response Code –Enter the response string for a successful probe. This parameter is applicable only for the HTTP protocol.
      • Default Value: 200ok
      • Maximum Length: 63
    3. Probe Port –Enter the port number for HTTP or TCP monitoring.
  4. Click OK.
Customizing the basic content switching configuration