TMcGov_92811
Jan 21, 2009Nimbostratus
IRule to use Pool depending on Client source address
I need to add some more logic to an existing iRule, and I think I need to clean it up before doing so. I'm sure there must be a better way for me to do this. Basically, I just want to examine the client's source IP, and based on that, send them to a specific pool. Here's what I have now...how can I simplify this ?
when CLIENT_ACCEPTED {
switch [IP::client_addr] {
63.208.77.21 { pool http-Test-mediation }
166.90.79.2 { pool http-Test-mediation }
198.204.15.125 { pool http-Test-mediation }
198.204.15.126 { pool http-Test-mediation }
202.54.137.90 { pool http-Test-mediation }
203.99.192.0/19 { pool http-Test-mediation }
203.99.195.2 { pool http-Test-mediation }
203.99.208.0/23 { pool http-Test-mediation }
203.197.245.101 { pool http-Test-mediation }
203.199.245.10 { pool http-Test-mediation }
65.5.4.196 { pool alt-http-Test }
65.5.4.198 { pool alt-http-Test }
65.5.4.199 { pool alt-http-Test }
65.5.4.253 { pool alt-http-Test }
65.5.4.254 { pool alt-http-Test }
65.201.27.93 { pool alt-http-Test }
default { pool alt-http-Test-mediation }
}
}