ADC CLI Commands

lb-parameter

The following operations can be performed on “lb-parameter”:

unset set show

unset lb parameter

Use this command to remove lb parameter settings.Refer to the set lb parameter command for meanings of the arguments.

Synopsis

unset lb parameter [-httpOnlyCookieFlag] [-useEncryptedPersistenceCookie] [-cookiePassphrase] [-consolidatedLConn] [-usePortForHashLb] [-preferDirectRoute] [-startupRRFactor] [-monitorSkipMaxClient] [-monitorConnectionClose] [-vServerSpecificMac] [-AllowBoundSvcRemoval] [-retainservicestate] [-dbsTTL] [-maxPipelineNat] [-LiteralADCCookieAttribute] [-ComputedADCCookieAttribute] [-storeMqttClientidAndUsername] [-dropMqttJumboMessage] [-lbHashAlgorithm] [-lbHashFingers]

set lb parameter

Modifies the specified global load balancing parameters.

Synopsis

set lb parameter [-httpOnlyCookieFlag ( ENABLED DISABLED )] [-useEncryptedPersistenceCookie ( ENABLED DISABLED )] [-cookiePassphrase ] [-consolidatedLConn ( YES NO )] [-usePortForHashLb ( YES NO )] [-preferDirectRoute ( YES NO )] [-startupRRFactor ] [-monitorSkipMaxClient ( ENABLED DISABLED )] [-monitorConnectionClose ( RESET FIN )] [-vServerSpecificMac ( ENABLED DISABLED )] [-AllowBoundSvcRemoval ( ENABLED DISABLED )] [-retainservicestate ( ON OFF )] [-dbsTTL ] [-maxPipelineNat ] [-LiteralADCCookieAttribute -ComputedADCCookieAttribute ] [-storeMqttClientidAndUsername ( YES NO )] [-dropMqttJumboMessage ( YES NO )] [-lbHashAlgorithm ] [-lbHashFingers ]

Arguments

httpOnlyCookieFlag Include the HttpOnly attribute in persistence cookies. The HttpOnly attribute limits the scope of a cookie to HTTP requests and helps mitigate the risk of cross-site scripting attacks.

Possible values: ENABLED, DISABLED Default value: ENABLED

useEncryptedPersistenceCookie Encode persistence cookie values using SHA2 hash.

Possible values: ENABLED, DISABLED Default value: DISABLED

cookiePassphrase Use this parameter to specify the passphrase used to generate secured persistence cookie value. It specifies the passphrase with a maximum of 31 characters.

consolidatedLConn To find the service with the fewest connections, the virtual server uses the consolidated connection statistics from all the packet engines. The NO setting allows consideration of only the number of connections on the packet engine that received the new connection.

Possible values: YES, NO Default value: YES

usePortForHashLb Include the port number of the service when creating a hash for hash based load balancing methods. With the NO setting, only the IP address of the service is considered when creating a hash.

Possible values: YES, NO Default value: YES

preferDirectRoute Perform route lookup for traffic received by the Citrix ADC, and forward the traffic according to configured routes. Do not set this parameter if you want a wildcard virtual server to direct packets received by the appliance to an intermediary device, such as a firewall, even if their destination is directly connected to the appliance. Route lookup is performed after the packets have been processed and returned by the intermediary device.

Possible values: YES, NO Default value: YES

startupRRFactor Number of requests, per service, for which to apply the round robin load balancing method before switching to the configured load balancing method, thus allowing services to ramp up gradually to full load. Until the specified number of requests is distributed, the Citrix ADC is said to be implementing the slow start mode (or startup round robin). Implemented for a virtual server when one of the following is true:

  • The virtual server is newly created.
  • One or more services are newly bound to the virtual server.
  • One or more services bound to the virtual server are enabled.
  • The load balancing method is changed. This parameter applies to all the load balancing virtual servers configured on the Citrix ADC, except for those virtual servers for which the virtual server-level slow start parameters (New Service Startup Request Rate and Increment Interval) are configured. If the global slow start parameter and the slow start parameters for a given virtual server are not set, the appliance implements a default slow start for the virtual server, as follows:
  • For a newly configured virtual server, the appliance implements slow start for the first 100 requests received by the virtual server.
  • For an existing virtual server, if one or more services are newly bound or newly enabled, or if the load balancing method is changed, the appliance dynamically computes the number of requests for which to implement startup round robin. It obtains this number by multiplying the request rate by the number of bound services (it includes services that are marked as DOWN). For example, if the current request rate is 20 requests/s and ten services are bound to the virtual server, the appliance performs startup round robin for 200 requests. Not applicable to a virtual server for which a hash based load balancing method is configured. Minimum value: 0

monitorSkipMaxClient When a monitor initiates a connection to a service, do not check to determine whether the number of connections to the service has reached the limit specified by the service’s Max Clients setting. Enables monitoring to continue even if the service has reached its connection limit.

