Forum Discussion
Andrew_Wysocki_
Apr 15, 2016Nimbostratus
GTM iRule to set the pool based on which GTM is responding to query
I've been asked that when a DNS request comes into a GTM, that it responds with the GTM pool which is local to that GTM site if it's available. The setup is as follows, 2 DC's, a GTM at each, synced ...
Andy_McGrath
Apr 15, 2016Cumulonimbus
So think you will need something like the following.
Your iRule using [whoami] returns the current user so need to use [hostname], this works on tclsh but not tested this directly on the iRule.
when DNS_REQUEST {
if { ([hostname] contains "dc-gtm01") && ( [active_members www.site1.com_pool1] >= 1) } {
pool www.site1.com_pool1
} elseif { [hostname] contains "dc-gtm02") && ( [active_members www.site1.com_pool2] >= 1 } {
pool www.site1.com_pool2
}
}
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