Forum Discussion
Andy_Smith_2380
Nimbostratus
Nov 22, 2006iRules and source IPs - GTM
Hi,
Not sure if anyone can help me here, as this relates to GTM as opposed to Big-IP, but I'll give it a go...
Basically, I'm trying to write an iRule to loadbalance requests to different wideip pools based on the source. I've seen that you can do this based on the source IP, but there doesn't appear to be a way to do it based on a range of source IPs.
Is there a way?
Andy.
2 Replies
- You can make use of netmasks or netmask shorthand notations in your address comparisons.
Something like this should workif {[IP::addr [IP::remote_addr]/24 equals "172.19.10.0"]} { LB:reselect snat none }
This will compare the address in IP::remote_addr to see if it is in the 172.19.10.* network.
If you want to do something like "if addr greater than addr1 and less than addr2) then you'll probably have to do the math to convert the ip address to it's number equivalent and then do the math comparisons.
-Joe - Great, glad to help.
-Joe
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
