Forum Discussion
andy_12_5042
Apr 07, 2011Nimbostratus
GTM irule with geoip
I have been trying to get an irule to work that uses a class match statement with no luck. SO I though I would try finding one here that I know should work:line 2: [undefined procedure: class] [class match -value[whereis [IP::client_addr] abbrev] equals us-regions]
http://devcentral-sea.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/1082330/New-Geolocation-Capabilities-in-v101.aspx
whenCLIENT_ACCEPTED {
set region [class match -value [whereis [IP::client_addr] abbrev] equals us_regions]
if { $region ne "" } {
switch $region {
midwest { pool $region }
east { HTTP::redirect http://my-east.application.com }
south { HTTP::redirect http://my-south.application.com }
west { HTTP::redirection http://my-west.application.com }
} else { pooldefault }
}
The only difference is that I am using when DNS_REQUESTED.. I keep getting the same error no matter what I do with class match statement. Am I missing something and GTM cant use class match? I am using v 10.2.1.297.0 and this is a 1600 , which F5 sent me to test out the GSLB/geoip capabilities. What am I doing wrong or missing. Also can I verify that my data group is correct.
I have something like this:
class us-regions {
"MA" {"EAST"}
}
error:
thanks for any pointers
- andy_12_5042NimbostratusI did find this thread:
- andy_12_5042NimbostratusI guess i can just do this with a topology config instead....
- JRahmAdminyes, datagroups are still not yet supported in GTM iRules. You can do a hybrid approach with topology and iRules as described in a blog post I wrote up: http://devcentral.f5.com/weblogs/jason/archive/2011/03/23/gtm-classless-classes.aspx Click Here
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