Forum Discussion
Matthew_WV_1894
Nimbostratus
Feb 25, 2015new to iRules
Hello, I am trying to create an iRule that uses a specific persistence profile if the incoming IP address is a member of a datagroup. I created the datagroup of type address and added my IPs. I'm try...
- Feb 25, 2015
Your persist hash requires something to use as the hash.
https://devcentral.f5.com/wiki/iRules.persist.ashx
when CLIENT_ACCEPTED { if { [matchclass [IP::remote_addr] equals $::ABC]} { persist hash } else { persist source_addr } }
Brad_Parker_139
Nacreous
Feb 25, 2015Your persist hash requires something to use as the hash.
https://devcentral.f5.com/wiki/iRules.persist.ashx
when CLIENT_ACCEPTED {
if { [matchclass [IP::remote_addr] equals $::ABC]} {
persist hash
}
else {
persist source_addr
}
}
Brad_Parker_139
Nacreous
Feb 25, 2015Also, unless you are using BigIP v9 I suggest using class match instead of matchclass and calling your datagroup by name, i.i "/Common/ABC". Both are deprecated and in v11 calling at datagrou via $:: will actually throw TCL errors. https://clouddocs.f5.com/api/irules/class.html
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