Forum Discussion
Arnor_Arnason
Jul 13, 2011Altostratus
TCL error: invalid command name "1" on GTM
Hi, I have the following irule on my GTM: when DNS_REQUEST { if { [[active_members Global-webservices.landsbanki.is_A10_pool] = 0] and [[active_members Global-webservi...
Arnor_Arnason
Jul 14, 2011Altostratus
Hi again Aaron,
I have been having some problem with letting the iRule work correctly after the changes, and actually two of the changes that you suggested that I do, resulted in the iRule working incorrectly.
Firstly - you suggested to change in the last 'elseif'-line the outer braces to paratheses - it seems logical, I aggree on that, but the logic did not work as expected - when I put the braces back - this worked fine again:
So it works like this:
elseif { not [[IP::addr [IP::remote_addr] equals 172.27.0.0/16] or [IP::addr [IP::remote_addr] equals 89.104.128.0/19]] } {
but not like this:
elseif { not ([IP::addr [IP::remote_addr] equals 172.27.0.0/16] or [IP::addr [IP::remote_addr] equals 89.104.128.0/19]) } {
Secondly - you said:
when using the IP::addr command, only put the /subnet on the network--not a host address like IP::remote_addr.
But that did not work either - I tested this out by putting in log local0. lines at every step.
So I had to have it like this:
elseif { [IP::addr [IP::remote_addr]/24 equals 89.104.145.0/24] } {
but it did not work like this :
elseif { [IP::addr [IP::remote_addr] equals 89.104.145.0/24] } {
This makes sense, because this is not "equal", and I don't think there is an operator that you could use for this.
We need an inversed "contains" operator.
Maybe it would work to reverse this and put :
elseif { [ 89.104.145.0/24 contains IP::addr [IP::remote_addr] ] } {
?? I haven't tried it, but that would make sense wouldn't ?
Regards,
Arnór
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