Configure GSLB for DNS queries with NAPTR records
NAPTR Record Format
| 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
-
Set the following parameters while adding the GSLB virtual server:
-
serviceType: ANY
-
dnsRecordType: NAPTR
-
lbMethod: CUSTOMLOAD
-
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.
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
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