Possible values: ENABLED, DISABLED Default value: DISABLED

monitorConnectionClose Close monitoring connections by sending the service a connection termination message with the specified bit set.

Possible values: RESET, FIN Default value: FIN

vServerSpecificMac Allow a MAC-mode virtual server to accept traffic returned by an intermediary device, such as a firewall, to which the traffic was previously forwarded by another MAC-mode virtual server. The second virtual server can then distribute that traffic across the destination server farm. Also useful when load balancing Branch Repeater appliances. Note: The second virtual server can also send the traffic to another set of intermediary devices, such as another set of firewalls. If necessary, you can configure multiple MAC-mode virtual servers to pass traffic successively through multiple sets of intermediary devices.

Possible values: ENABLED, DISABLED Default value: DISABLED

AllowBoundSvcRemoval This is used, to enable/disable the option of svc/svcgroup removal, if it is bound to one or more vserver. If it is enabled, the svc/svcgroup can be removed, even if it bound to vservers. If disabled, an error will be thrown, when the user tries to remove a svc/svcgroup without unbinding from its vservers.

Possible values: ENABLED, DISABLED Default value: ENABLED

retainservicestate This option is used to retain the original state of service or servicegroup member when an enable server command is issued.

Possible values: ON, OFF Default value: OFF

dbsTTL Specify the TTL for DNS record for domain based service. The default value of ttl is 0 which indicates to use the TTL received in DNS response for monitors Default value: 0

maxPipelineNat Maximum number of concurrent requests to allow on a single client connection, which is identified by the - tuple. This parameter is applicable to ANY service type and all UDP service types (except DNS) and only when "svrTimeout" is set to zero. A value of 0 (zero) applies no limit to the number of concurrent requests allowed on a single client connection Default value: NSNATPCB_MAXPIPELINE Minimum value: 0

LiteralADCCookieAttribute String configured as LiteralADCCookieAttribute will be appended as attribute for Citrix ADC cookie (for example: LB cookie persistence , GSLB site persistence, CS cookie persistence, LB group cookie persistence).

Sample usage - set lb parameter -LiteralADCCookieAttribute “;SameSite=None”

ComputedADCCookieAttribute ComputedADCCookieAttribute accepts ns variable as input in form of string starting with $ (to understand how to configure ns variable, please check man add ns variable). policies can be configured to modify this variable for every transaction and the final value of the variable after policy evaluation will be appended as attribute to Citrix ADC cookie (for example: LB cookie persistence , GSLB sitepersistence, CS cookie persistence, LB group cookie persistence). Only one of ComputedADCCookieAttribute, LiteralADCCookieAttribute can be set.

Sample usage - add ns variable lbvar -type TEXT(100) -scope Transaction add ns assignment lbassign -variable $lbvar -set “\“;SameSite=Strict\”” add rewrite policy lbpol lbassign bind rewrite global lbpol 100 next -type RES_OVERRIDE set lb param -ComputedADCCookieAttribute "$lbvar" For incoming client request, if above policy evaluates TRUE, then SameSite=Strict will be appended to ADC generated cookie

storeMqttClientidAndUsername This option allows to store the MQTT clientid and username in transactional logs

Possible values: YES, NO Default value: NO

dropMqttJumboMessage When this option is enabled, MQTT messages of length greater than 64k will be dropped and the client/server connections will be reset.

Possible values: YES, NO Default value: YES

lbHashAlgorithm This option dictates the hashing algorithm used for hash based LB methods (URLHASH, DOMAINHASH, SOURCEIPHASH, DESTINATIONIPHASH, SRCIPDESTIPHASH, SRCIPSRCPORTHASH, TOKEN, USER_TOKEN, CALLIDHASH).

Possible values: DEFAULT, PRAC, JARH Default value: DEFAULT

lbHashFingers This option is used to specify the number of fingers to be used in PRAC and JARH algorithms for hash based LB methods. Increasing the number of fingers might give better distribution of traffic at the expense of additional memory Default value: 256 Minimum value: 1 Maximum value: 1024

Example

set lb parameter -httponly (ENABLED DISABLED)

show lb parameter

Displays the global load balancing parameters.

Synopsis

show lb parameter

Arguments

Output

httpOnlyCookieFlag Include the HttpOnly attribute in persistence cookies. The HttpOnly attribute limits the scope of a cookie to HTTP requests and helps mitigate the risk of cross-site scripting attacks.

useSecuredPersistenceCookie Encode persistence cookie values using SHA2 hash.

useEncryptedPersistenceCookie Encode persistence cookie values using SHA2 hash.

cookiePassphrase Use this parameter to specify the passphrase used to generate secured persistence cookie value. It specifies the passphrase with a maximum of 31 characters.

