Forum Discussion
Sheila_Liu_8576
Nimbostratus
Mar 17, 2006picking a pool member with source_addr persistence
Working on the following irule, no luck so far
the requirement is that when http request comes in, if the request is made by any poop member, connection should go back to the requsting member, th...
JRahm
Admin
Mar 17, 2006You could try this:
when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_addr] equals 172.19.10.70] } {
use snat snat_a_IP
} elseif { [IP::addr [IP::client_addr] equals 162.66.195.95] } {
use snat snat_b_IP
}
}
when HTTP_REQUEST {
if { [IP::addr [IP::client_addr] equals snat_a_IP] } {
pool LMS-lms.lnh.bislab.pwj.com.80 member 172.19.10.70
log "hit member 172.19.10.70"
} elseif { [IP::addr [IP::client_addr] equals snat_b_IP] } {
pool LMS-lms.lnh.bislab.pwj.com.80 member 162.66.195.95
log "hit member 162.66.195.95"
} else {
pool LMS-lms.lnh.bislab.pwj.com.80
persist source_addr 10800
log "hit pool"
}
}
This, of course, is assuming the client IP is snatted before the HTTP_REQUEST event occurs. Not tested!
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