Forum Discussion

Angel_Sosa_1662's avatar
Angel_Sosa_1662
Icon for Nimbostratus rankNimbostratus
Aug 15, 2014

1:1 SNAT to CLIENT IP

On my ltm I am running version 11.4.0 and 11.4.1 on two different chassis There is a line that is concerning with in the following link

 

https://devcentral.f5.com/wiki/irules.snat_pool_persistence.ashx

 

set static::i 0 // Which is line 15 incr static::i // Which is line 22

 

I am under the impression that for boxes that will run CMP or have multiples instances of TMM present and not running CMP You shouldn't alter the value of a static variable

 

According to the following link there is a nonte that states the following

 

https://support.f5.com/kb/en-us/solutions/public/13000/000/sol13033.html?sr=39629869

 

Important: While it is possible to use the set command to modify a static global variable within the iRule and outside of the RULE_INIT event, such modifications will not be propagated to each TMM instance; they will be visible to only the TMM process on which the modification was made, resulting in inconsistent values for the static global variable across TMM instances. As a result, F5 strongly recommends that you do not update the value of any static global variable within the iRule.

 

I am looking for an understanding if the first link

 

https://devcentral.f5.com/wiki/irules.snat_pool_persistence.ashx

 

set static::i 0 // Which is line 15 incr static::i // Which is line 22

 

Is correct incrementing the static variable "incr static::i" with out issue's

 

Thank You for your response in advance

 

Angel

 

6 Replies

  • Hi Angel, I think you'll find that the important phrase here is "outside of the RULE_INIT" - all the manipulation of static variables in the snat_pool_persistence iRule is done inside RULE_INIT, so it's all above board and will be visible to all TMM.

     

  • additionally, you can alter global static variable as long as you are aware the change will make on the variable on specific tmm (the one which processes that traffic) only.

     

  • additionally, you can alter global static variable as long as you are aware the change will make on the variable on specific tmm (the one which processes that traffic) only.