Forum Discussion
Jeff_46763
Nimbostratus
May 16, 2016Irule to Load Balance traffic based on group of IP's
I would like to write an Irule to basically say "if a group of IP's come into the VIP, load balance to server 1 and 2, all others hit server 3" I'm newish to Irules so would like some help please. ...
Greg_Labelle
Nimbostratus
May 16, 2016There are a few ways to deal with this, but one example is to use an iRule data group and match the specific source IP and make a decision based on that. I would set this up using two pools, a data group and a rule as per this example:
Pool1 - Server 1 and 2 Pool2 - Server 3
iRule Data group (String type)
Name: Pool1IPs Add the IP Addresses to route to Pool1iRule to direct the traffic:
when HTTP_REQUEST {
if {[class match [IP::client_addr] equals Pool1IPs} {
Pool Pool1
} else {
Pool Pool2
}
}
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