consolidatedLConn To find the service with the fewest connections, the virtual server uses the consolidated connection statistics from all the packet engines. The NO setting allows consideration of only the number of connections on the packet engine that received the new connection.

usePortForHashLb Include the port number of the service when creating a hash for hash based load balancing methods. With the NO setting, only the IP address of the service is considered when creating a hash.

preferDirectRoute Perform route lookup for traffic received by the Citrix ADC, and forward the traffic according to configured routes. Do not set this parameter if you want a wildcard virtual server to direct packets received by the appliance to an intermediary device, such as a firewall, even if their destination is directly connected to the appliance. Route lookup is performed after the packets have been processed and returned by the intermediary device.

startupRRFactor Used to change the factor of service hits after which vserver will come out of slowstart phase.

monitorSkipMaxClient When a monitor initiates a connection to a service, do not check to determine whether the number of connections to the service has reached the limit specified by the service’s Max Clients setting. Enables monitoring to continue even if the service has reached its connection limit.

monitorConnectionClose Close monitoring connections by sending the service a connection termination message with the specified bit set.

vServerSpecificMac Allow a MAC-mode virtual server to accept traffic returned by an intermediary device, such as a firewall, to which the traffic was previously forwarded by another MAC-mode virtual server. The second virtual server can then distribute that traffic across the destination server farm. Also useful when load balancing Branch Repeater appliances. Note: The second virtual server can also send the traffic to another set of intermediary devices, such as another set of firewalls. If necessary, you can configure multiple MAC-mode virtual servers to pass traffic successively through multiple sets of intermediary devices.

sessionsThreshold This option is used to get the upper-limit on the number of persistent sessions set by the administrator for this system

builtin feature The feature to be checked while applying this config

AllowBoundSvcRemoval This is used, to enable/disable the option of svc/svcgroup removal, if it is bound to one or more vserver. If it is enabled, the svc/svcgroup can be removed, even if it bound to vservers. If disabled, an error will be thrown, when the user tries to remove a svc/svcgroup without unbinding from its vservers.

retainservicestate This option is used to retain the original state of service or servicegroup member when an enable server command is issued.

dbsTTL Specify the TTL for DNS record for domain based service. The default value of ttl is 0 which indicates to use the TTL received in DNS response for monitors

maxPipelineNat Maximum number of concurrent requests to allow on a single client connection, which is identified by the - tuple. This parameter is applicable to ANY service type and all UDP service types (except DNS) and only when "svrTimeout" is set to zero. A value of 0 (zero) applies no limit to the number of concurrent requests allowed on a single client connection

LiteralADCCookieAttribute String configured as LiteralADCCookieAttribute will be appended as attribute for Citrix ADC cookie (for example: LB cookie persistence , GSLB site persistence, CS cookie persistence, LB group cookie persistence).

Sample usage - set lb parameter -LiteralADCCookieAttribute “;SameSite=None”

ComputedADCCookieAttribute ComputedADCCookieAttribute accepts ns variable as input in form of string starting with $ (to understand how to configure ns variable, please check man add ns variable). policies can be configured to modify this variable for every transaction and the final value of the variable after policy evaluation will be appended as attribute to Citrix ADC cookie (for example: LB cookie persistence , GSLB sitepersistence, CS cookie persistence, LB group cookie persistence). Only one of ComputedADCCookieAttribute, LiteralADCCookieAttribute can be set.

Sample usage - add ns variable lbvar -type TEXT(100) -scope Transaction add ns assignment lbassign -variable $lbvar -set “\“;SameSite=Strict\”” add rewrite policy lbpol lbassign bind rewrite global lbpol 100 next -type RES_OVERRIDE set lb param -ComputedADCCookieAttribute "$lbvar" For incoming client request, if above policy evaluates TRUE, then SameSite=Strict will be appended to ADC generated cookie

ADCCookieAttributeWarningMsg Used to describe any configuration issue with respect to ns variable configured as part of set lb parameter

storeMqttClientidAndUsername This option allows to store the MQTT clientid and username in transactional logs

dropMqttJumboMessage When this option is enabled, MQTT messages of length greater than 64k will be dropped and the client/server connections will be reset.

lbHashAlgoWinSize This options allows to increase window size used in LB hashing algorithm(DEFAULT).

lbHashAlgorithm This option dictates the hashing algorithm used for hash based LB methods (URLHASH, DOMAINHASH, SOURCEIPHASH, DESTINATIONIPHASH, SRCIPDESTIPHASH, SRCIPSRCPORTHASH, TOKEN, USER_TOKEN, CALLIDHASH).

lbHashFingers This option is used to specify the number of fingers to be used in PRAC and JARH algorithms for hash based LB methods. Increasing the number of fingers might give better distribution of traffic at the expense of additional memory

Example

show lb parameter

lb-parameter