Forum Discussion
cerpika_14370
Nimbostratus
Sep 04, 2009session add command behavior
Quick question for the iRules gurus. I am considering using the session add command in an iRule, which will help us with a unique requirement in a multihomed BIG-IP deployment. In this iRule the key w...
hoolio
Cirrostratus
Sep 07, 2009You can test this by running the iRule a few times where the same client IP will have multiple nexthop values and then logging the value of the session lookup command. I expect the existing key will be updated with the new value. Here is a simple iRule which demonstrates this:
when HTTP_REQUEST {
session add uie key1 value1
session add uie key1 value2
log local0. "\[session lookup uie key1\]: [session lookup uie key1]"
}
Log output:
: [session lookup uie key1]: value2
Also, to allow for variable expansion (of $session_key) or of commands (like IP::client_addr), you should replace the curly braces in the session command with:
session add uie [list [IP::client_addr] any virtual] [LINK::nexthop] 800
Aaron
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