irule to redirect traffic to multiple pools
All,
We have one vip which is redirecting traffic to multiple pools via irule.
rule:
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] equals xxxx] } {
pool xxxx
} elseif { [class match [IP::client_addr] equals zzzz] } {
pool zzzz
} elseif { [class match [IP::client_addr] equals yyyy] } {
pool yyyy
} else {
#log local0. "Default pool (drop): [IP::client_addr]-->[LB::server]"
drop
}
}
All pools have same pool member (IP) but ports are different. Now we need to add one more pool member not as a load balancing but it will receive traffic at a same time.
I have prepared one irule for that:
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] equals test_1234] } {
pool test
pool test2
} else {
#log local0. "Default pool (drop): [IP::client_addr]-->[LB::server]"
drop
}
}
But I am not seeing traffic in both the pools. Could someone check the code and let me know the correct way to do this.