Forum Discussion
Roark_Fisher_29
May 02, 2006Nimbostratus
Wow! I appreciate your testing this as this is very big to a very big project. And I was amazed to get such a good response so quickly. Sadly, I have to claim being dumb with iRules. I tried to setup the second example you gave as it was (to me) the clearest and easiest to understand.
I created a new iRule and went for a basic test of one translation (if the SNAT address is 62.2.2.10, then use 62.2.2.1 as the gateway):
class snat_gw {
"62.2.2.10 62.2.2.1"
}
when CLIENT_ACCEPTED {
set my_gw [findclass [IP::client_addr] $::snat_gw " "]
if { $my_gw ne "" } {
node $my_gw
} else { discard }
}
When I clicked on "Finished", it gave me the error:
01070151:3: Rule [Test_SMTP_SNAT] error:
line 1: [undefined procedure: class] [class snat_gw {
"62.2.2.0 62.2.2.1"
}
Sorry for not understanding the basics of iRules yet. This is my first experience with F5s and this issue came up quickly.
Do I need to add something else to get it to understand the reference to the "class" procedure? Can I add a subnet to my entry (i.e. "62.2.2.0/255.255.255.0 62.2.2.1) so that the entire network will use this default gateway.
Again, thank you for your help. This is huge for us if we can get it working.
-Roark Fisher