Forum Discussion
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.
- Sashi_81625Nimbostratuswhen CLIENT_ACCEPTED {
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