Forum Discussion
i-Rule redirect/load-balance request based upon source subnets.
Hello Guys,
I am looking for I-rule which could load-balance the requests to different-2 pools based upon the different-2 source subnets.
let's say I have three pool:-
Pool-A 10.10.10.10 10.10.10.20
Pool-B 10.10.20.10 10.10.20.20
Pool-C 10.10.30.10 10.10.30.20
Source Subnets:- Let's say I have three sites.
Site A:- 172.16.10.x 172.16.20.x
Site B:- 172.16.30.x 172.16.40.x
Site C:- 172.16.50.x 172.16.60.x
Now I need that if there is any request from site A needs to forward to pool-A , Site B move to pool-B and site C move to pool-C and else all move to pool-A only.
Thanks in advance.
- Rico
Cirrus
Try this:
when HTTP_REQUEST { switch [IP::addr [IP::remote_addr]] { case "172.16.10.0/24" - case "172.16.20.0/24" { pool Pool-A } case "172.16.30.0/24" - case "172.16.40.0/24" { pool Pool-B } case "172.16.50.0/24" - case "172.16.60.0/24" { pool Pool-C } default { pool Pool-A } } }
If you have any more questions, I am sure I can help.
Recent Discussions
Related Content
* 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