Forum Discussion
intadm_38648
Jul 28, 2011Nimbostratus
New to iRules...need some guidance
Hey all! This iRule that I'm trying so hard to create is racking my brain...was wondering if you experts can help me. Below is the rule and basically, I would like to send inbound traffic (inbound to this virtual address on the LTM where this rule is attached, that is) to one of the two pools(based on whether the destination address is part of the SPOE_IPS list but it appears that nothing is being sent to the second pool. I've created a class called "SPOE_IPS" and the 2 pool names are correct. It appears that traffic is hitting the first part of the rule correctly but not the second part. That is, all traffic seems to terminate before the "else" statement. Am I using the correct syntax (IP::local_addr) if I'm trying to filter by destination?
Thank you in advance,
Nelson.
when CLIENT_ACCEPTED {
if { [matchclass [IP::local_addr] equals $::SPOE_IPS] } {
pool pool_spoe_proxies }
else {
pool pool_BC_proxies
}
}
- intadm_38648NimbostratusBasically what I'm trying to accomplish is that if a user tries to target a destination that is contained in the SPOE_IPS class, use the pool_spoe_proxies pool. Everything else should go to pool_BC_proxies.
- HamishCirrocumulusFirstly, what version of BigIP are you using? I'd use v10 syntax myself with the class command rather than the $::SPOE_IPS syntax (Because that's deprecated). At some stage, it'll stop working... Might as well use the new syntax since it's there.
- intadm_38648NimbostratusHi, Hamish. Thank you very much for your response. Yes, we are using v. 10.2.1 and I'm not familiar with the version 10 syntax for the equivalent of $::SPOE_IPS...would you happen to have a link to this info? I'm sorry...I'm very new at iRules.
- Michael_YatesNimbostratusHi intadm,
when CLIENT_ACCEPTED { if { [class match [IP::client_addr] equals SPOE_IPS] } { pool pool_spoe_proxies } else { pool pool_BC_proxies } }
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