Forum Discussion
carpey_13558
Nimbostratus
19 years agoQuick 4.X irule logic question
I want to separate traffic using an IP range and port number. I tried using a rule similar to the one shown, but was having issues. I think it may have something to do with the logic operators. Which ...
Deb_Allen_18
19 years agoHistoric F5 Account
Hi Carpey --
Parentheses are your friend in this case, forcing the order of comparisons. Try this:
if ( ((client_addr equals 10.10.10.10 netmask 255.255.255.0) and server_port equals 80)) or ((client_addr 10.10.9.10 netmask 255.255.255.0) and (server_port equals 80)) ) {
use pool pool1
}
else {
use pool pool2
}HTH
/deb
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
