Forum Discussion

andy_12_5042's avatar
Icon for Nimbostratus rankNimbostratus
Apr 07, 2011

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:

set region [class match -value [whereis [IP::client_addr] abbrev] equals us_regions]
if { $region ne "" } {
switch $region {
            midwest { pool $region }
            east { HTTP::redirect }
            south { HTTP::redirect }
            west { HTTP::redirection }
    } 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 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"}



line 2: [undefined procedure: class] [class match -value[whereis [IP::client_addr] abbrev] equals us-regions]

thanks for any pointers

3 Replies

  • I did find this thread:




    Which states that data groups are not supported in GTM irules "yet" but that was in 2008?? IS this still not supported at this time...
  • yes, 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: Click Here