Forum Discussion
Redirect traffic upon source data group
Hi All, I need to redirect the traffic to specific pool based upon the data group.
If traffic source from DG private-IP then forward to POOL Server-POOL_DC1 if traffic source from else then forward to POOL Server-POOL_DC2
I wrote the below irule, but while saving it get error message of missing brackets;
when HTTP_REQUEST { if {[class match [IP::client_addr] equals private-IP} { Pool Server-POOL_DC1 } else { Pool Server-POOL_DC2 } }
Kindly plz let me know where my irule is going wrong and what is missing. Thanks
- Snl
Cirrostratus
Try below
when HTTP_REQUEST { if { ([class match [IP::client_addr] eq private-IP])} { pool Server-POOL_DC1 } else { Pool Server-POOL_DC2 } }
- Stanislas_Piro2
Cumulonimbus
pool command must be lowercase
when HTTP_REQUEST { if { ([class match [IP::client_addr] eq private-IP])} { pool Server-POOL_DC1 } else { pool Server-POOL_DC2 } }
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