Forum Discussion
Jeff_41411
Altocumulus
Aug 24, 2010Determine pools defined for WideIP
Hi,
Is there a way with an iRule (attached to a WideIP) to determine:
1) the list of pools defined (all pools, regardless of state) for that WideIP, in the same order they are defi...
Jeff_41411
Altocumulus
Aug 27, 2010Thanks to everyone for the help - I did get this working with the following (rather simple) code:
when DNS_REQUEST {
set wip [wideip name]
set pl [pools -list]
set counter 1
foreach p $pl {
set pname($counter) $p
incr counter
}
log local0. "WIP: $wip, pool1: $pname(1), pool2: $pname(2), client: [IP::client_addr]"
If the Client IP (DNS server) is from the DR subnet, send
the request to the DR pool (2)
if { [IP::addr [IP::client_addr]/16 equals "xx.xx.xx.xx"] }
{
pool $pname(2)
} else {
pool $pname(1)
}
}
One thing to note about the 'pools -list' command, if there is a 'Last Resort Pool' defined in the WideIP - and the pools are not in a 'green' state - only the Last Resort Pool is returned by the command. Seems a little strange . . .
Thanks again,
Jeff
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
