Forum Discussion
Angelo
Jul 13, 2012Nimbostratus
I-rule not working
Hi Guys i have a irule but I'm not sure if it is work it's to send three URL to three different pools. I'm not getting errors on the i-rule but I'm not getting out to the pool members when connect. t...
nitass
Jul 13, 2012Employee
thanks nathan. 🙂
Angelo,
you may add more information in log.
e.g.
[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
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