Forum Discussion
smp_86112
Jun 24, 2010Cirrostratus
Thanks for your feedback. Interesting idea hoolio - I had the idea if inverting this logic floating around in my head, but I guess I never formalized it. And I think the switch statement might work. I don't like to use classes if I don't need to because I they are a bit obscure to my coworkers who aren't as comfortable managing LTMs as I am. Using a switch statement, the entire code is right there in front of you - in addition to that, I assume the iRule would be faster without the external reference.
I'll try this and post my results:
when HTTP_REQUEST {
switch [IP::addr [IP::client_addr]] {
"xxx.xxx.xxx.xxx/26" -
"xxx.xxx.xxx.xxx/21" -
"xxx.xxx.xxx.xxx/24" -
"xxx.xxx.xxx.xxx/32" -
"xxx.xxx.xxx.xxx/32" { pool [virtual name]_no-SM }
}
}