Forum Discussion
hoolio
Cirrostratus
Oct 07, 2009matchclass versus class in v10 for address comparisons?
Is there any advantage to using class match versus matchclass to evaluate an IP address against an address type datagroup?
Here is a simple iRule I used to test class/matchclass for an IP aga...
Juerg_Wiesmann
Nimbostratus
Dec 15, 2011
Hi Tom,
The closing Bracket is missing in your Example :-)
class string_name_value_class {
{
"key1" { "value1" }
"key2" { "value2" }
}
}
class address_name_value_class {
{
host 1.1.1.1 { "value1" }
network 1.1.2.0/24 { "value2" }
}
}
Sample iRule which gets the value for a string datagroup entry and an address datagroup entry
when RULE_INIT {
set value [class match -value "key1" equals string_name_value_class]
log local0. "Looked up key1 and found $value"
set value [class match -value 1.1.2.25 equals address_name_value_class]
log local0. "Looked up 1.1.2.25 and found $value"
}
Regards
wiesmann
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
