Forum Discussion
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.
- Simon_BlakelyEmployee
You can't send traffic to multiple pools (unless you use a clone pool)
K13392: Configuring the BIG-IP system to send traffic to an intrusion detection system (11.x - 15.x)
- F5SJ_Altocumulus
: Thanks for the response, if I'll try to achieve the cloning in our case where we are redirecting traffic to pools via irule as we have more than one pool in VS will it possible vial below irule modifications:
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] equals real_pool] } {
pool real_pool
clone pool clone_pool
} elseif { [class match [IP::client_addr] equals zzzz] } {
pool zzzz
clone pool clone_pool
} elseif { [class match [IP::client_addr] equals yyyy] } {
pool yyyy
clone pool clone_pool
} else {
#log local0. "Default pool (drop): [IP::client_addr]-->[LB::server]"
drop
}
}
- F5SJ_Altocumulus
I have tried to improve the rule:
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] equals DG1] } {
pool pool1
clone clonepool1
} elseif { [class match [IP::client_addr] equals DG2] } {
pool pool2
clone pool clonepool2
}else {
#log local0. "Default pool (drop): [IP::client_addr]-->[LB::server]"
drop
}
want to verify if the irule which I have created will clone the connections or not
}
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