NetScaler CPX Licensing

Licensing your CPX instance can enhance you NetScaler CPX’s performance. NetScaler CPX supports allocating licenses to NetScaler CPX instances based on the virtual CPU requirements and the bandwidth consumption by the instances.

You can use NetScaler MAS to pool your CPX licenses and use it as a licensing server. You can install licenses in MAS using the GUI by uploading the license file or using the License Access Code (LAC) that you have purchased from Citrix. To allocate licenses to your CPX instances, you can use Configuration Jobs or CPX’s Nitro. If you are provisioning the NetScaler CPX with multiple vCPU cores, then each core is allocated with a CPX licence from the license pool. For example, if you have provisioned the NetScaler CPX with 4 vCPU cores then 4 licenses are allocated to the NetScaler CPX instance.

To install CPX license files on NetScaler MAS:

  1. In a web browser, type the IP address of the NetScaler Management and Analytics System (for example,http://192.168.100.1).

  2. In User Name and Password, enter the administrator credentials.

  3. Navigate to Networks > Licenses.

  4. In the details pane, go to License Files, and select one of the following options:

  • Upload license files from a local computer - If a license is already present on your local computer, click Browse and select the license file (.lic) that you want to use to allocate your licenses. Click Finish.
  • Use License Activation Code - Citrix emails the LAC for the license that you purchased. Enter the LAC in the text box and then click Get Licenses.

Note: If you select this option, the NetScaler Management and Analytics System must be connected to the Internet, or a proxy server must be available.

localized image

  1. Click Browse and select the license file (.lic) that you want to use to allocate your licenses. Click Finish.

At any time you can add more licenses to the NetScaler Management and Analytics System, from the License Settings.

localized image

Verification

You can verify the licenses installed on your NetScaler MAS by navigating to Networks > Licenses > CPX Licenses.

localized image

Licensing a NetScaler CPX Instance by Using MAS Configuration Jobs

You can use NetScaler MAS to license NetScaler CPX instances by configuring jobs.

To allocate licenses on NetScaler CPX by using Jobs:

1. Log on to NetScaler MAS by using the administrative credentials.

2. Navigate to Networks > Configuration Jobs, and then click Create Job.

3. Specify the required values, and select the configuration source, and type the following commands as shown in the image below:

Note:

By default the license server port number in NetScaler MAS is 27000.

localized image

4. Select the NetScaler CPX instance(s) on which you want to run the configuration and click Next.

localized image

5. Specify the execution settings and click Finish to run the commands on the NetScaler CPX instance. If you want to save the configuration and run it at a later time, click Save and Exit.

localized image

To remove licenses on NetScaler CPX by using Jobs:

1. Log on to NetScaler MAS by using the administrative credentials.

2. Navigate to Networks > Configuration Jobs, and then click Create Job.

3. Specify the required values, and select the configuration source, and type the following commands as shown in the image below:

localized image

4. Select the NetScaler CPX instance(s) on which you want to run the configuration and click Next.

localized image

5. Specify the execution settings and click Finish to run the commands on the NetScaler CPX instance. If you want to save the configuration and run it at a later time, click Save and Exit.

Licensing a NetScaler CPX Instance by Using the Nitro API

You can use the NetScaler Nitro API to license NetScaler CPX instances.

To add license server to a NetScaler CPX instances:

1. Go to http://\<netscaler-ip-address\>/nitro/v1/config/nslicenseserver.

2. Set the HTTP method as POST.

3. Add the Request Headers:

    Cookie:NITRO_AUTH_TOKEN=<tokenvalue>
    Content-Type:application/json

4. Enter the Request Payload:

    {"nslicenseserver":{"licenseserverip":<String_value>,"servername":<String_value>,"port":<Double_value>}}

5. You can view the following Response:

     HTTP Status Code on Success: 201 Created

     HTTP Status Code on Failure: 4xx \<string\> (for general HTTP errors) or 5xx \<string\> (for NetScaler-specific errors). The response payload provides details of the error

To set capacity on a NetScaler CPX instances:

1. Go to http://\<netscaler-ip-address\>/nitro/v1/config/nscapacity.

2. Set the HTTP method as PUT.

3. Add the Request Headers as following:

    Cookie:NITRO_AUTH_TOKEN=<tokenvalue>
    Content-Type:application/json

4. Enter the Request Payload as following:

    {"nscapacity":{

          "platform":<String_value>

    }}

5. You can view the following Response:

     HTTP Status Code on Success: 200 OK

     HTTP Status Code on Failure: 4xx \<string\> (for general HTTP errors) or 5xx \<string\> (for NetScaler-specific errors). The response payload provides details of the error

For more information about licensing a NetScaler CPX Instance, you can download the NITRO API Documentation available on the NetScaler appliance Downloads section.

Licensing NetScaler CPX using environment variables

Also, you can license your NetScaler CPX instance using environment variables and cli_script. The following environment variables are used for licensing Citric ADC CPX:

  • LS_IP=License-Server-IP-or-FQDN
  • BANDWIDTH=BANDWIDTH-IN-MBPS [optional]
  • LS_PORT=license-server-port [optional]

NetScaler CPX requires LS_IP to license itself automatically while booting up.

The LS_IP environment variable is required for CPX to license itself automatically while booting up. If only the environment LS_IP is set to either IP or FQDN of license server, then the vCPU capacity equal to value of CPX_CORES is checked out of the license server. If the BANDWIDTH environment variable is also set, then the bandwidth capacity is checked out of the license server.

Example,

docker run -dt -P --privileged=true –net=host –e NS_NETMODE=”HOST” -e CPX_CORES=<number of cores> --name <container_name> --ulimit core=-1 -e CPX_NW_DEV='<INTERFACES>' -e CPX_CONFIG=’{“YIELD”:”NO”}’ -e LS_IP=<local-license-server.abc.com> -e LS_PORT=<27000> -e BANDWIDTH=<2500> -v <host_dir>:/cpx <REPOSITORY>:<TAG>

In this example, NetScaler CPX checks out 1500 Mbps capacity from bandwidth pool and one capacity from instance pool from license server hosted at local-license-server.abc.com.

Licensing NetScaler CPX using cli_script

You can also use the following cli_script for licensing NetScaler CPX:

  • cli_script.sh “add license server local-license-server.abc.com”
  • cli_script.sh “set capacity -bandwidth 2500 -unit Mbps -edition platinum”
    or
  • cli_script.sh “set capacity -vcpu -edition platinum”

Bandwidth based licensing

NetScaler CPX licenses can be allocated based on the bandwidth consumption by the instances. A NetScaler CPX is restricted to use a specific bandwidth and other performance metrics based on the license edition that it is bound to. To increase the bandwidth, you must upgrade to a license edition that provides more bandwidth.

You can use pooled licensing to maximize the bandwidth utilization by ensuring the necessary bandwidth allocation to an instance and not more than its requirement. Increase or decrease the bandwidth allocated to an instance at run time without affecting the traffic. With the pooled capacity licenses, you can automate the instance provisioning.

Standalone NetScaler CPX instances

NetScaler CPX instances deployed on a Docker host support pooled-capacity. Unlike zero-capacity hardware, NetScaler CPX does not require a platform license. A single CPX instance consuming up to 1 Gbps throughput checks-out only 1 instance and no bandwidth from the license pool. For example, consider that you have 20 CPX instances with 20 Gbps bandwidth pool. If one of the CPX instances consumes 500 Mbps throughput, the bandwidth pool remains 20 Gbps for the remaining 19 CPX instances.

If the same CPX instance starts to consume 1500 Mbps throughput, the bandwidth pool has 19.5 Gbps for the remaining 19 CPX instances.

For pool licensing, you can add more bandwidth only in multiples of 10 Mbps.

NetScaler CPX Licensing