jj24_43946
Apr 02, 2012Nimbostratus
evaluate IP::remote_addr as string
Hello and thanks in advance for your expertise:
My problem is that I want to be able to assign traffic to different pools based on the end digit of an IP address. For example, if it's from 0-4 go to POOL A, and if from 5-9 go POOL B.
What is the most efficient, resource-wise, method to achieve this? Below is what I'm doing right now.
when CLIENT_ACCEPTED {
set client_ip [IP::remote_addr]
if { [ $client_ip ends with "5" ] } {
pool poolB
return
}
}
Again, thanks for any assistance anyone can provide.