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
To configure an HTTP or SSL content switching virtual server to listen on multiple ports by using the configuration utility
-
Navigate to Traffic Management > Content Switching > Virtual Servers, and create a virtual server of type HTTP or SSL.
-
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>]
Example:
add cs vserver Vserver-CS-vlan1 ANY * *
-listenpolicy "CLIENT.VLAN.ID.EQ(2)" -listenpriority 10
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 >
To set the Microsoft SQL Server version parameter by using the configuration utility
-
Navigate to Traffic Management > Content Switching > Virtual Servers, configure a virtual server, and specify the protocol as MSSQL.
-
In Advanced Settings, specify the Server Version.
Enable external TCP health check for UDP 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. To monitor the health of the UDP application, public clouds recommend adding a TCP-based endpoint to your service. The endpoint reflects the health of the UDP application.
The NetScaler appliance supports the external TCP-based health check for a UDP virtual server. This feature introduces a TCP listener on the VIP of the content switching virtual server and the configured port. The TCP listener reflects the status of the virtual server.
To enable external TCP health check for UDP 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> -tcpProbePort <tcpProbePort>
Example:
add cs vserver Vserver-CS-1 UDP 10.102.29.161 5002 -tcpProbePort 5000
To enable external TCP health check for UDP virtual servers by using GUI
-
Navigate to Traffic Management > Content Switching > Virtual Servers, and then create a virtual server.
-
Click Add to create a virtual server.
-
In the Basic Settings pane, add the port number in the TCP Probe Port field.
-
Click OK.