How to Configure NetScaler DNS Load Balancing with Different Next Hop DNS Based on IP Address

How to Configure NetScaler DNS Load Balancing with Different Next Hop DNS Based on IP Address

book

Article ID: CTX207198

calendar_today

Updated On:

Description

This article describes how to configure NetScaler DNS load balancing with different next hop DNS based on IP address.


Instructions

Complete the following steps to configure NetScaler DNS load balancing with different next hop DNS based on IP address:

1. Enable content switching and load balancing:
enable ns feature CS LB

2. Configure load balancing virtual server and bind to corresponding DNS servers(192.168.0.254 and 10.151.22.5 in lab):
add server 192.168.0.254 192.168.0.254 add server 10.151.22.5 10.151.22.5
add service dns_srv1 192.168.0.254 DNS 53 -gslb NONE -maxClient 0 -maxReq 0 -cip DISABLED -usip NO -useproxyport NO -sp OFF -cltTimeout 120 -svrTimeout 120 -CKA NO -TCPB NO -CMP NO
add service dns_srv2 10.151.22.5 DNS 53 -gslb NONE -maxClient 0 -maxReq 0 -cip DISABLED -usip NO -useproxyport NO -sp OFF -cltTimeout 120 -svrTimeout 120 -CKA NO -TCPB NO -CMP NO
add lb vserver dns_vs_1 DNS 0.0.0.0 0 -persistenceType NONE -Listenpolicy None -cltTimeout 120
add lb vserver dns_vs_2 DNS 0.0.0.0 0 -persistenceType NONE -Listenpolicy None -cltTimeout 120
bind lb vserver dns_vs_1 dns_srv1
bind lb vserver dns_vs_2 dns_srv2

3. Configure content switching virtual server and load balancing virtual server with the policy according to client IP.
For example, when client IP is 10.158.2.99, use 192.168.0.254 as DNS server; when client IP is 10.158.3.245, use 10.151.22.5 as DNS server:
add cs vserver dns_cs DNS 10.158.151.173 53 -cltTimeout 120 -Listenpolicy None
add cs action cs_act1 -targetLBVserver dns_vs_1
add cs action cs_act2 -targetLBVserver dns_vs_2
add cs policy cs_pol1 -rule "CLIENT.IP.SRC.EQ(10.158.2.99)" -action cs_act1
add cs policy cs_pol2 -rule "CLIENT.IP.SRC.EQ(10.158.3.245)" -action cs_act2
bind cs vserver dns_cs -policyName cs_pol1 -priority 100
bind cs vserver dns_cs -policyName cs_pol2 -priority 110

4. Bind CacheBypass policy globally:
add dns action CacheBypassAction Cache_Bypass
add dns policy CacheBypass true CacheBypassAction
bind dns global CacheBypass 100 -gotoPriorityExpression END -type REQ_DEFAULT

Note: If the CacheBypass policy is not added then there will be cache records in NetScaler and the configuration will not work.

Issue/Introduction

This article describes how to configure NetScaler DNS load balancing with different next hop DNS based on IP address.