We have our GTM configured with many domains. All the configured domains are a part of our subdomain "test.com".
We want to configure any domain on the GTM, say "abc.test.com".
However this domain should not have any pools in it. This should do DNS queries based on some iRule.
What we need is if the client IP is 220.127.116.11/24 then the GTM should forward the query to a pool of dnsserver1.com and dnsserver2.com.
If the clients IP is 18.104.22.168/24 then the GTM should forward the query to a pool of dnsserver3.com and dnsserver4.com.
Thanks much for the help!!
If you look at the clouddocs page for DNS_REQUEST (https://clouddocs.f5.com/api/irules/DNS_REQUEST.html), there is example code for checking the source address of the query*. From there you can choose the pool to forward the resolution to.
*Keep in mind that the source address of the query is seldom the actual client, but is usually the client's configured DNS server.