Forum Discussion
Mark_Bark_24174
Jan 12, 2018Nimbostratus
GTM Source IP Redirect to Specific Pools iRule
I'm trying to redirect clients to specific pools based on the clients IP address through an iRule. I created this iRule in the GTM and it seems to be working fine however, I'd like to set client net...
Lee_Sutcliffe
Jan 12, 2018Nacreous
You can use
[IP::addr]
so that you may use a CIDR mask notation for the subnet:
https://devcentral.f5.com/wiki/iRules.IP__addr.ashx
when DNS_REQUEST {
if { [IP::addr[IP::client_addr]] equals "10.80.0.0/16" } {
pool pool_10_80
} elseif { [IP::addr[IP::client_addr]] equals "10.96.0.0/16" } {
pool pool_10_96
} elseif { [IP::addr[IP::client_addr]] equals "172.27.0.0/16" } {
pool pool_172_27
}
}
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