Forum Discussion
i need irule source client select pool and the redirect pool
hi i have a question the idea write irule .. control source client ip to pool and the Condition redirect pool when a pool down
the load balance has virtual server [ 3 pool ]
example this case
question 1
i want control from client ip address to select pool
virtual server ip add 192.168.1.20 client IP A connection only to pool 1 ip add 10.10.10.10 , ip 10.10.10.11 client IP B connection only to pool 2 ip add 20.20.20.20 , ip 20.20.20.22 client IP C connection only to pool 3 ip add 30.30.30.30 , ip 30.30.30.33
and question 2 i want to the redirect client ip A to pool 2 or 3 when the even pool 1 down or member of
less than < 1
you can write irule this case ? thank you all the answer
1 Reply
- Hannes_Rapp
Nimbostratus
Part of the solution below, routing specific clients to dedicated Pools.
I'm not sure I understand your maintenance/out-of-service Pool-routing conditions - do you want just Client A to be routed to Pool2 or Pool3 (when Pool1 is down), or does the same neglecting condition apply to other clients as well? What should happen to Client B when Pool2 is down?
Perhaps it would make the most sense to just route any client (Client A, B, C, and all others) to the Default Pool when a dedicated pool is down? Let me know if you agree, and I can provide an update.
when CLIENT_ACCEPTED { Save the name of default pool (as configured in VS Resources Tab) as a variable, before it can be modified by conditional actions below set poolDefault [LB::server pool] switch [IP::client_addr] { "1.1.1.1" { Route clients with IP 1.1.1.1 to Pool1 pool Pool1 } "2.2.2.2" { Route clients with IP 2.2.2.2 to Pool2 pool Pool2 } "3.3.3.3" { Route clients with IP 3.3.3.3 to Pool3 pool Pool3 } default { Route to default pool pool $poolDefault } } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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