Forum Discussion
swo0sh_gt_13163
Sep 16, 2013Altostratus
undefined procedure error in iRule
Hello Folks,
Could you please help me correcting my following iRule?
================================================================
when CLIENT_ACCEPTED {
if {
[IP::addr [IP::remote_addr] equa...
Sep 16, 2013
Hi Darshan,
this will be just a combination of both commands. Now 'switch' will be evaluated in the context of 'elseif':when CLIENT_ACCEPTED {
if { [IP::addr [IP::remote_addr] equals 10.10.0.0/16] } {
snat 10.232.10.1
} elseif { [IP::addr [IP::remote_addr] equals 10.11.0.0/16] } {
switch [IP::addr [IP::client_addr] mask 255.255.255.0] {
10.11.1.0 { snat 10.232.11.1 }
10.11.2.0 { snat 10.232.11.2 }
10.11.3.0 { snat 10.232.11.3 }
default { snat 10.232.11.8 }
}
} else {
snat 10.232.8.8
}
}
Thanks, Stephan
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