The new class command, implemented in v10.0.0, allows for the use of extended functionality built into external data groups. These commands work for both internal and external (file-based) data groups, but internal data groups will have empty values.
So does this mean it will work with internal classes or not as “internal data groups will have empty value” would imply that no data is recoverable using these methods and as such not useable.
I’ll go check the wiki page and update it if necessary, but the brief explanation is:
The class command is fully functional on both internal and external data groups. The only thing that is external only is the use of the := separator to build name / value pairs inside your classes.
I think there could be a misunderstanding here. “Internal classes” refers to classes that are pre-defined on the BIG-IP, such as the class of private IP addresses. These classes do not have values, just keys (“names”). So you should be able to use the class command normally with them.
I tried testing this before, but didn’t get anything back for the value using -value. If this should work for standard (non-external) classes, I’m not sure I’m configuring the class correctly. I’ve tried a few ways:
I’ve looked into this a bit more, and discovered that while this was not able to be implemented for the 10.0 timeframe, you should expect the ability to use key/value pairs in internal classes in an upcoming release.
Can anyone give me an example of possible strings that could be used in the ‘value’ field, particularly when configuring Data Group list of type address in v10.1.0.
After adding my IP addresses I’m not sure what values could be used.
For all current versions, you can create an address type datagroup in the GUI under Local Traffic >> iRules >> Datagroup List tab >> Create. Select a type of ‘Address’ and enter the host and/or networks you want.
Optionally, in v10.1, you can add a corresponding value to the datagroup. I assume this allows you to specify an arbitrary string that the class command can return if the IP address evaluation matches. Here is a sample class as listed in the bigip.conf: