Forum Discussion
F5_LB_Eng
Dec 14, 2011Cirrostratus
Need Help on merging the 2 Irule
i want to merge the below 2 irule into one irule. can any one help me on this. rule abc_prod_api '{ when CLIENT_ACCEPTED { if { [[ IP::client_addr] equals ...
Michael_Yates
Dec 14, 2011Nimbostratus
Hi prasanna,
You are going to need to get them all into the same event so that you can escape some of the routing that is being performed with return statements.
If you simply merge them the default actions inside of the second iRules switch statement would override the IP Address matching in the first iRules CLIENT_ACCEPTED Event.
when HTTP_REQUEST {
if { [IP::addr [IP::client_addr] equals 63.95.36.13 ] } {
pool prod_res_comm_ssl_196
return
}
if { [IP::addr [IP::client_addr] equals 216.195.77.144 ] } {
pool prod_res_comm_ssl_199
return
}
switch -glob [string tolower [HTTP::uri]] {
"/mers/api*" {
persist none
pool prod_res_comm_ssl_api
}
default {
persist source_addr
pool prod_res_comm_ssl
}
}
}
Hope this helps.
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