Manage client connections
Enable delayed cleanup of virtual server connections
To enable delayed cleanup of virtual server connections by using the command line interface
set gslb service <name> -downStateFlush (ENABLED | DISABLED)
show gslb service <name>
set gslb service Service-GSLB-1 -downStateFlush ENABLED
Done
show gslb service Service-GSLB-1
Done
To enable delayed cleanup of virtual server connections by using the configuration utility
-
Navigate to Traffic Management > GSLB > Services and double-click the service.
-
Click the Other Settings section and select the Down State Flush option.
Manage local DNS traffic by using DNS policies
DNS expressions
-
CLIENT.UDP.DNS.DOMAIN.EQ(“domainname”)
-
CLIENT.UDP.DNS.IS_AREC
-
CLIENT.UDP.DNS.IS_AAAAREC
-
CLIENT.UDP.DNS.IS_SRVREC
-
CLIENT.UDP.DNS.IS_MXREC
-
CLIENT.UDP.DNS.IS_SOAREC
-
CLIENT.UDP.DNS.IS_PTRREC
-
CLIENT.UDP.DNS.IS_CNAME
-
CLIENT.UDP.DNS.IS_NSREC
-
CLIENT.UDP.DNS.IS_ANYREC
To create an expression by using the configuration utility
-
Click the icon next to the Expression text box. Click Add. (Leave the Flow Type and Protocol drop-down list boxes empty.) Follow these steps to create a rule.
-
In the Qualifier box, select a qualifier (for example, LOCATION).
-
In the Operator box, select an operator (for example, ==).
-
In the Value box, type a value (for example, Asia, Japan....).
-
Click OK. Click Create and click Close. The rule is created.
-
Click OK.
Configure DNS actions
-
Send the client an IP address for which you have configured a DNS view. For more information about DNS views, see Adding DNS Views.
-
Send the client the IP address of a GSLB service after referring to a list of preferred locations that overrides static proximity behavior. For more information about preferred locations, see Overriding Static Proximity Behavior by Configuring Preferred Locations.
-
Send the client a specific IP address as determined by the evaluation of the DNS query or response (DNS response rewrite).
-
Forward a request to the name server without performing a lookup in the appliance's DNS cache.
-
Drop a request.
To configure a DNS action by using the command line interface
add dns action <actionName> <actionType> (-IPAddress <ip_addr | ipv6_addr> ... | -viewName <string> | -preferredLocList <string> ...) [-TTL <secs>]
show dns action [<actionName>]
Examples
add dns action dns_act_response_rewrite Rewrite_Response -IPAddress 192.0.2.20 192.0.2.56 198.51.100.10
Done
show dns action dns_act_response_rewrite
1) ActionName: dns_act_response_rewrite ActionType: Rewrite_Response TTL: 3600 IPAddress: 192.0.2.20 192.0.2.56 198.51.100.10
Done
add dns action send_ip_from_view_internal_ip ViewName -viewName view_internal_ip
Done
show dns action send_ip_from_view_internal_ip
1) ActionName: send_ip_from_view_internal_ip ActionType: ViewName ViewName: view_internal_ip
Done
add dns action send_preferred_location GslbPrefLoc -preferredLocList NA.tx.ns1.*.*.* NA.tx.ns2.*.*.* NA.tx.ns3.*.*.*
Done
show dns action send_preferred_location
1) ActionName: send_preferred_location ActionType: GslbPrefLoc PreferredLocList: "NA.tx.ns1.*.*.*" "NA.tx.ns2.*.*.*" "NA.tx.ns3.*.*.*"
Done
To configure a DNS action by using the NetScaler configuration utility
-
Navigate to Traffic Management > DNS > Actions, create or edit a DNS action.
-
In the Create DNS Action or Configure DNS Action dialog box, set the following parameters:
-
Action Name (cannot be changed for an existing DNS action)
-
Type (cannot be changed for an existing DNS action) To set the Type parameter, do one of the following:
-
To create a DNS action that is associated with a DNS view, select View Name. Then, from the View Name list, select the DNS view that you want to use in the action.
-
To create a DNS action with a preferred location list, select Preferred Location List. In Preferred Location, enter a location, and then click Add. Add as many DNS locations as you want.
-
To configure a DNS action for rewriting a DNS response on the basis of policy evaluation, select Rewrite Response. In IP Address, enter an IP address, and then click Add. Add as many IP addresses as you want.
-
-
TTL (applicable only to the Rewrite Response action type)
-
Configure DNS policies
-
When a DNS query comes from an LDNS, the characteristics of the LDNS are evaluated against the configured policies. If they match, an appropriate action (site affinity) is executed. If the LDNS characteristics match more than one site, the request is load balanced between the sites that match the LDNS characteristics.
-
If the entry is not found in the custom database, the static IP address database is queried for an entry, and if there is a match, the above policy evaluation is repeated.
-
If the entry is not found in either the custom or static databases, the best site is selected and sent in the DNS response on the basis of the configured load balancing method.
-
A maximum of 64 policies are supported.
-
DNS policies are global to the NetScaler appliance and cannot be applied to a specific virtual server or domain.
-
Domain or virtual server specific binding of policy is not supported.
-
A
-
AAAA
-
NS
-
SRV
-
PTR
-
CNAME
-
SOA
-
MX
-
ANY
-
NOERROR - No error
-
FORMERR - Format error
-
SERVFAIL - Server failure
-
NXDOMAIN - Non-existent domain
-
NOTIMP - Query type not implemented
-
REFUSED - Query refused
To add a DNS policy by using the command line interface
add dns policy <name> <rule> <actionName>
show dns policy <name>
> add dns policy-GSLB-1 'CLIENT.UDP.DNS.DOMAIN.EQ("domainname")' my_dns_action
Done
> show dns policy-GSLB-1
Name: policy-GSLB-1
Rule: CLIENT.UDP.DNS.DOMAIN.EQ("domainname")
Action Name: my_dns_action
Hits: 0
Undef Hits: 0
Done
To remove a configured DNS policy by using the command line interface
rm dns policy <name>
To configure a DNS policy by using the NetScaler configuration utility
-
Navigate to Traffic Management > DNS > Policies and create a DNS policy.
-
In the Create DNS Policy or Configure DNS Policy dialog box, set the following parameters:
-
Policy Name (cannot be changed for an existing policy)
-
Action
-
Expression To specify an expression, do the following:
-
Click Add, and then, in the drop-down box that appears, select the expression element with which you want to begin the expression. A second list appears. The list contains a set of expression elements that you can use immediately after the firs expression element.
-
In the second list, select the expression element that you want, and then enter a period.
-
After each selection, if you enter a period, the next set of valid expression elements appear in a list. Select expression elements and fill in arguments to functions until you have the expression you want.
-
-
-
Click Create or OK, and then click Close.
Bind DNS policies
To bind a DNS policy globally by using the command line interface
bind dns global <policyName> <priority> [-gotoPriorityExpression <string>] [-type <type>]
show dns global -type <type>
bind dns global policy-GSLB-1 10 -gotoPriorityExpression END
Done
show dns global -type REQ_DEFAULT
1) Policy Name: policy-GSLB-1
Priority: 10
GotoPriorityExpression: END
Done
To bind a DNS policy globally by using the configuration utility
-
Navigate to Traffic Management > DNS > Policies.
-
In the details pane, click Global Bindings.
-
In the Bind/Unbind DNS Policy(s) to Global dialog box, click Insert Policy.
-
In the Policy Name column, select, from the list, the policy that you want to bind. Alternatively, in the list, click New Policy, and then create a DNS policy by setting parameters in the Create DNS Policy dialog box.
-
To modify a policy that is already bound globally, click the name of the policy, and then click Modify Policy. Then, in the Configure DNS Policy dialog box, modify the policy, and then click OK.
-
To unbind a policy, click the name of the policy, and then click Unbind Policy.
-
To modify the priority assigned to a policy, double-click the priority value, and then enter a new value.
-
To regenerate assigned priorities, click Regenerate Priorities. The priority values are modified to begin at 100, with increments of 10, without affecting the order of evaluation.
-
Click OK.
To view the global bindings of a DNS policy by using the command line interface
show dns global
To view the global bindings of a DNS policy by using the configuration utility
-
Navigate to Traffic Management > DNS > Policies.
-
In the details pane, click Global Bindings. The global bindings of all DNS policies appear in this dialog box.
Adding DNS Views
To add a DNS view by using the command line interface
add dns view <viewName>
show dns view <viewName>
add dns view PrivateSubnet
show dns view PrivateSubnet
To remove a DNS view by using the command line interface
rm dns view <viewName>