Forum Discussion
LillyM_9417
Dec 15, 2011Altostratus
Switch & external datagroup file
Hello,
I need to create an irule with the following properties..
Thanks a lot in advance..
---Firstly, I am doing all the following items with IF claues in prod enviromen...
hooleylist
Dec 15, 2011Cirrostratus
You can only perform string comparisons with switch. IP::addr does support bitwise address comparisons. I can't see a switch working if you need to support CIDR ranges. If you can do single host or classed networks (class A, B, C) and don't mind the loss of performance you could use switch:
switch -glob [IP::client_addr] {
1.1.1.1 {
client IP was 1.1.1.1, do something
}
2.2.2.2 {
client IP was 2.2.2.2, do something
}
2.2.3.* {
client IP was 2.2.3.x, do something
}
2.3.*.* {
client IP was 2.3.x.x, do something
}
default {
client IP was not matched, do something by default
}
}
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