Forum Discussion
Jim_Mathers_131
Jun 10, 2015Nimbostratus
GTM iRule to return CNAMEs based on LB_SELECTED
Hello,
Just want to make sure my iRule beneath my signature is correct. My intent:
If the GTM chooses server 1.1.1.1, return cname "foo1.bar.com". If the GTM chooses server 2.2.2.2, return cnam...
Samir_Jha_52506
Jun 11, 2015Noctilucent
Something like this. Please try link.
when DNS_REQUEST {
if { [IP::addr [IP::remote_addr] equals 10.10.1.0/32] } {
cname foo1.bar.com
} elseif {[IP::addr [IP::remote_addr] equals 2.2.2.2/32] } {
cname foo2.bar.com
}
}
- Jim_Mathers_131Jun 11, 2015NimbostratusHello Samir, Thank you for the answer. My intent is not to return CNAMEs based on DNS_REQUEST but instead to return a CNAME based on the Pool Member selected by the GTM, which is why I think the event LB_SELECTED is more appropriate. In your config, you are triggering on DNS_REQUEST, I need to trigger based on LB_SELECTED (I think). Thanks, Jim
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