Product Documentation

Configuring Global Server Load Balancing for DNS Queries with NAPTR records

Aug 31, 2016

In a typical Global Server Load Balancing (GSLB) deployment, the NetScaler appliance receives DNS queries for A/AAAA records, selects the most appropriate GSLB service according to the configured load balancing method, and returns the service's IP address as a reply to the DNS query. You can now configure the appliance to receive DNS queries for NAPTR records and respond with the list of services configured for a domain. The appliance also monitors the health of the services, and in the response it provides a list of only the services that are up.

Example

In Telco deployments, you can configure a NetScaler appliance to receive DNS queries with NAPTR records from clients such as mobile management entities (MMEs), which play the role of a DNS resolver to discover all the services that are offered by the domain name. The appliance responds to the query with NAPTR records for all the services that are up. The MME can use this NAPTR response to run the S-NAPTR procedure to select the nodes on the basis of the service offered, colocation, topological closeness, and so on.

If multiple nodes qualify for selection, the MME can use the preference field in the NAPTR record from the NetScaler appliance to determine the node.

NAPTR Record Format

While responding to a DNS query with NAPTR record, a NetScaler appliance constructs a response NAPTR record for each GSLB service.

The following table lists the files in the NAPTR record:

Field

Domain

The GSLB domain 

TTL

The amount of time for which the NAPTR record can be cached.

Class

The class of the record. By default, this value is set to IN.

Type

The DNS record type. 

Order

Specifies the order in which the NAPTR record MUST be processed. You can specify the order in the GSLB service. Otherwise, it is set to 1.

Preference

Specifies the order in which NAPTR records with equal "order" values SHOULD be processed, low numbers being processed before high numbers. If the order is not specified in the GSLB service, it is set to 1.

Flags

Controls the aspects of the rewriting and interpretation of the fields in the record. The NetScaler appliance sets this value to A. 

Service

Specifies the available service(s).

Regular Expression

Regular expressions are not supported, so this value is set to NULL.

Replacement

The domain name of the node that hosts the services.

Configuration Procedure

For detailed GSLB configuration instructions, see Configuring Global Server Load Balancing (GSLB). Make sure that you do the following:

  • Set the following parameters while adding the GSLB virtual server:
    • serviceType: ANY
    • dnsRecordType: NAPTR
    • lbMethod: CUSTOMLOAD

Example
add gslb vserver gslb_vs ANY -dnsRecordType NAPTR -lbMethod CUSTOMLOAD

  • While adding a GSLB site, set the naptrReplacementSuffix parameter to the domain name that you want to embed in the NAPTR records.

Example
add gslb site site1 10.102.218.200  -naptrReplacementSuffix example.com

  • Set the following parameters while adding the GSLB service:
    • naptrreplacement 
    • naptrOrder 
    • naptrServices 
    • naptrDomainTTL 
    • naptrPreference 

Sample Configuration

Example 복사

>add gslb vserver gslb_vs ANY -dnsRecordType NAPTR -lbMethod CUSTOMLOAD
Done
>add gslb site site1 10.102.218.200 -naptrReplacementSuffix example.com
Done
>add gslb service sgw1 3.3.3.13 ANY * -siteName site1 -naptrreplacement sgw1.site1. -naptrOrder 2 -naptrServices x-3gpp-sgw:x-s5-gtp -naptrDomainTTL 20 -naptrPreference 200
Done
>add gslb service sgw2 3.3.3.11 ANY * -siteName site1 -naptrreplacement sgw2.site1. -naptrOrder 5 -naptrServices x-3gpp-sgw:x-s5-gtp -naptrDomainTTL 20 naptrPreference 100
Done
>add gslb service sgw3 3.3.3.12 ANY * -siteName site2 -naptrreplacement sgw3.site1. -naptrOrder 10 -naptrServices x-3gpp-sgw:x-s5-gtp -naptrDomainTTL 20 naptrPreference 300
>bind gslb vserver gslb_vs -serviceName sgw1
Done
>bind gslb vserver gslb_vs -serviceName sgw2
Done
>bind gslb vserver gslb_vs -serviceName sgw3
Done
>bind gslb service sgw1 -monitorName ping
Done
>bind gslb service sgw2 -monitorName ping
Done
>bind gslb service sgw3 -monitorName ping
Done
>bind gslb vserver gslb_vs -domainName gslb.com -TTL 5
Done