Forum Discussion
yammy1688_99834
Nimbostratus
Mar 30, 2011class variable pairs possible?
when CLIENT_ACCEPTED {
if {[IP::addr [IP::client_addr] equals "10.64.40.0/24"] } {
node 10.64.40.2
} elseif {[IP::addr [IP::client_addr] equals "10.64.41.0/24"] } {
...
hoolio
Cirrostratus
Mar 30, 2011Hi Ken,
You can use the IP host/subnet = value format (name = value pairing) in 10.1+:
class ip_subnets_class {
{
host 1.1.1.1 { "10.11.0.1" }
network 2.2.2.0/24 { "10.10.10.10" }
}
}
You can then use something like 'set dest [class match -value [IP::client_addr] equals ip_subnets_class]' to do the lookup.
Aaron
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