Technical Forum
Ask questions. Discover Answers.
Showing results for 
Search instead for 
Did you mean: 

Virtual server setup for DNS resolution


I do have the following irule code


set dest [lindex [RESOLV::lookup @ -a ""] 0]


I do not want to hard code dns ip in the above code instead wanted to create virtual server to resolve dns as suggested in the following thread


Here is something i wanted my code look like


Ex: set dest [lindex [RESOLV::lookup @$static::dns_vs -a ""] 0]


Could you please provide details on what type of virtual server i should be creating and configuration details to make it work?



F5 Employee
F5 Employee

You would need two virtual servers, both would listen on port 53, but one would be UDP and the other TCP. You could use any virtual server type, and point them at a pool of actual DNS servers.


In your example, all you've done is substitute the hard coded IP address of the DNS server with a static variable, which you would of course need to define in the RULE_INIT event. The creation of virtual servers is not necessary at that point - you would only need to do that if you wanted to abstract it one further level, so that you could add resiliency in the event that one DNS server was unavailable, for example.