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, there are two members in the pool.
If http request comes from user, use source_addr persistence.
I'm seeing request from poop memebrs not going to itself but also in /var/log/ltm, I do see the irule being hit.
Please help.
when HTTP_REQUEST {
if { [IP::addr [IP::client_addr] equals 172.19.10.70] } {
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 162.66.195.95] } {
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"
}
}
- JRahm
Admin
I'm confused...the server's in the pool need to request something of themselves? Perhaps a greater picture of what you are trying to accomplish would be helpful. - Sheila_Liu_8576
Nimbostratus
unfortunately, yes. The servers are calling themselves. - Sheila_Liu_8576
Nimbostratus
yes, we are using snat - JRahm
Admin
You 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" } }
- Sheila_Liu_8576
Nimbostratus
looks like I hit a bug. If I create a pool with only the server in it, then I refer to this pool instead of a pool member, it works. - unRuleY_95363Historic F5 AccountUh, yeah. Read yesterday's posts. I gave a work-around.
- unRuleY_95363Historic F5 AccountClick here: http://devcentral.f5.com/default.aspx?tabid=28&view=topic&forumid=5&postid=6988
- Sheila_Liu_8576
Nimbostratus
Thanks for your reply. The workaround makes sense but somehow it's not working for me. see below client 172.19.10.70 not going to itself
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