Forum Discussion
6 Replies
- BinaryCanary_19Historic F5 Account
Using Universal Persistence , you should be able to persist on anything your irules can lay their hands on, and you can easily grab source port.
Why you would want to persist on source port is a mystery to me, but I will assume that you have thought it through.
- BinaryCanary_19Historic F5 Account
Yes. The idea of Universal Persistence is so that you can write your own logic, if the system-supplied persistence criteria don't meet your needs.
The example on the solution article for universal persistence is extracting the key from a cookie value. In your case, you will be using source port instead of JSESSIONID cookie.
The idea is generally (pseudocode):
when CLIENT_ACCEPTED: persist uie [TCP::client_port] when SERVER_CONNECTED: persist add uie [TCP::client_port]
Logic is a little simpler since the port is always present. YOu of course need to test this.
- breizho35_11667Nimbostratus
Thank you for your sugestings. I try.
- breizho35_11667NimbostratusThanks for your answer. So I need to create specifique irule for this need ? Eric
- BinaryCanary_19Historic F5 Account
The Persist uie command provides a timeout option.
- breizho35_11667Nimbostratus
Hi, it seems ok for the TCP persistence, it works fine, Thanks ! I used this Irule: when CLIENT_ACCEPTED { persist uie [TCP::client_port] }
when SERVER_CONNECTED { persist add uie [TCP::client_port] }
How can I include a TIMEOUT parameter for each persistence ? How can I combine TCP and UDP persistence ? Is the following is ok ? when CLIENT_ACCEPTED { persist uie [TCP::client_port] persist uie [UDP::client_port] }
when SERVER_CONNECTED { persist add uie [TCP::client_port] persist add uie [UDP::client_port] }
Thanks and regards. Eric