Forum Discussion
Chuck_127210
Nimbostratus
Dec 08, 20061 VS and 2 Pools
I'm new to IRULES and I'm having an issue with converting a 4.5 rule into a version 9 IRULE. Listed below is the 4.5 rule and below that the IRULE I created (which doesn't work). Any help would be appreciated.
4.5 rule
if (client_addr == 172.0.0.0 netmask 255.0.0.0) {
use pool Release2_DR_Pool
}
else if (client_addr == 10.144.0.0 netmask 255.255.0.0) {
use pool Release2_DR_Pool
}
else {
use pool Touchpoint_COB_Pool
}
9.1.2 IRULE
when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_addr] equals 172.0.0.0/8] } {
pool Branchplatform_Citizens_pool
}
if { [IP::addr [IP::client_addr] equals 10.144.0.0/16] } {
pool Branchplatform_Citizens_pool
} else {
pool Branchplatform_COB_pool
}
}
Thanks in advance
Chuck
- You are close...
if { 172.1.1.1 equals 172.0.0.0 }
when CLIENT_ACCEPTED { if { [IP::addr [IP::client_addr]/8 equals 172.0.0.0] } { pool Branchplatform_Citizens_pool } if { [IP::addr [IP::client_addr]/16 equals 10.144.0.0] } { pool Branchplatform_Citizens_pool } else { pool Branchplatform_COB_pool } }
- Chuck_127210
Nimbostratus
Hello Joe, - I'd recommend throwing in some logging to point out where things are going wrong..
when CLIENT_ACCEPTED { log local0. "client address: [IP::client_addr]" if { [IP::addr [IP::client_addr]/8 equals 172.0.0.0] } { log local0. "[IP::client_addr] is in the 172.0.0.0 subnet" pool Branchplatform_Citizens_pool } if { [IP::addr [IP::client_addr]/16 equals 10.144.0.0] } { log local0. "[IP::client_addr] is in the 10.144.0.0 subnet" pool Branchplatform_Citizens_pool } else { log local0. "[IP::client_addr] doesn't match." pool Branchplatform_COB_pool } }
- Chuck_127210
Nimbostratus
It appears to match the rule but goes to the else pool. Please see attached. - Deb_Allen_18Historic F5 AccountHi guys -
orwhen CLIENT_ACCEPTED { if { [IP::addr [IP::client_addr]/8 equals 172.0.0.0] } { pool Branchplatform_Citizens_pool } elseif { [IP::addr [IP::client_addr]/16 equals 10.144.0.0] } { pool Branchplatform_Citizens_pool } else { pool Branchplatform_COB_pool } }
when CLIENT_ACCEPTED { if { [IP::addr [IP::client_addr]/8 equals 172.0.0.0] or [IP::addr [IP::client_addr]/16 equals 10.144.0.0] }{ pool Branchplatform_Citizens_pool } else { pool Branchplatform_COB_pool } }
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