Forum Discussion
jayanthi_41101
Nimbostratus
Jun 12, 2017Use DNS server list for DNS resolution through F5 LTM irule
We already use DNS resolution using one specific DNS server in RESOLV::lookup. I am trying to figure out a solution where i can use a list of DNS servers and not finding any resources for it.
C...
tcastaing_23984
Nimbostratus
Dec 18, 2017Here is a working solution that is choosing randomly a DNS server from the specified list.
FQDN to resolve
set FQDN_TO_RESOLVE "www.example.com"
DNS server list
set DNS_SERVER_LIST {1.1.1.1 2.2.2.2 3.3.3.3}
Select a DNS server from the list
set SELECTED_DNS_SERVER "[lindex $DNS_SERVER_LIST [expr {int(rand()*[llength $DNS_SERVER_LIST])}]]"
Perform the Lookup
set FQDN_RESOLVED_IP "[lindex [RESOLV::lookup @$SELECTED_DNS_SERVER -a $FQDN_TO_RESOLVE] 0]"
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects