Forum Discussion

SanjayP's avatar
SanjayP
Icon for Nacreous rankNacreous
Nov 06, 2013

DNS query

Requirement is 1 domain has 2 VS, 1 with IPv4 and another with IPv6. How GTM should be configured to return IPv4 IP on A query and IPv6 on AAAA query. Pls suggest.

 

3 Replies

  • Here you go

     

    when DNS_REQUEST {

     

    if { [DNS::question type] == "A" } {

     

    host 172.7.7.4

     

    } elseif { [DNS::question type] == "AAAA" } {

     

    host 172.7.7.6 (Replace with IPv6 address)

     

    } else {

     

    return

     

    }

     

    }

     

  • Is it possible to insert both answers IPv4 and IPv6 in DNS response from GTM.

     

  • Typically when you configure the GTM with Return to DNS and have the DNS A record entries for all the IPs in ZoneRunner, the GTM will respond with all IPs. Not sure how its gonna work for IPv6, as it depends on how the request was made by the Client.

     

    You could use iRules to accomplish this I guess. Check the link below for some ideas. Let me know how it went!

     

    https://devcentral.f5.com/wiki/iRules.DNS_RESPONSE.ashx

     

    NOTE:

     

    This event cannot be used in a GTM iRule.

     

    When using this event in an LTM iRule on a DNS listener, either a GTM license or DNS Services addon license must be enabled. When using this event in an LTM iRule a DNS profile must be enabled on the listener.