How to Configure NetScaler to do Content Switching to LoadBalance DNS Requests to different DNS Servers based on Domain Name's

How to Configure NetScaler to do Content Switching to LoadBalance DNS Requests to different DNS Servers based on Domain Name's

book

Article ID: CTX205898

calendar_today

Updated On:

Description


   We’ve 2 DNS Servers in the background, responsible for 2 different domains e.g. (puneet.com/seth.com).
   We want when NS receives DNS Request for *.puneet.com, it should go to Server 10.104.61.135 and request for *.seth.com to go to 10.104.61.136.

Instructions

 
    This can be achieved on NetScaler using Content Switching Policy with "DNS.REQ" Expression.

    Add both the DNS Server's to LB Servers with Services.

    User-added image
   
    User-added image

   Create 2 LB VIP's 1 for each server.

   User-added image

   Create Content Switching Policies for both the domain's.

   User-added image

   Create Content Switching Vserver for DNS Type Traffic.

   User-added image

   Bind both CS Policies created to this CS Vserver along with their Target Load Balancing Virtual Server.

   User-added image


   To Verify Operations for this config, Please look at the screenshot attached from a packet capture collected on NetScaler.
   Client IP: - 10.104.61.131
   VIP: - 10.104.61.141
   SNIP: - 10.104.61.133
   DSTIP: - 10.104.61.135/136

  User-added image



  Note:- All the ip addresses and Domain's used in this Article are internal only.
  You can even configure LB Vserver to have non-addressable address like 0.0.0.0 and use them within CS Vserver for Target Load Balancing VServer.
 

Issue/Introduction

If you've multiple DNS Servers as a part of different domain's , we can configured NS to send queries for each domain to their respective DNS Servers