Forum Discussion
John_Nootens_45
Nimbostratus
Jul 01, 2005irule format/syntax
Below is the rule I plan to implement. Can you tell me if I have the format/syntax correct. I copied it from another 4.x box and changed the 'if' condition. I am using a config guide from 9.x, is there syntax information in a 4.x online manual somewhere?
Any help will be greatly appreciated. John
MARS-VIP
--------
161.215.151.52:45000
Use Rule MARS-rule
MARS-rule
---------
if (IP::client_addr eq 161.215.54.193 ) {
use ( MARS-pool1 )
}
else {
use ( MARS-pool2 )
}
MARS-pool1
----------
57.23.40.197:6014 priority 2
57.23.40.197:6008 priority 1
MARS-pool2
----------
57.23.40.197:6014 priority 1
57.23.40.197:6008 priority 2
- You are close. the IP::client_addr is a 9.x variable. You want to use the 4.x client_addr. Also, the parantheses around the use pool commands will cause a validation error.
if (client_addr == 161.215.54.193) { use pool MARS-pool1 } else { use pool MARS-pool2 }
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects