Forum Discussion
icopperman_1347
Nimbostratus
Oct 01, 2013can we direct traffic based on IP address
we have two servers (srvr1, srvr2) behind a F5 load balancer.
Is it possible to write an iRule (or any other type of rule ) to direct the traffic based on IP address? Specifically, i would like...
Kevin_Stewart
Employee
Oct 01, 2013I'd use an address-based data group, two pools, and a small iRule. Example:
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] equals my_ip_dg] } {
pool srv1_pool
} else {
pool srv2_pool
}
}
where "my_ip_dg" (arbitrary name) is an address-based data group that contains single (client source) IP addresses and/or subnets. Also, using two separate pools allows you to add additional resources later if you ever need to scale out the application.
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