Forum Discussion
Gordon_Wong_347
Nimbostratus
Jul 19, 2006Newbie to irules
Gents,
I am a total newbie to irules and my boss has asked me to convert our production bigip 4.5 irules to our lab bigip 9.2 irules...I searched this forum and saw a thread that no conversion tool exists. So if you can point me in the right direction with the rule below...I will attempt to convert the other rules myself.
Here is one of the rule I need to convert,
if (client_addr == 1.2.3.4 netmask 255.255.255.255) {
use pool CMS_GOOGLE_HTTP
}
else if (http_cookie("author") == "true") {
use pool CMS_AUTHOR_HTTP
}
else {
use pool CMS_HTTP
}
Note the client addr is not what we are using but set to 1.2.3.4 for security reasons.
Thanks,
Gord.
2 Replies
- hoolio
Cirrostratus
Hi Gord,
You could use the One Time Conversion Utility (OTCU) to convert your 4.5.x configuration to 9.x. Try searching AskF5.com for OTCU to find the relevant 9.x release note description of the OTCU.
It may be faster to manually recreate your rules in the new TCL based format.
Here is an example for your rule above:when HTTP_REQUEST { if { [IP::addr [IP::remote_addr] equals 1.2.3.4] }{ pool CMS_GOOGLE_HTTP } elseif { [HTTP::cookie exists "author"] && [HTTP::cookie "author"] == "true"} { pool CMS_AUTHOR_HTTP } else { pool CMS_HTTP } }
If you have multiple IP addresses to evaluate, you might want to use a class (datagroup) and matches class:class my_hosts_networks_class { network 10.0.0.0 mask 255.0.0.0 host 192.168.0.100 }if { [matchclass [IP::remote_addr] equals $::my_hosts_networks_class] } { ...
Aaron - Gordon_Wong_347
Nimbostratus
Hi Aaron,
Thank-you so much for your time and reply. I appreciate it...
I did a search and found some references to the OTCU but I do believe it just takes the 4.5 ucs and converts it to a 9.x ucs and than you load the 9.x ucs as a whole.
In our case we have 4.5 in production and a box that I built up from scratch with 9.2
We have 3 sets of 4.5 irules and each are only a few lines long...so it won't be that bad to convert them to 9.2, I just need to learn the 9.2 syntax.
Your solution to my question will give me the foundation to build upon and enhance my skills at adminstrating the 9.2 irules on our new box.
Best Regards and Thanks Again,
Gord.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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