DNS::rdata

Description

This iRules command gets or sets the resource record rdata field
Note: This command requires the DNS Profile, which is only enabled as part of GTM or the DNS Services add-on.

Syntax

DNS::rdata <rr_obj> [value]

DNS::rdata <rr_obj> [value]

  • Gets or sets the resource record rdata field

Examples

List for all different type of REsponse, the drat types returned:
when DNS_RESPONSE {
     set rrs [DNS::answer]
     foreach rr $rrs {
         log local0. "[DNS::rdata $rr]"
     }
}

If the VS is sending back an MX answer, for example, you will receive the following:
<DNS_RESPONSE>: 10 mx1.free.fr

This is specially showing that the rdata is not a simple IP or text. For some records like the MX, NAPTR, and few others, it can be more complex.