Forum Discussion
iRule - two persist commands
Hello Team,
Can i have two persist commands in one iRule ? I would like to create two different entries which would be used by two different types of traffic (protocols) for two other Virtual Servers having the same ip ("match across services").
Example:
VIP1 for radius - iRule creating two persistent entries based on different Radius AV Pairs
VIP2 for http - iRule based on source ip hitting one of those entries
VIP3 for smtp - iRule based on domain hitting the second of those entries
Possible ?
Thanks, Michal
2 Replies
Hi Michal,
you can (pre)create as many persistence records as you want in a single iRule using the
command. To allign the individual connections/virtual servers to the (pre)created persistence records you may use[persist add]
following by a manual selection of the node.[persist lookup]For further reading: https://devcentral.f5.com/wiki/iRules.persist.ashx
Cheers, Kai
- teknet7_237497
Nimbostratus
Hi Kai,
Thank you for the clarification.
I have tried to call:
persist uie "$calling:$framed_ip" 30 persist uie "$framed_ip" 30 persist uie "$calling" 30And always just the last persistence record was added.
I need to do everything in CLIENT_ACCEPTED because my attributes are only in the request from client. If i understand i can not use persistence add, because i want to do two things at the same time:'
- follow any existing persistence (if existing)
- create a new one if not existing for any of those two arguments (or refresh existing)
How could i achieve that ?
Thanks, Michal
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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
