ltm rule command DNS query
iRule(1) BIG-IP TMSH Manual iRule(1)
DNS::query
Returns or constructs and sends a query to the DNS-Express database for
a name and type.
SYNOPSIS
DNS::query ('dnsx' | 'dns-express') NAME DNS_TYPE (DNSSEC)?
DESCRIPTION
This iRules command returns or constructs and sends a query to the DNS-
Express database for a name and type (IN class only).
Note: This command requires the DNS Profile, which is only enabled as
part of GTM or the DNS Services add-on.
Syntax
DNS::query [dnssec]
* Returns a tcl list of RR tcl objects lists, one for each section:
Answer, Authority, & Additional.
* Constructs and sends a query to the DNS-Express database for a name
and type (IN class only. dnnsec is an option to get DNSSEC data.)
+ target - dnsx only
+ name (FQDN, e.g. devcentral.f5.com)
+ type (e.g. A, AAA, MX, NS, PTR, etc.)
+ dnssec (boolean)
RETURN VALUE
VALID DURING
DNS_REQUEST, DNS_RESPONSE, GLOBAL_GTM
EXAMPLES
Insert DNS Express response
when DNS_RESPONSE {
set rrsl [DNS::query dnsx nameserver.org SOA]
foreach rrs $rrsl {
foreach rr $rrs {
if { [DNS::type $rr] == "SOA" } {
DNS::additional insert $rr
}
}
}
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-11.1.0 --First introduced the command.
BIG-IP 2017-01-31 iRule(1)