Forum Discussion
Javier_Fernand2
Nimbostratus
Jul 04, 2005set Persist iRule to match across virtual server
I want to configure an iRule to set the persistence for 2 virtual server by source address affinity, I want that if the client's IP begins with 195.53.125.1* always goes to the same server. The virtua...
unRuleY_95363
Jul 11, 2005Historic F5 Account
That's ok. You should still be able to handle it similarly. You will likely still want to create a source address persist profile with the "across virtuals" box checked and assign it to the virtual. Then you would use a rule more like this:
if { not ( [IP::client_addr] starts_with "195.53.125.1" ) } {
persist cookie insert "MyCookieName"
}
The available syntaxes for the "persist cookie" command are:
persist cookie
persist cookie insert ?"name"? ??
persist cookie rewrite ?"name"? ??
persist cookie passive ?"name"?
persist cookie hash "name" ?{ ?? } ???
?? denotes an optional argument.
is of the format: "d ::" or simply ""
You can assign both persist profiles to the virtual on the command line or in the bigip.conf file (the first one listed is the default), however the GUI does not support this. Then you can use your rule to simply select between the persistence types and you don't need to specify all the characteristics in the rule.
Hope this helps.
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
