Forum Discussion
nitass
May 01, 2013Employee
how did you know it goes to default pool? if there are number of requests (e.g. object inside web page), only the one containing "test=64" in request will go to test-temp pool.
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.252:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when CLIENT_ACCEPTED {
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
set host [HTTP::host]
set uri [HTTP::uri]
if { [HTTP::uri] ends_with "test=64" }{
pool test-temp
} elseif { [HTTP::uri] contains "test=64&" }{
pool test-temp
} else {
pool $default_pool
}
}
when HTTP_RESPONSE {
log local0. "client [IP::client_addr]:[TCP::client_port] | host $host | uri $uri | pool [LB::server pool] | server [IP::server_addr]:[TCP::server_port] | status [HTTP::status]"
}
}
[root@ve10:Active] config b pool test-temp list
pool test-temp {
members 200.200.200.111:80 {}
}
log
[root@ve10:Active] config tail -f /var/log/ltm
May 1 09:14:38 local/tmm info tmm[4950]: Rule myrule : client 172.28.20.17:60149 | host my.vip.ip.here | uri /test.txt?test=64 | pool test-temp | server 200.200.200.111:80 | status 404