Forum Discussion
Mariusz_B
Nimbostratus
Feb 02, 2015Address Data Group with switch option in iRule.
Hello,
I have the following iRule:
when DNS_REQUEST {
switch [IP::remote_addr] {
Client 1
"10.10.10.0/24" {
if {[LB::status vs Client1] eq "up" } {
host 1.1.1.1
...
Michael_Jenkins
Cirrostratus
Feb 02, 2015Best way may be like this...
when DNS_REQUEST {
Get the status
switch [IP::remote_addr] {
"10.10.10.0/24" -
"10.10.20.0/24" -
"10.10.30.0/24" {
set status [LB::status vs Client1]
}
"10.20.10.0/24" -
"10.20.20.0/24" -
"10.20.30.0/24" {
set status [LB::status vs Client2]
}
}
Handle the status
if {$status equals "up"} {
host 1.1.1.1
} else {
host 2.2.2.2
}
}
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
