Forum Discussion
Testing of an irule before implementation.
Hi,
I am looking for your help on below issue:-
Is there any way to check and test the functioning of irule before applying the same in Virtual server or data group in production. For example:- if we have an iRule which needs to be applied and is logical and if some logic does not work.
7 Replies
- Hannes_Rapp_162
Nacreous
Perhaps the fastest way of doing that is to use an extra IF condition
if {[IP::client_addr] == "yo.ur.test.ip"}{ your-irule-logic }For a more complicated implementation where there are many testers accessing from various IP addresses, I use a secret HTTP path which inserts a special testing cookie. This will relieve from the burden of managing the "Allowed Testers IP addresses".
- Avesh_Malik_178
Nimbostratus
thanks alot this will help.. but i have not used secret HTTP path.. It would be good if you can help on this..
- Hannes_Rapp
Nimbostratus
Perhaps the fastest way of doing that is to use an extra IF condition
if {[IP::client_addr] == "yo.ur.test.ip"}{ your-irule-logic }For a more complicated implementation where there are many testers accessing from various IP addresses, I use a secret HTTP path which inserts a special testing cookie. This will relieve from the burden of managing the "Allowed Testers IP addresses".
- Avesh_Malik_178
Nimbostratus
thanks alot this will help.. but i have not used secret HTTP path.. It would be good if you can help on this..
- Stanislas_Piro2
Cumulonimbus
If you want to test new features on a VS with a specific IP address, you can duplicate production VS and add source address condition on VS.
You can create multiple VS with the same destination port and address is source VLAN or source IP condition is different.
On the new VS, enable your iRule.
to duplicate virtual server configuration, execute in tmsh:
list ltm virtualEdit the following line and replace source address: (don't forget to change VS name)
source 0.0.0.0/0To load the configuration, execute in tmsh (and paste the VS configuration):
load sys config from-terminal mergeConfirm load configuration with CTRL-D
- Kevin_Stewart
Employee
If I may add, you actually have a few really good options:
-
You can create a duplicate VIP (perhaps on an internal address) and test your iRules there.
-
You can test your iRules on another BIG-IP. This is a popular use case for the $98 VE lab version.
-
You can wrap all of your iRules in a catch clause to make sure they don't break your active application.
-
If you just need to test TCL logic (ie. without iRules events or protocol commands), you can use tclsh on the command line.
-
- Avesh_Malik_178
Nimbostratus
Kevin thanks for your support and guidance this will help us.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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