Forum Discussion
How to inherit a generic irules?
I need to create hundreds of irule on GTM box like below. (one rule for each webserver). the only difference will be name of the webservers.
when DNS_REQUEST {
if {[DNS::rrtype] eq "A" and [active_members webserver1-pool] > 0} {
webserver1-pool
pool
} elseif {[DNS::rrtype] eq "AAAA" and [active_members webserver1-pool-v6]> 0} {
webserver1-pool-v6
pool
}
}
if
{[DNS::rrtype] eq "A" and [active_members $pool4] > 0} {
pool $pool4
}
elseif {[DNS::rrtype] eq "AAAA" and [active_members $pool6] > 0} {
pool $pool6
}
}
How can I write the rule to inherit this
generic-v6-irules so I can get the equivalent like the first irule? any suggestions? Thanks in advance!
- HamishCirrocumulusI think I see what youre after. Use a datagroup as a lookup table. You use the webserver as the key and the pool as the value (Or you could encode several parameters in the value as for example colon delimited). The class command then does the lookup for you.
- Jeff_92092NimbostratusHere is an easy solution which works perfectly to my expection.
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