Forum Discussion
Steve_Knapp
Altostratus
Apr 28, 2014Help with "persist source_addr" command not working in Irule
I have an iRule that selects a pool member based on data within the 1st HTTP_REQUEST in a session and I need to persist on source IP address. I have a source IP persist profile set on the virtual se...
nitass
Employee
May 01, 2014Do you know if I could update the persistence table directly with "persist add" right after the POOL xxx MEMBER xxx statement? If so, could you post an example of the command?
e.g.
config
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
destination 172.28.24.10:80
ip-protocol tcp
mask 255.255.255.255
persist {
source_addr {
default yes
}
}
pool foo
profiles {
http { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 12
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm pool foo
ltm pool foo {
members {
200.200.200.101:80 {
address 200.200.200.101
}
}
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
ltm rule qux {
when HTTP_REQUEST {
pool foo member 200.200.200.101
}
when HTTP_RESPONSE {
persist add source_addr [IP::client_addr]
}
}
test
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) show ltm persistence persist-records all-properties
Sys::Persistent Connections
source-address - 172.28.24.10:80 - 200.200.200.101:80
-----------------------------------------------------
TMM 0
Mode source-address
Value 172.28.24.1
Age (sec.) 3
Virtual Name /Common/bar
Virtual Addr 172.28.24.10:80
Node Addr 200.200.200.101:80
Pool Name /Common/foo
Client Addr 172.28.24.1
Owner entry
Total records returned: 1
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