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 app...
Dec 08, 2006
You are close...
You code is comparing the client address to the subnet
Let's say your client_addr is 172.1.1.1, then your if would equate to this
if { 172.1.1.1 equals 172.0.0.0 }
Obviously this will return false. To achieve what you want to do, you'll need to apply the netmask to the IP::client_addr like this
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
}
}
-Joe
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