ltm rule command DNS questionΒΆ

iRule(1)		      BIG-IP TMSH Manual		      iRule(1)



DNS::question
       Gets (v11.0+) or sets (v11.1+) the question field value.

SYNOPSIS
       DNS::question ('name' | 'type') (VALUE)?

       DNS::question 'class' (DNS_CLASS)?

DESCRIPTION
       This iRules command gets (v11.0+) or sets (v11.1+) the question field
       value.

       Note: This command requires the DNS Profile, which is only enabled as
       part of GTM or the DNS Services add-on.

       Syntax

       DNS::question  [value]

	    * gets (v11.0+) or sets (v11.1+) the question field value.

	      Note: A question RR has no rdata and only requests with
	      qdcount == 1 are accepted. The return types for name, type,
	      and class are all strings. Type returns/accepts any of the
	      valid DNS types defined in the RFCs. The class
	      returns/accepts IN, CH, & HS.

RETURN VALUE
VALID DURING
       DNS_REQUEST, DNS_RESPONSE, GLOBAL_GTM

EXAMPLES
	when DNS_REQUEST {
	    log local0. "my question name: [DNS::question name]"
	}

	The follow rule violates the DNS protocol in isolation since a client
	won't understand the response (i.e., we changed the question name) but
	let's assume there's intercept code in DNS_RESPONSE to handle it and
	restore it to the original question name

	when DNS_REQUEST {
		set my_rr [DNS::rr "example.net A IN 10 1.2.3.4"]
		DNS::question name $my_rr
	}

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-11.0.0 --First introduced the command.



BIG-IP				  2017-01-31			      iRule(1)