Forum Discussion
ibehavior_37902
Nimbostratus
Aug 31, 2010Load balance on source ip address
Hello -
I need to be able to load balance incoming traffic to one of 4 back end pools based on some part of the source IP address. I have found several examples of how to do this at the su...
ibehavior_37902
Nimbostratus
Sep 01, 2010Chris -
Thank you for the quick reply! We are not currently using SNAT and I am not sure I want to change what is currently working...
What do you think about this which I modified from this http://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/108/iRules-Optimization-101--01--if-elseif-and-switch.aspx
I believe that this will route an traffic with the IP address ending in 1 or 2 to pool_1 and any traffic with the IP address ending in 3 or 4 to pool_2 and so on.
when CLIENT_ACCEPTED {
Determine which pool based on last digit of Clinet IP Address
switch -regexp [IP::client_addr ] {
".*[1,2]$" { pool pool_1 }
".*[3,4]$" { pool pool_2 }
".*[5,6]$" { pool pool_3 }
".*[7,8]$" { pool pool_4 }
".*[9,0]$" { pool pool_5 }
}
}
Thanks
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
