Forum Discussion
2funky_105078
Apr 17, 2014Cirrus
This is the example i found in the wiki. But it doesnt cover the situation of DNS::answer == "use the RTT method" function.
when DNS_RESPONSE {
set rrs [DNS::answer]
foreach rr $rrs {
DNS::ttl $rr 60
}
}
- Mohamed_LrhaziApr 17, 2014AltocumulusYou need to inspect the DNS answer records, and make decisions about the TTL to set, based on the IP addresses in those DNS answers, right? In the sample iRule you post, you see how you can access the list of RRs in the answer, and how to loop tru them, right? you get one RR in a variable named $rr, then you can dissect that record like so: [DNS::name $rr] [DNS::ttl $rr] [DNS::class $rr] [DNS::type $rr] [DNS::rdata $rr] I guess the record type needs to be "A", then the rdata would be a list of IP addresses? I would right the iRule to just log all those fields and learn how to parse it out from there....