Forum Discussion
iRule to route based on CIDR notation
- Apr 10, 2017
The is already a default data class built into the F5 for private address space called private_net.
when CLIENT_ACCEPTED { if { [class match [IP::client_addr] equals private_net] } { pool application-server_pool } else { pool sorry-server_pool } }
You can use this or roll your own. See under iRules -> Data Group List. Address based data groups are designed for IP address matching. If a client address matches a subnet in the address data group then this will return true. The same applies if it is a single host as well.
The is already a default data class built into the F5 for private address space called private_net.
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] equals private_net] } {
pool application-server_pool
} else {
pool sorry-server_pool
}
}
You can use this or roll your own. See under iRules -> Data Group List. Address based data groups are designed for IP address matching. If a client address matches a subnet in the address data group then this will return true. The same applies if it is a single host as well.
Looks like it is working! Thanks for the response!
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