DNS::rrtype¶
Description¶
Returns the resource record type requested by the client.
Note: This command functions only in the context of GTM iRules and
requires the DNS Profile, which is only enabled as part of GTM or the
DNS Services add-on.
Examples¶
Checks the source IP address of each new DNS request, and if
10.10.10.0, uses pool GTM_pool1. If not, the request is checked to
make sure the resource record type is A (address) and the name is
www.domain.com, and if so, cnames the request to
www.redirect.domain.com:
when DNS_REQUEST {
if { [IP::addr [IP::client_addr] equals 10.10.10.0/24] } {
pool GTM_pool1
} elseif { ([DNS::rrtype] eq "A") and ([DNS::rrname] eq "www.domain.com") } {
cname www.redirect.domain.com
}
}