Forum Discussion
marlon_Gino-gi1
Nimbostratus
Aug 19, 2008persistence based on MSISDN number
hello,
Im new to Irules,
would like to know if there is an Irule that that can persist client connection based on client mobile number or msisdn? the client mobile number is included within the header whenever the client request for a service or connection to the backend server.
thanks in advance
5 Replies
- James_Quinby_46Historic F5 AccountOne way to accomplish this is with the universal persistence profile, which lets you persist on strings located within, among other things, HTTP headers. For example (and I'm getting this right out of the book I received in training):
when HTTP_REQUEST { persist uie [findstr [HTTP::URI] "user=" 5 "&"] }
...will persist on a name/value pair as presented in the URL string. There are probably other ways of doing this, but this came to mind immediately. - Patrick_Chang_7Historic F5 Accounthttp://devcentral.f5.com/weblogs/dctv/archive/2008/06/25/3390.aspx
A more generalized solution that I think can be applied to your case. - Deb_Allen_18Historic F5 AccountClick here for a post I found in the v4.x forum that seems to contain a v9 version of an MSISDN persistence iRule they wanted to convert to v4.x...
hth
/deb - Deb_Allen_18Historic F5 Accountoh, also please post back if it works & we can add it to the codeshare.
- marlon_Gino-gi1
Nimbostratus
hello guys,
thanks for the reply. anyways can you help me understand what the Irule below does.
thanks in advance.
when CLIENT_ACCEPTED {
TCP::collect
}
when CLIENT_DATA {
set str "[TCP::payload ]"
if { $str contains "AAA" } {
set num [ findstr "$str" "AAA:" 7 \n ]
}
persist uie $num 300
TCP::release
}
I think than it could work on this way:
accumulate
if { tcp_content contains "MSISDN"}
set num [findstr[tcp_content] "MSISDN:" 7\n]
persist simple $num 300
discard
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