Forum Discussion
HA13029
Nimbostratus
Dec 11, 2017Datagroup and switch command
Hello,
I created different datagroup (list of TCP ports) and based on this setting, selecting the correct pool within my irule.
ltm data-group internal DG_TCP-010901-10902 {
records {
...
Stanislas_Piro2
Cumulonimbus
Dec 11, 2017You can try with this code:
when CLIENT_ACCEPTED {
switch [TCP::local_port] {
"10901" -
"10902" { pool P_010901-10902 }
default { reject }
}
}or use a data group containing pool name as value
ltm data-group internal DG_TCP {
records {
10901 {P_010901-10902}
10902 {P_010901-10902}
XXXX {P_XXXX}
}
type string
}
when CLIENT_ACCEPTED {
if {[set pool [class match -value [TCP::local_port] equals "DG_TCP"]] ne ""} {
pool $pool
} else {
reject
}
}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