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 will be the source IP address of the connection. This iRule will build the session table based upon the source IP and the lasthop MAC address.
when SERVER_DATA {
set session_key [IP::local_addr]
session add uie {$session_key any virtual} [LINK::nexthop] 800
In this scenario, users with the same source IP [IP::local_addr] may switch incoming routers and therefor have a new lasthop MAC address [LINK::nexthop]. So how will the table be affected?
Will the BIG-IP overwrite the old entry in the session table with the new record?
Thanks!
- hoolio
Cirrostratus
You 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]" }
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