ADC CLI Commands

lb-policy

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

set stat show rename rm add unset

set lb policy

Modifies the specified parameters of the LB policy.

Synopsis

set lb policy [-rule ] [-action ] [-undefAction ] [-logAction ] [-comment ]

Arguments

name Name of the LB policy. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Can be changed after the LB policy is added. The following requirement applies only to the Citrix ADC CLI: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, “my lb policy” or ‘my lb policy’).

rule Expression against which traffic is evaluated.

action Name of action to use if the request matches this LB policy.

undefAction Action to perform if the result of policy evaluation is undefined (UNDEF). An UNDEF event indicates an internal error condition. Available settings function as follows:

  • NOLBACTION - Does not consider LB actions in making LB decision.
  • RESET - Reset the request and notify the user, so that the user can resend the request.
  • DROP - Drop the request without sending a response to the user.

logAction Name of the messagelog action to use for requests that match this policy.

comment Any type of information about this LB policy.

Example

set lb policy lbpol1 -rule CLIENT.IP.SRC.EQ(102.10.20.2)

stat lb policy

Displays statistics for all the LB policies currently configured on the Citrix ADC, or detailed statistics for the specified policy.

Synopsis

stat lb policy [] \[-detail] \[-fullValues] \[-ntimes <positive\_integer>] \[-logFile <input\_filename>] \[-clearstats \( basic | full )]

Arguments

name Name of the LB policy for which to show detailed statistics.

detail Specifies detailed output (including more statistics). The output can be quite voluminous. Without this argument, the output will show only a summary.

fullValues Specifies that numbers and strings should be displayed in their full form. Without this option, long strings are shortened and large numbers are abbreviated

ntimes The number of times, in intervals of seven seconds, the statistics should be displayed. Default value: 1 Minimum value: 0

logFile The name of the log file to be used as input.

clearstats Clear the statsistics / counters

Possible values: basic, full

Output

count devno stateflag

Counters

Policy hits (Hits) Number of hits on the policy

Policy undef hits (Undefhits) Number of undef hits on the policy

show lb policy

Displays the current settings for the specified LB policy.’, If no policy name is specified, displays a list of all LB policies currently configured on the Citrix ADC, with abbreviated settings.

Synopsis

show lb policy [] show lb policy stats - alias for 'stat lb policy'

Arguments

name Name of the LB policy. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Can be changed after the LB policy is added. The following requirement applies only to the Citrix ADC CLI: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, “my lb policy” or ‘my lb policy’).

Output

stateflag rule Expression against which traffic is evaluated.

action Name of action to use if the request matches this LB policy.

undefAction Action to perform if the result of policy evaluation is undefined (UNDEF). An UNDEF event indicates an internal error condition. Available settings function as follows:

  • NOLBACTION - Does not consider LB actions in making LB decision.
  • RESET - Reset the request and notify the user, so that the user can resend the request.
  • DROP - Drop the request without sending a response to the user.

hits Number of hits.

undefHits Number of policy UNDEF hits.

activePolicy Indicates whether policy is bound or not.

boundTo Location where policy is bound

priority Specifies the priority of the policy.

comment Any type of information about this LB policy.

bindPolicyType vserverType gotoPriorityExpression Expression specifying the priority of the next policy which will get evaluated if the current policy rule evaluates to TRUE.

labelType Type of policy label invocation.

labelName Name of the label to invoke if the current policy rule evaluates to TRUE.

feature The feature to be checked while applying this config

builtin Flag to determine if LB policy is built-in or not

type gslbBindings logAction Name of the messagelog action to use for requests that match this policy.

devno count

Example

show lb policy

rename lb policy

Renames the specified LB policy.

Synopsis

rename lb policy @ @

Arguments

name Existing name of the LB policy.

newName New name for the LB policy. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) hash (#), space ( ), at (@), equals (=), colon (:), and underscore characters. The following requirement applies only to the Citrix ADC CLI: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, “my lb policy” or ‘my lb policy’).

Example

rename lb policy lbpol1 lbpol2

rm lb policy

Removes the specified LB policy.

Synopsis

rm lb policy

Arguments

name Name of the LB policy. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Can be changed after the LB policy is added. The following requirement applies only to the Citrix ADC CLI: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, “my lb policy” or ‘my lb policy’).

Example

rm lb policy lbpol1

add lb policy

Creates an LB policy which specifies requests for which LB decision is taken based on order sequence specified in corresponding LB action

Synopsis

add lb policy -rule -action [-undefAction ] [-logAction ] [-comment ]

Arguments

name Name of the LB policy. Must begin with a letter, number, or the underscore character (_), and must contain only letters, numbers, and the hyphen (-), period (.) pound (#), space ( ), at (@), equals (=), colon (:), and underscore characters. Can be changed after the LB policy is added. The following requirement applies only to the Citrix ADC CLI: If the name includes one or more spaces, enclose the name in double or single quotation marks (for example, “my lb policy” or ‘my lb policy’).

rule Expression against which traffic is evaluated.

action Name of action to use if the request matches this LB policy.

undefAction Action to perform if the result of policy evaluation is undefined (UNDEF). An UNDEF event indicates an internal error condition. Available settings function as follows:

  • NOLBACTION - Does not consider LB actions in making LB decision.
  • RESET - Reset the request and notify the user, so that the user can resend the request.
  • DROP - Drop the request without sending a response to the user.

logAction Name of the messagelog action to use for requests that match this policy.

comment Any type of information about this LB policy.

Example

add lb policy lbpol1 -rule CLIENT.IP.SRC.EQ(102.10.20.1) -action lbact1

unset lb policy

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

Synopsis

unset lb policy [-undefAction] [-logAction] [-comment]

lb-policy