Forum Discussion
Angelo
Jul 13, 2012Nimbostratus
I-rule not working
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"URI 1" {
pool pool1
}
"URI 2" {
pool pool2
}
"URI 3" {
pool pool3
}
- nitassEmployeecan you put some logging?
[root@ve10:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "URI 1" { pool pool1 } "URI 2" { pool pool2 } "URI 3" { pool pool3 } } } when HTTP_RESPONSE { log local0. "[IP::client_addr]:[TCP::client_port] -> [clientside {IP::local_addr}]:[clientside {TCP::local_port}] -> [IP::remote_addr]:[TCP::remote_port]" } }
- AngeloNimbostratus@nitass
- natheCirrocumulusAngelo
- nitassEmployeethanks nathan. 🙂
[root@ve10:Active] config b virtual bar list virtual bar { snat automap pool foo destination 172.28.19.79:80 ip protocol 6 rules myrule profiles { http {} tcp {} } } [root@ve10:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { set uri [HTTP::uri] switch -glob [string tolower $uri] { "/uri1*" { pool pool1 } "/uri2*" { pool pool2 } "/uri3*" { pool pool3 } } } when HTTP_RESPONSE { log local0. "[IP::client_addr]:[TCP::client_port] -> [clientside {IP::local_addr}]:[clientside {TCP::local_port}] -> [IP::remote_addr]:[TCP::remote_port] | uri: $uri | pool: [LB::server pool]" } } [root@ve10:Active] config tail -f /var/log/ltm Jul 14 03:07:31 local/tmm info tmm[5111]: Rule myrule : 172.28.19.251:37297 -> 172.28.19.79:80 -> 200.200.200.101:80 | uri: /uri1 | pool: pool1 Jul 14 03:07:34 local/tmm info tmm[5111]: Rule myrule : 172.28.19.251:37298 -> 172.28.19.79:80 -> 200.200.200.101:80 | uri: /uri2 | pool: pool2 Jul 14 03:07:35 local/tmm info tmm[5111]: Rule myrule : 172.28.19.251:37299 -> 172.28.19.79:80 -> 200.200.200.101:80 | uri: /uri3 | pool: pool3
- AngeloNimbostratusguys i got the rule woking the problem is now that all the traffic is only going to the first pool
- AngeloNimbostratusI'm getting this from the logs
- hooleylistCirrostratusfavicon.ico is a request the browser makes automatically for display in the browser itself:
when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/uri1*" { pool pool1 } "/uri2*" { pool pool2 } "/uri3*" { pool pool3 } default { pool my_default_pool} } }
- AngeloNimbostratusthanks guys everything is working you guys are LEGENDS
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