Nomios_Nomios
Jan 13, 2009Nimbostratus
GTM persistancy based on iRule
Hi,
I would like to create an iRule in order to make persistancy based on source IP.
Objectives : redirect client on two differents pool (GTM Pool with 1 Pool member and so 1 VIP by Pool) according to result of the modulo (crc32) of the IP::client_addr
I have created this iRule but it doesn't work :
when DNS_REQUEST {
set key [IP::client_addr]
log local1. "IP cliente $key"
set modulo [crc32 [$key]]
if { $modulo equals "0" } {
pool pool_gtm_da_wildcard
log local1. "Result modulo $modulo"
}
elseif { $modulo equals "1" } {
pool pool_gtm_da_wildcard2
log local1. "Result modulo $modulo"
}
}
Do you have any idea or suggestion about this ?
Many thanks for your help.
Regards