Forum Discussion
Goran_Blomquis1
Nimbostratus
Dec 22, 2017No output from persist lookup $header1
Hi all,
We have a case there we need to investigate and take decision based on persistence record.
I do a set ins_id to read header that also is used in persistent table. Persistent work an...
nitass
Employee
Dec 22, 2017this is mine. big-ip is running 12.1.2.
// config
root@(bip1a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual baz
ltm virtual baz {
destination 10.200.155.165:80
ip-protocol tcp
mask 255.255.255.255
pool foo
profiles {
http { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
translate-address enabled
translate-port enabled
vs-index 3
}
root@(bip1a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
ltm rule qux {
when HTTP_REQUEST {
log local0. "\[HTTP::cookie SESSION\]=[HTTP::cookie SESSION]"
if { [HTTP::cookie SESSION] ne "" } {
log local0. "persist lookup uie [HTTP::cookie SESSION]=[persist lookup uie [HTTP::cookie SESSION]]"
persist uie [HTTP::cookie SESSION]
}
}
when HTTP_RESPONSE {
log local0. "\[HTTP::cookie SESSION\]=[HTTP::cookie SESSION]"
if { [HTTP::cookie SESSION] ne "" } {
persist add uie [HTTP::cookie SESSION]
}
}
}
// client
curl -I http://10.200.155.165
HTTP/1.1 200 OK
Date: Fri, 22 Dec 2017 20:48:25 GMT
Server: Apache/1.3.26 (Unix) PHP/4.1.2 mod_ssl/2.8.10 OpenSSL/0.9.6b
X-Powered-By: PHP/4.1.2
Set-Cookie: SESSION=a83ccc31492529e8cd457417befb5e59; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html
curl -I http://10.200.155.165 -H "cookie: SESSION=a83ccc31492529e8cd457417befb5e59"
HTTP/1.1 200 OK
Date: Fri, 22 Dec 2017 20:48:41 GMT
Server: Apache/1.3.26 (Unix) PHP/4.1.2 mod_ssl/2.8.10 OpenSSL/0.9.6b
X-Powered-By: PHP/4.1.2
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html
// big-ip
[root@bip1a:Active:In Sync] config tail -f /var/log/ltm
Dec 22 21:32:01 bip1a info tmm[12155]: Rule /Common/qux : [HTTP::cookie SESSION]=
Dec 22 21:32:01 bip1a info tmm[12155]: Rule /Common/qux : [HTTP::cookie SESSION]=a83ccc31492529e8cd457417befb5e59
Dec 22 21:32:17 bip1a info tmm[12155]: Rule /Common/qux : [HTTP::cookie SESSION]=a83ccc31492529e8cd457417befb5e59
Dec 22 21:32:17 bip1a info tmm[12155]: Rule /Common/qux : persist lookup uie a83ccc31492529e8cd457417befb5e59=/Common/foo 10.200.155.166 80
Dec 22 21:32:17 bip1a info tmm[12155]: Rule /Common/qux : [HTTP::cookie SESSION]=
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